Analistable

Which invoices are more than 30 days overdue?

By the Analistable team · Updated · 3 min read

Sum payments per invoice, subtract from the invoice total to get the balance, and calculate days overdue = today − due date. Keep invoices with a balance above zero; filter those more than 30 days overdue for chasing. On 7 October, only INV-302 (Hart & Co, 600 outstanding, 38 days overdue) qualifies.

Part of our guide: How to answer questions across multiple spreadsheets

The data

Invoices and payments
InvoiceCustomerDueTotalPaid
INV-301Bakery Lune2026-08-15480480
INV-302Hart & Co2026-08-301200600
INV-303Nordic Supply2026-09-203500
INV-305Kiln Studio2026-10-012200

In a spreadsheet

Paid         =SUMIFS(Payments[Amount], Payments[Invoice], [@Invoice])
Balance      =[@Total] - [@Paid]
Days overdue =MAX(0, TODAY() - [@Due])
Bucket       =IF([@Balance] <= 0, "Paid", IF([@[Days overdue]] > 60, "60+", IF([@[Days overdue]] > 30, "31–60", "0–30")))

In SQL

SELECT i.invoice, i.customer, i.due, i.total,
       COALESCE(SUM(p.amount), 0) AS paid,
       i.total - COALESCE(SUM(p.amount), 0) AS balance,
       CAST(julianday('2026-10-07') - julianday(i.due) AS INTEGER) AS days_overdue
FROM invoices i
LEFT JOIN payments p ON p.invoice = i.invoice
GROUP BY i.invoice
HAVING balance > 0
ORDER BY days_overdue DESC;
Result
invoicecustomerduetotalpaidbalancedays_overdue
INV-302Hart & Co2026-08-30120060060038
INV-303Nordic Supply2026-09-20350035017
INV-305Kiln Studio2026-10-0122002206

Add AND days_overdue > 30 to keep only INV-302. The full list is an aged-debt report; group balances by bucket for the summary.

Watch out for

  • Payments recorded against the customer rather than the invoice — allocate them first, or the invoice looks unpaid.
  • Credit notes: subtract them from the balance like payments.
  • Use the due date, not the invoice date, unless your terms say otherwise.

Ask it in Analistable: “Which invoices are more than 30 days overdue, and how much does each customer owe in total?” Matching the payments in the first place: matching Stripe payments to invoices.

In Google Sheets

=FILTER(A2:E, E2:E > 0, TODAY() - C2:C > 30)

With invoice, customer, due date, total and balance in columns A–E, this lists open invoices more than 30 days past due.

The aged-debt summary for the example

Outstanding balances on 7 October
BucketInvoicesBalance
0–30 daysINV-303, INV-305570
31–60 daysINV-302600
60+ days—0
Total31170
SELECT CASE WHEN days_overdue > 60 THEN '60+'
            WHEN days_overdue > 30 THEN '31-60'
            ELSE '0-30' END AS bucket,
       COUNT(*) AS invoices, SUM(balance) AS balance
FROM open_invoices
GROUP BY bucket;

Here open_invoices is the result of the query above. INV-301 is fully paid and drops out. The bucket totals must add up to the total outstanding: 350 + 220 + 600 = 1,170.

Use a report date, not TODAY()

TODAY() recalculates every time the file opens, so last month's aged-debt report changes when you reopen it. Put the report date in a cell (for example Report!B1 = 07/10/2026) and calculate =MAX(0, Report!$B$1 - [@Due]). The numbers then stay reproducible and you can rerun any past month by changing one cell.

Troubleshooting

Common problems
SymptomCauseFix
Paid invoice still listedPayment reference uses a different format (302 vs INV-302)Normalise references before SUMIFS
Negative balanceOverpayment or payment applied to the wrong invoiceReview and reallocate
Days overdue in the thousandsDue date blank, treated as 0Flag missing due dates separately
Customer total differs from the ledgerCredit notes not includedSubtract credit notes like payments

Monthly routine

  • Export invoices and payments to the same report date, refresh the join and save the bucket summary.
  • Sort the 31–60 and 60+ lists by balance and chase the largest first.
  • Compare the total outstanding with your ledger's receivables balance; a difference means unallocated payments or missing invoices — see reconciling a bank statement with the general ledger.

Frequently asked questions

How do I find overdue invoices in Excel?
Calculate each invoice's balance (total − SUMIFS of payments) and days overdue (TODAY() − due date), then filter balance > 0 and days > 30.
How do I build an aged debt report?
Put each open invoice into a bucket (0–30, 31–60, 60+ days) and sum balances per bucket and customer.
What about part-paid invoices?
Summing payments per invoice handles them: the balance is what's still outstanding.
Should I use TODAY() in the report?
Use a fixed report date in a cell instead, so a saved report keeps its numbers when reopened.
How do I total the debt per customer?
Group the open invoices by customer and sum the balance, optionally per ageing bucket.
What if a payment covers several invoices?
Split it across the invoices it pays before joining, or allocate it to the oldest invoices first if your policy allows.

Related guides