How to Build a 13-Week Cash Flow Forecast With AI Help

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for How to Build a 13-Week Cash Flow Forecast With AI Help.
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for How to Build a 13-Week Cash Flow Forecast With AI Help.

Start from today's bank balance, then list the money you expect in and out each week for 13 weeks, from unpaid invoices, bills, payroll dates and regular costs. Roll it forward weekly. AI helps build the layout and formulas, predict when each client will really pay from past behaviour, and explain why actual cash differed from forecast.

This is a direct cash forecast: real money moving through the bank, by week. It isn't a profit forecast, and a business can be profitable and still run out of cash in week nine. Most errors come from one assumption: that clients pay on their terms. Time receipts by what clients have actually done, and the forecast becomes useful almost immediately.

Follow me on Instagram@sagnikteaches

The layout: rows that matter for a weekly forecast

Keep it to one sheet with weeks across the top (week 1 starting next Monday) and these rows down the side:

Connect on LinkedInSagnik Bhattacharya
RowWhat goes in it
Opening cashWeek 1: cleared bank balance today. Later weeks: previous week's closing cash
Receipts: largest clientsOne row each for the clients that make up most of your income
Receipts: other clientsEveryone else, in one row
Other receiptsLoan drawdowns, asset sales, grants, tax refunds
PayrollNet pay, plus the payroll taxes and pension contributions on their own dates
SuppliersFrom your unpaid bills, on the dates you'll actually pay them
Fixed costsRent, software, insurance, loan repayments, on their due dates
Tax paymentsOn their due dates
Owner drawings or dividendsIf you take them
Net cash flowTotal receipts minus total payments
Closing cashOpening cash plus net cash flow
Minimum bufferThe lowest balance you're comfortable holding
HeadroomClosing cash minus the buffer, plus any unused overdraft or facility

The buffer is a judgement. A common starting point is enough to cover your biggest single week of payments, which for most firms is a payroll week.

Subscribe on YouTube@codingliquids

Step 1: gather six inputs (about an hour)

  1. Cleared bank balance across all business accounts, minus payments already sent but not yet cleared.
  2. Aged receivables: every unpaid sales invoice with its date, due date and client.
  3. Aged payables: every unpaid bill with its due date and supplier.
  4. Payroll calendar: pay dates, typical net pay, and when payroll taxes and pension contributions leave the account.
  5. Fixed-cost calendar: rent, loan repayments, subscriptions, insurance premiums, tax payments.
  6. Known one-offs: equipment purchases, a client starting or finishing, a bonus, a planned hire.

Your accounting system produces the first three as reports. The last three usually live in someone's head, and writing them down is half the value of the exercise.

Step 2: let AI build the skeleton, with formulas

Ask for a structure that calculates, not a table of typed-in numbers. Language models make arithmetic mistakes when they compute in their heads, so the spreadsheet must do the sums. Whether you use ChatGPT or Claude with a file, Copilot in Excel or Gemini in Google Sheets, the request is the same:

Build a 13-week cash flow forecast sheet. Weeks run Monday to
Sunday; week 1 starts on {date}. Rows: opening cash; receipts
(one row each for Client A, B, C, D, plus "other clients" and
"other receipts"); payments (temp payroll, office payroll,
payroll taxes, suppliers, rent, software, loan, tax, drawings);
total receipts; total payments; net cash flow; closing cash;
minimum buffer ({amount}); headroom.
Use formulas for every total, for opening cash from week 2
onwards, and for headroom. Add conditional formatting: headroom
below zero in red. Leave input cells blank and shaded so I can
see which cells I fill in. Give me the file and list every
formula you used.

Check three formulas by hand before you trust the sheet: one week's total payments, one week's closing cash, and week 2's opening cash. If week 2's opening cash doesn't equal week 1's closing cash, the chain is broken and every later week is wrong.

Step 3: time receipts by how clients actually pay

This is where AI adds most. Export 12 months of paid invoices (client, invoice date, due date, date paid) and ask:

For each client, calculate: number of invoices, average days
from invoice date to payment, the shortest and longest, and
whether they pay on a fixed day (e.g. always a Friday, or in a
month-end run). Use Python and show the code. Then, for each
unpaid invoice in the attached aged receivables, predict the
week it will be paid using that client's average, and flag
any client with fewer than 5 invoices as "low confidence".

The running example is an illustrative recruitment agency supplying about 60 temps a week to warehouses and offices. It pays temps every Friday, but its clients pay invoices on 30-day terms, at least on paper. The payment history told a different story:

ClientTermsAverage days to payRangePattern
Client A30 days4438 to 52Pays in a month-end run
Client B30 days3128 to 35Reliable, pays on Fridays
Client C45 days6250 to 75Slow, needs chasing
Client D30 days3630 to 47Varies with their approval process

Client A's "pays in a month-end run" is the useful finding. An invoice due on the 3rd won't arrive on the 3rd; it will arrive at the end of that month. The AI noticed because the payment dates bunched on the last working day, and an average alone would have missed it. Put those rules into the receipts rows, and the forecast stops being a list of wishes.

Step 4: payments, the ones you control and the ones you don't

Payments are easier to predict than receipts because you choose when most of them go. Split them into two kinds. Fixed ones (payroll, tax, rent, loan repayments) go on their exact dates, no optimism. Flexible ones (supplier bills with some give, equipment purchases, drawings) go on the dates you intend, with a note of how far each could move if needed. That note is what gives you options when the forecast shows a dip.

The payments people forget, in roughly the order they cause surprises: annual insurance premiums, quarterly tax payments, software billed annually, holiday pay when several staff take leave at once, and deposits for new premises or equipment. Ask the AI to scan the last 12 months of bank payments for anything over a set amount that happened once or twice a year, and check each against your calendar.

The worked forecast: growth that eats cash

The agency starts with $85,000 in the bank. Its existing clients bring in around $54,000 a week once payment timing is applied, and temp payroll costs $42,000 a week. In week 3 a new client starts with 15 temps, adding $10,500 a week to payroll and $13,500 a week to billing. The new client has agreed 30-day terms, but with an approval process like Client A's, its first payment is expected in week 10. Office salaries of $28,000 are paid in weeks 4, 8 and 12, rent of $6,500 in weeks 1, 5, 9 and 13, a loan repayment of $3,000 in weeks 2, 6 and 10, and a $24,000 tax payment in week 7, with $1,500 a week of other costs. The buffer is $30,000. Illustrative figures:

WeekOpeningReceiptsPaymentsClosing
185,00058,00050,00093,000
293,00049,00046,50095,500
395,50055,00054,00096,500
496,50061,00082,00075,500
575,50047,00060,50062,000
662,00054,00057,00059,000
759,00052,00078,00033,000
833,00057,00082,0008,000
98,00050,00060,500−2,500
10−2,50067,50057,0008,000
118,00066,50054,00020,500
1220,50069,50082,0008,000
138,00065,50060,50013,000

The new client is profitable: $3,000 a week more coming in than going out once it pays. But for seven weeks the agency pays those 15 temps before a cent arrives, and that's $73,500 of extra payroll funded from its own bank account. Combined with a tax week and a salary week back to back, cash drops below the buffer in week 8 and goes negative in week 9. A monthly forecast would have shown the quarter ending with $13,000 in the bank and missed the hole completely.

Seen nine weeks ahead, the hole is manageable. Ask the AI to run scenarios on the same sheet, for example:

  • The new client pays in 14 days instead of about 45. Receipts start in week 5, and week 9 closes at $65,000 instead of −$2,500. Asking a new client for shorter terms, or weekly payment, is a normal request in temporary staffing, and it's far easier before the first invoice than after.
  • Client C pays on its 45-day terms rather than 62 days. This is worth about $20,000 earlier, enough to lift week 9 back above zero, and it's a chasing job rather than a negotiation.
  • An invoice finance facility or overdraft arranged before week 7. Lenders ask for exactly this forecast, and asking in week 3 with a clear plan is very different from asking in week 9.

The agency chose the first two and set up a small overdraft as a backstop. The point isn't the specific fix; it's that the forecast turned a crisis into three options with nine weeks to use them.

Step 5: roll it forward every week in 30 minutes

A 13-week forecast is only useful if it's always 13 weeks long. Every Monday:

  1. Replace last week's forecast figures with actuals from the bank.
  2. Drop the finished week and add week 14 at the end.
  3. Update receipts timing from the latest aged receivables.
  4. Add any new commitments: a new hire, a new client, a large bill.
  5. Ask the AI to explain the variance.

The variance step is where the forecast gets better each week:

Here is last week's forecast and last week's bank transactions.
Compare them line by line. For each difference over $1,000:
say whether it's timing (the money will still arrive or leave,
just later or earlier) or a permanent difference, and which
forecast assumption caused it. End with the one assumption I
should change for future weeks.

An illustrative answer after week 1: "Receipts were $6,800 below forecast. $5,900 is Client D's invoice, which the forecast placed in week 1 but has not yet been paid; this is timing and should move to week 2 or 3, consistent with Client D's 30 to 47 day range. $900 is a permanent difference: a credit note issued to Client B on Tuesday. Suggested change: place Client D's receipts at the later end of its range until two consecutive invoices are paid on time." That kind of explanation takes a person 20 minutes with two spreadsheets open. The AI does it in one, and the person just decides whether to accept the change.

How accurate the forecast became in six weeks

Judge the forecast by one number: how far each week's actual closing cash landed from the figure forecast a week earlier. The agency's first six weeks (illustrative):

WeekForecast a week aheadActual closingDifferenceMain cause
193,00086,200−7.3%Client D paid late
294,60091,300−3.5%Unplanned laptop replacements
392,30092,850+0.6%None significant
471,85070,200−2.3%Holiday pay higher than assumed
570,20070,850+0.9%None significant
681,35082,800+1.8%Client C paid after a chase

After week 1, every miss was under 5%, and the causes shifted from "we assumed the wrong payment timing" to one-off events nobody could have predicted. That's the sign the forecast is working: the errors that remain are genuine surprises, not faulty assumptions. The figures from week 5 onwards also show the plan working: the new client agreed 14-day terms in week 2, its payments started arriving in week 5, and the week-9 hole disappeared from the forecast. Keep a simple table like this at the bottom of the sheet; after two months it tells you which rows to trust and which to treat with caution.

Two other businesses, two different shapes of forecast

An engineering consultancy with retentions. An illustrative consultancy bills design work monthly, but some clients hold back a retention (a percentage of each invoice kept until the project is finished). Those retentions appear in the forecast only when the release date is agreed. The AI's useful job here is listing every retention outstanding by project with its expected release date from the contract terms, because otherwise they're forgotten until someone asks why cash is lower than billing suggests.

A law firm with completion-driven receipts. An illustrative law firm's receipts arrive in lumps when matters complete, so the "largest clients" rows are replaced by "matters expected to complete in this week", each with a probability. A matter at 90% likely goes in at full value; one at 50% goes in a separate "possible" row that's excluded from closing cash. The AI can maintain that list from the matter pipeline, but only the fee earners know which dates are real.

Tools that produce a 13-week view for you

If the spreadsheet becomes a burden, several tools build part of this automatically. Float offers a 13-week rolling view that works week by week from your connected Xero or QuickBooks Online data. QuickBooks help describes an AI-assisted 13-week forecast in Intuit Enterprise Suite, its product for larger businesses, which uses 18 months to 2 years of past data. Xero's cash flow projections run for 30, 60 or 180 days depending on plan. The comparison in AI cash flow forecasting tools for small businesses covers what each does and costs. All of them still need you to correct the timing on your slow payers; that part never automates itself.

Where 13-week forecasts go wrong

  • Receipts on terms, not on behaviour. The most common error by far, and the one Step 3 fixes.
  • Payroll taxes on the pay date. They usually leave on a different date, sometimes in a different month. Put them on their real dates.
  • Forgetting to roll forward. A forecast updated monthly has become a monthly forecast. Put the Monday half-hour in the calendar.
  • Hand-typed totals. One pasted number instead of a formula breaks every later week. Ask the AI to list every cell in the totals rows that isn't a formula.
  • Treating it as a target. The forecast shows what will happen if nothing changes. Its job is to make you change something, as it did for the agency.

If slow payers are what keep denting your forecast, chasing late payments with reminders that sound human and predicting late payers before they're late tackle the receipts side directly.

13-week forecast questions

Why 13 weeks rather than a monthly forecast?

Thirteen weeks is one quarter, short enough to predict individual receipts and payments with reasonable accuracy and long enough to see a squeeze coming in time to act. Monthly forecasts hide the pinch points: a month can end with cash in hand while the second week, when payroll and rent both fall, dips below zero.

How accurate should a 13-week forecast be?

Aim for the next four weeks to land within about 5 to 10% of actual closing cash, with weeks further out less precise. Accuracy improves each time you roll it forward and adjust the timing assumptions. If week one keeps missing by a wide margin, the problem is usually receipts timing or payments nobody told you about.

Can my accounting software produce this for me?

Partly. Some tools project cash from your invoices, bills and bank history, and a few offer a 13-week weekly view. They save data entry, but they still assume what you tell them about timing. The judgement calls, such as when a slow client will really pay or which payment can move, stay with you.

Further reads

Sources: Float product information (13-week rolling view); QuickBooks help (AI-assisted 13-week cash flow forecast in Intuit Enterprise Suite, using 18 months to 2 years of history); Xero cash flow pages (projection lengths by plan). Business figures are illustrative.

Want a 13-week cash forecast you'll actually keep up?

On a 1:1 call we'll pull your real inputs together, build the weekly layout around your payment patterns, and set up a short weekly routine, with AI doing the timing and variance work.

Book a 1:1 call with me