Late payment feels like bad luck. It arrives one invoice at a time, each with its own excuse, and so it is hard to see as anything but a run of separate annoyances.

Put two years of invoices in one table and it stops looking like luck. A few customers account for most of it. Certain kinds of invoice are reliably slow. Certain weeks of the year are worse. None of that needs machine learning to find. It needs a spreadsheet and an hour.

Step one: build the table

Export every invoice you have sent from your accounting software. You need at least:

  • customer
  • invoice date
  • due date
  • date actually paid
  • amount

Add one calculated column: days late, which is the paid date minus the due date. Negative numbers are early payers. Leave unpaid invoices out of the averages for now, but keep a note of them.

If you have fewer than about fifty paid invoices, the patterns will be too thin to trust. Keep collecting and come back.

Step two: look before you calculate

Sort by days late, largest first, and read down the top twenty rows. Do the same names recur? Are the amounts large or small?

Then make three small summaries. A pivot table does each in a minute.

By customer. Average days late and number of invoices. You will almost certainly find that a small group is responsible for most of the lateness. In many small businesses, two or three customers account for well over half.

By size. Group invoices into bands, small, medium and large by your own standards, and compare. Large invoices are often slower, because they need more signatures at the other end.

By month. Average days late by the month the invoice fell due. August, December and the end of a customer's financial year are common troughs.

Already you know more than most businesses do about their own cash.

Step three: beware small numbers

Before acting on any of it, apply one check that separates analysis from superstition.

A customer with two invoices, one of them forty days late, has an average of twenty days late. That tells you almost nothing. A customer with thirty invoices averaging twenty days late is telling you something reliable.

So read the count alongside every average. A sensible rule of thumb: do not label a customer a slow payer on fewer than five invoices. And look at the median as well as the average, because one invoice that took two hundred days because of a dispute will distort an average for years.

Step four: a simple score

If you want to go a step further, you can turn the patterns into a rough prediction for each new invoice. This is the same idea a bank's credit model uses, in miniature.

Give each new invoice points:

Signal Points
Customer's median is more than 14 days late 3
Customer's median is 1 to 14 days late 1
New customer, no history 1
Invoice is in your largest size band 1
Falls due in one of your slow months 1

Add them up. Zero or one is low risk, two or three is medium, four or more is high.

Now test it against your own history, which is the step people skip. Apply the scoring to last year's invoices, using only what you would have known at the time, and see whether the high-scoring ones really were later. If they were, the score is useful. If not, adjust the points or drop a signal. A score you have not checked against the past is a guess with a table round it.

If you are comfortable with statistics, a logistic regression on the same columns will estimate the weights for you instead of you choosing them. With a few hundred invoices, the hand-made score usually does about as well, and you can explain it.

Step five: use it

A prediction is only worth having if it changes what you do. Four things it can change.

Terms. For customers who are reliably slow, shorten the terms or ask for part payment up front on the next job. You now have figures to explain why, if you choose to share them.

Timing of reminders. High-risk invoices get a friendly note a few days before the due date. Low-risk ones do not need it.

Cash planning. Stop forecasting your bank balance from due dates. Forecast from each customer's usual behaviour: if a customer habitually pays twenty days late, plan on that.

Who you work for. Sometimes the table shows that your largest customer is also your most expensive one, once you count the weeks you spend financing their business. That is worth knowing before the next negotiation.

What the data will not tell you

It describes the past. A customer with a perfect record can run into difficulty next month, and a new customer has no record at all.

It also cannot tell you why. Much late payment has nothing to do with unwillingness: the invoice went to the wrong address, lacked an order number, or missed the customer's monthly payment run by a day. If one customer is always exactly twenty-eight days late, the likeliest explanation is that they pay once a month and your invoices arrive just after the cut-off. Sending them a week earlier may solve what looked like a character flaw.

So when the table points at someone, the next step is a conversation, not a judgement. Ask how their payment process works. Half the time, the fix is on your side and costs nothing.

General information for small businesses, not legal or financial advice.