Skip to content

How to build a 13-week cash flow forecast with AI

Short answer

Start from this week's cash balance and project collections, payments and payroll week by week for 13 weeks, so each week's closing cash becomes the next week's opening cash. Time collections by how fast each customer actually pays, not by their terms. Claude in Excel can build the workbook, and Xero's JAX can project cash flow from Xero data.

How to build a 13-week cash flow forecast

  1. 1Export open invoices, at least six months of customer payment history, open bills, the payroll calendar and known one-off items such as tax payments or loan repayments.
  2. 2Work out each customer's actual days-to-pay from the payment history, and use it to place each open invoice in the week you expect the cash.
  3. 3Place bills in the week you plan to pay them, and payroll on its pay dates.
  4. 4Chain the weeks: opening cash, plus collections, minus payments, equals closing cash, which becomes the next week's opening cash.
  5. 5Add a line for the minimum cash you want to hold, and flag any week that falls below it.
  6. 6Each week, replace the week just ended with actual figures, add a new week 13, and note why the actuals differed.

Copyable prompt: 13-week cash flow forecast

Upload the exports as CSV or as tabs in one workbook, then paste this prompt.

Copyable prompt

Build a rolling 13-week cash flow forecast for a [type of business], starting the week of [date]. Opening cash: [amount].

I have uploaded:
1. open_ar.csv: customer, invoice number, invoice date, due date, amount.
2. payments_history.csv: customer, invoice number, invoice date, date paid, amount (the last [6 to 12] months).
3. open_ap.csv: vendor, bill date, due date, amount, the week I plan to pay it if known.
4. payroll.csv: pay dates and the net pay, taxes and benefits for each.
5. one_offs.csv: date, description, amount (tax payments, loan repayments, equipment).

Please:
1. Work out each customer's average days from invoice date to payment, using payments_history.csv. For customers with no history, use [number] days and label it as an assumption.
2. Place each open invoice in the week its cash is expected, based on step 1.
3. Place bills, payroll and one-off items in their weeks.
4. Build a weekly table: opening cash, collections, payments by type, net change, closing cash. Each week's closing cash is the next week's opening cash.
5. Add a minimum cash line of [amount] and flag any week below it.
6. List every assumption you made in a separate table.

Show your formulas or workings so I can check them. Do not change any amounts from the files.

Replace the [bracketed] placeholders. Remove client names, account numbers, and personal data before pasting into any AI tool.

What goes into a 13-week cash flow forecast?

Mostly Metrics builds one for a fictional software company from eight messy tabs, including an invoice export with inconsistent terms, collections history, AP, a payroll calendar and one-off items[1]. The finished model chains beginning cash, collections, disbursements, net change and ending cash week to week, and adds a covenant line that flags a breach automatically[1].

How do you forecast collections with AI?

Use behavior, not terms. In the Mostly Metrics walkthrough, Claude first works out each customer's actual days-to-pay from collections history and uses that, rather than the payment terms on the invoice, to time the cash[1]. You can do the same in ChatGPT by uploading the payment history as a CSV, since it writes and runs code to analyze uploaded files[2].

Can Xero project cash flow for you?

Xero says JAX, with Analytics, can create cash flow projections and show your past and projected cash flow position from your Xero data[3]. Compare its projection with your own list of payroll dates and one-off items before you rely on it.

Frequently asked questions

How often should I update a 13-week forecast?
Weekly. Replace the week that just ended with actual figures and add a new week at the end, so the forecast always looks 13 weeks ahead.
Can AI build the whole forecast?
It can build the structure and do the arithmetic; the Mostly Metrics walkthrough ends with a six-tab workbook[1]. The assumptions, such as which bills you will pay and when, are yours to set.
What data should I leave out?
Bank account numbers and personal details the forecast does not need. Customer names can be swapped for codes before you upload.

Sources

  1. 1.Mostly Metrics: How to build a rolling 13-week cash flow forecast using Claude and Excel
  2. 2.OpenAI Academy: Data analysis with ChatGPT
  3. 3.Xero Central: About Just Ask Xero (JAX)

Sources were checked when this page was last updated. Archived copies are cited where the original page could not be reached from our checker. Features and settings change, so confirm details with each vendor.

Not professional advice. This is general information, not accounting, tax, legal or financial advice. Check AI output yourself and consult a licensed professional for your situation. See our Terms of Use.

  • Reporting and Analysis

    Build a Rolling 13-Week Cash Flow Forecast with AI and Excel

    In this Mostly Metrics tutorial, the author records building a 13-week rolling cash forecast for a fictional software company from eight messy data tabs, including an invoice export with inconsistent terms, collections history, AP, a payroll calendar and one-off items. Claude first works out each customer's actual days-to-pay from collections history rather than nominal terms, then builds a forecast with beginning cash, collections, disbursements, net change and ending cash chained week to week. The model includes a covenant line with an automatic OK/BREACH flag.

    Works in ChatGPT, Claude, Grok, Gemini

    Microsoft Excel

    Mostly Metrics (newsletter)
  • Reporting and Analysis

    Ask Xero JAX for Profit Trends, Cash Flow and Benchmarks

    Xero Central describes JAX (Just Ask Xero) as a generative AI finance partner that answers questions about a business's financials and about using Xero. With Analytics, JAX can find trends, create cash flow projections, and benchmark the business against similar businesses in its industry. Its feature table lists financial insights such as revenue or profit trends, past and projected cash flow position, and industry comparisons. JAX is in beta, needs the admin or standard user role, and its features depend on the Xero pricing plan.

    Xero, JAX (Just Ask Xero)

    Xero Central
  • Accounts Receivable

    Build a Weekly AR Chase List and Reminder Drafts with AI

    This free interactive lesson has a bookkeeper upload an AR aging report CSV to ChatGPT and ask for a chase list that skips invoices not yet due, holds disputed invoices in a separate list, and sorts oldest bucket first then largest amount. The user checks rows and totals against the file, then asks ChatGPT to draft friendly, firm or final reminder emails, verifies every fact, and sends the emails personally.

    Works in ChatGPT, Claude, Grok, Gemini

    Stepthrough by Ynteractive (interactive tutorial)

If you'd like a workbook to keep beside a cash forecast, the Small Business Bookkeeping Spreadsheet Bundle is on our sister store.

Last updated: