Why every month-end starts with the AP ageing
It is the last day of June. The CFO wants to know how much the company owes its suppliers, how much of it is already late, and which vendor is about to put the account on credit hold. The answers are not in the general ledger, which only shows one accounts payable balance. They are in the invoice register, the list of every open supplier invoice, and in the report built from it: the AP ageing.
This free lesson is for accounts payable clerks and team leads, junior accountants, controllers in small and mid-sized companies, finance students and anyone who has been handed a messy export from the ERP and asked "how late are we?". You will age a real-looking register for Kestrel Outdoor Gear Inc. at 30 June 2026, the same twelve invoices as in the lab above, and see exactly which formula produces which number.
After reading you will know how payment terms turn into due dates, why days past due must never be negative, how to sort invoices into ageing buckets with IFS (or LOOKUP in older Excel), how to total the buckets with SUMIF, how to prove the report is complete, and how to read the result as a manager rather than as a list of numbers.
The core concept: from invoice date to ageing bucket
Every open invoice carries three facts that matter for ageing: the invoice date, the payment terms and the amount. Terms such as Net 30 mean the invoice is due 30 days after the invoice date. Some companies count from the date the invoice was received or from the end of the month instead; whatever your contracts say, the register should use one consistent rule. In this course, due date = invoice date + terms.
Next comes the as-of date, normally the last day of the month you are reporting. Comparing it with the due date gives the days past due. An invoice that is not yet due is simply not late, so its days past due are 0, not a negative number. Finally, each invoice is placed in a bucket: Current (not yet late), 1-30 days, 31-60 days, 61-90 days and over 90 days late. Bucket totals show at a glance how the liability is spread over time.
- Due date = invoice date + terms, in Excel
=C2+D2, because Excel stores dates as serial day numbers. - Days past due = as-of date − due date, floored at 0:
=MAX(0,$B$15-F2). - Bucket = the first range the days fall into, with the upper border included: 30 days late is still 1-30.
- Check: the bucket totals must add up to the register total. If they do not, an invoice is missing or mislabelled.
Why does management care? A healthy payables book is mostly current. Invoices in the higher buckets often point to a broken process rather than a lack of cash: an invoice waiting for approval in someone's inbox, a disputed price, goods that were never received, or a duplicate that should not be paid at all. Late payments can also cost money through lost early-payment discounts, late fees where contracts allow them, and suppliers who shorten your terms or ask for prepayment.
Worked example: Kestrel Outdoor Gear at 30 June 2026
Here is Kestrel's complete register after the lab is solved. Columns A to E are given; F is =C2+D2, G is =MAX(0,$B$15-F2) and H is the bucket formula, each copied down to row 13. The as-of date 30 Jun 2026 sits in B15.
| Invoice | Vendor | Invoice date | Terms | Amount USD | Due date (F) | Days past due (G) | Bucket (H) |
|---|---|---|---|---|---|---|---|
| INV-4101 | Alder Packaging | 12 Jun 2026 | 30 | 4,820.00 | 12 Jul 2026 | 0 | Current |
| INV-4102 | Brookline Freight | 20 May 2026 | 30 | 1,265.40 | 19 Jun 2026 | 11 | 1-30 days |
| INV-4103 | Cobalt Steel Supply | 2 Apr 2026 | 45 | 18,940.00 | 17 May 2026 | 44 | 31-60 days |
| INV-4104 | Dune Textiles | 1 Jun 2026 | 60 | 7,310.25 | 31 Jul 2026 | 0 | Current |
| INV-4105 | Ember Electrics | 10 Mar 2026 | 30 | 2,980.00 | 9 Apr 2026 | 82 | 61-90 days |
| INV-4106 | Fjord Plastics | 31 May 2026 | 30 | 5,640.80 | 30 Jun 2026 | 0 | Current |
| INV-4107 | Granite Office Co. | 14 Feb 2026 | 30 | 865.50 | 16 Mar 2026 | 106 | Over 90 |
| INV-4108 | Harbor Logistics | 1 May 2026 | 30 | 3,412.00 | 31 May 2026 | 30 | 1-30 days |
| INV-4109 | Alder Packaging | 15 Apr 2026 | 30 | 6,150.00 | 15 May 2026 | 46 | 31-60 days |
| INV-4110 | Cobalt Steel Supply | 20 Jun 2026 | 45 | 12,780.00 | 4 Aug 2026 | 0 | Current |
| INV-4111 | Ember Electrics | 1 Apr 2026 | 30 | 1,940.60 | 1 May 2026 | 60 | 31-60 days |
| INV-4112 | Dune Textiles | 2 Mar 2026 | 30 | 4,275.00 | 1 Apr 2026 | 90 | 61-90 days |
Look at the borders. INV-4106 is due on 30 June itself, so on the as-of date it is not yet late: 0 days, Current. INV-4108 is exactly 30 days late and INV-4111 exactly 60, so they stay in 1-30 and 31-60. INV-4112 is exactly 90 days late, which is still 61-90. This is why the bucket formula must use <=; with < these three invoices jump into the next bucket and the report overstates how late Kestrel is. INV-4110 has 45-day terms and is not due until 4 August, so without MAX its days past due would be −35.
The bucket formula in H2 is =IFS(G2=0,"Current",G2<=30,"1-30 days",G2<=60,"31-60 days",G2<=90,"61-90 days",TRUE,"Over 90"). IFS tests the conditions from left to right and returns the first match, so G2<=60 only needs the upper border: anything 30 or less was already caught. The final TRUE is the catch-all for everything above 90. If you work in Excel 2016 or older, which has no IFS, =LOOKUP(G2,{0,1,31,61,91},{"Current","1-30 days","31-60 days","61-90 days","Over 90"}) gives the same result for whole days.
Then the summary. In B18 type =SUMIF($H$2:$H$13,A18,$E$2:$E$13) and copy it down to B22. The labels in A18:A22 must match the bucket texts exactly, which is why the lab asks you to use the same spelling.
| Bucket | Amount USD | Invoices | Share of total | Formula in column B |
|---|---|---|---|---|
| Current | 30,551.05 | 4 | 43.4% | =SUMIF($H$2:$H$13,A18,$E$2:$E$13) |
| 1-30 days | 4,677.40 | 2 | 6.6% | same, copied down |
| 31-60 days | 27,030.60 | 3 | 38.4% | same |
| 61-90 days | 7,255.00 | 2 | 10.3% | same |
| Over 90 | 865.50 | 1 | 1.2% | same |
| Total | 70,379.55 | 12 | 100% | =SUM(B18:B22) |
| Check | 70,379.55 | =SUM(E2:E13), must equal the total |
What does this tell Kestrel's CFO? More than half of the book, 39,828.50 or about 57%, is past due. The largest problem is the 31-60 bucket, and most of it is a single invoice: 18,940.00 from Cobalt Steel Supply, Kestrel's biggest supplier, which also has a 12,780.00 invoice coming due in August. That is the call to make today. The two invoices in 61-90 (Ember Electrics and Dune Textiles) and the small Granite Office invoice over 90 days should be checked for disputes or missing approvals: old, small invoices are often stuck rather than unaffordable. A useful single number is the amount-weighted average days past due, =SUMPRODUCT(E2:E13,G2:G13)/SUM(E2:E13), which is about 29 days for the whole book and about 52 days for the past-due invoices alone.
Keeping the ageing honest: as-of date, cut-off and the ledger
An ageing is only as good as the register behind it. Three habits make the report trustworthy. First, fix the as-of date. If you use TODAY() directly, the report changes every morning and last month's figures can no longer be reproduced. Keep the month-end date in one input cell, save a copy of the file with the close pack, and the numbers stay the same when the auditor asks about them in three months.
Second, respect cut-off. The register at 30 June should contain every invoice for goods and services received up to 30 June that has been entered, and nothing that belongs to July. Invoices that arrive in the first days of July for June deliveries are a classic gap; until they are posted, they are covered by an accrual for goods received not invoiced, which is exactly what lab 8 of this course builds.
Third, reconcile to the general ledger. The register total, 70,379.55 for Kestrel, must agree with the balance of the accounts payable control account on the same date. Differences usually come from manual journals posted straight to the control account, payments that were recorded in the bank but not matched to invoices, or credit notes kept outside the system. Note each reconciling item and its owner. A clean ageing with an unexplained difference to the ledger is not finished.
How to do it in Excel, step by step
These steps work in Excel for Microsoft 365 and Excel 2021 on Windows and Mac (use Cmd for Ctrl on a Mac where noted). Start from an export of open invoices from your ERP or accounting system.
- Clean the export. Make sure invoice dates are real dates, not text: a right-aligned value is usually a date, a left-aligned one is text. Fix text dates with Data > Text to Columns > Finish or
=DATEVALUE(). Format the column with Ctrl+Shift+#. - Turn the range into a table. Click inside the data and press Ctrl+T. Formulas then fill down automatically and the summary picks up new rows next month.
- Put the as-of date in its own cell. Type 30/06/2026 (or 6/30/2026, depending on your regional settings) in B15, or use
=EOMONTH(TODAY(),-1)for "last month-end". Never type the date into each formula. - Calculate the due date. In F2 type
=C2+D2and format as a date. Double-click the fill handle to copy it down. - Calculate days past due. In G2 type
=MAX(0,$B$15-F2). Press F4 after selecting B15 in the formula to add the dollar signs, so the reference stays fixed when copied. If Excel shows a date instead of a number, set the format to General with Ctrl+Shift+~. - Assign the bucket. In H2 type the IFS formula above, or the LOOKUP version in older Excel. Copy down.
- Build the summary. Type the five bucket labels in A18:A22, then
=SUMIF($H$2:$H$13,A18,$E$2:$E$13)in B18 and copy down. Add=COUNTIF($H$2:$H$13,A18)in a third column for the number of invoices. - Prove completeness. B23
=SUM(B18:B22)must equal B24=SUM(E2:E13). Add=B23-B24next to it and expect 0. - Chart it. Select A17:B22 (without the total), choose Insert > Charts > Clustered Column, or press Alt+F1 for an instant chart. Give it a title such as AP ageing at 30 Jun 2026.
- Highlight problem rows. Select A2:H13, choose Home > Conditional Formatting > New Rule > Use a formula, enter
=$G2>60and pick a light fill. The old invoices stand out for the review meeting.

Common mistakes and how to spot them
Ageing reports are simple, which is exactly why small errors survive for months. These are the ones reviewers find most often:
- Negative days past due.
=$B$15-F2without MAX gives −35 for INV-4110. Spot it: sort column G ascending; anything below 0 is wrong. - Reversed subtraction.
=F2-$B$15measures days until due, not days late. Spot it: the oldest invoices show the most negative numbers. - Wrong border operator. Using
<instead of<=moves invoices at exactly 30, 60 or 90 days into the next bucket. Spot it: test an invoice that is exactly 90 days late; it must say 61-90. - Relative as-of reference. Without the dollar signs the formula in G3 points at B16, an empty cell, and returns 0 for many rows. Spot it: suspiciously many invoices are "Current".
- Label mismatch. "1-30 Days" with a capital D, or a trailing space, still matches in SUMIF because SUMIF is not case-sensitive, but a trailing space or "1–30" with a dash does not. Spot it: the check line no longer agrees. Copy labels instead of retyping them.
- Ageing by invoice date instead of due date. Ageing from the invoice date makes every Net 60 invoice look late. Spot it: invoices with long terms appear in the late buckets before they are due.
- Text dates. A date imported as text gives
#VALUE!in the due-date column. Spot it:=ISTEXT(C2)returns TRUE. - Ignoring credit notes and part payments. If the register contains negative credit notes, they belong in a bucket too, or the totals are overstated. Spot it: the register total differs from the AP control account in the general ledger.
Quick reference: Excel functions and shortcuts used
| Function / shortcut | Syntax or keys | Use in the AP ageing |
|---|---|---|
| Date arithmetic | =C2+D2 | Due date = invoice date + terms |
| MAX | =MAX(0,$B$15-F2) | Days past due, never negative |
| IFS | =IFS(G2=0,"Current",G2<=30,"1-30 days",…,TRUE,"Over 90") | Ageing bucket (Excel 2019 and later) |
| LOOKUP | =LOOKUP(G2,{0,1,31,61,91},{…}) | Bucket in older Excel |
| SUMIF | =SUMIF($H$2:$H$13,A18,$E$2:$E$13) | Amount per bucket |
| COUNTIF | =COUNTIF($H$2:$H$13,A18) | Invoices per bucket |
| SUMIFS | =SUMIFS($E$2:$E$13,$B$2:$B$13,"Cobalt Steel Supply",$H$2:$H$13,"31-60 days") | Amount per vendor and bucket |
| SUMPRODUCT | =SUMPRODUCT(E2:E13,G2:G13)/SUM(E2:E13) | Weighted average days past due |
| EOMONTH | =EOMONTH(TODAY(),-1) | Last month-end as the as-of date |
| Create table | Ctrl+T | Auto-filling formulas |
| Absolute reference | F4 | Lock the as-of date |
| Date / General format | Ctrl+Shift+# / ~ | Show dates or day counts |
| Quick chart | Alt+F1 | Ageing column chart |
Real-world uses
The same register and buckets appear in many places in a finance team:
- Month-end close. The ageing is reconciled to the AP control account and filed with the close pack. A difference means an invoice was posted to the ledger but not to the sub-ledger, or the other way round.
- Cash planning. Treasury uses the current bucket and the due dates to forecast the next weeks' payments, and the past-due buckets to see how much catching up is required.
- Supplier management. Purchasing calls the vendors with the largest late amounts before they stop deliveries, as Kestrel should do with Cobalt Steel Supply.
- Audit and internal control. Auditors use old open invoices to look for unrecorded disputes, duplicate invoices and cut-off problems at year-end.
- Lender and investor reporting. Some loan agreements and investors ask for payables ageing as part of regular reporting, because stretched payables can signal a cash squeeze.
What you will build in the rest of this course
Lesson 1 is free. The labs that follow are part of the paid course and stay with Kestrel Outdoor Gear, so you follow one purchase-to-pay process from the order to the month-end accrual:
Lesson 2: Three-Way Match with Price & Quantity Tolerances. You match ten purchase-order lines against goods receipts and supplier invoices, flag quantity and price holds with tolerances and work out how much can be released for payment.
Lesson 3: Duplicate Invoice Detection: Clean Keys, Running Counts & Near-Duplicates. You clean 14 invoice numbers, mark every repeat of an invoice already in the list, find near-duplicates with ROUND and LEFT and total the value to stop before it is paid twice.
Lesson 4: Early-Payment Discounts: 2/10 Net 30, Annualised Cost & Take or Skip. You annualise eight discount offers, compare them with Kestrel's 12.5% credit line and decide which ones are worth taking.
Lesson 5: The Payment Run: Due-Date Window, Discounts, Holds & the Cash Limit. You build the weekly payment proposal for Friday 3 July 2026: what to pay now, the amount after discount, the running total and what fits into USD 30,000 of cash.
Lesson 6: DPO & AP Turnover: How Long Kestrel Takes to Pay. You calculate average payables, AP turnover and days payable outstanding for five years and translate the change in DPO into cash.
Lesson 7: Vendor Master Checks: Missing Tax IDs, Bank-Detail Changes & Shared Accounts. You review the vendor master for the classic fraud warning signs and decide which vendors must be blocked.
Lesson 8: Month-End: Accruing Goods Received Not Invoiced (GRNI). You value what Kestrel received in June but has not been billed for, total the accrual by account, book the entries and chart them.
The full course is a one-time purchase of $9.90. Finish all 20 labs and the final exam to earn the Tabellab Certified AP Analyst certificate.
Summary
An AP ageing turns the invoice register into a management report in four formulas: due date =C2+D2, days past due =MAX(0,$B$15-F2), a bucket with IFS and <= borders, and bucket totals with SUMIF, closed by a check that the buckets add up to the register. For Kestrel, 70,379.55 is open at 30 June 2026, about 57% of it past due, with one large Cobalt Steel invoice driving the 31-60 bucket.
Now scroll up and try the lab: calculate the days past due, assign the buckets, total them and chart the ageing. The Coach checks every formula, including the tricky invoice that is exactly 90 days late.
Frequently asked questions
What is an accounts payable ageing report?
It lists all unpaid supplier invoices on a given date and groups them by how many days they are past their due date, usually Current, 1-30, 31-60, 61-90 and over 90 days. It shows how much a company owes and how late it is paying.
How do I calculate days past due in Excel?
Subtract the due date from the as-of date and floor the result at zero: =MAX(0,$B$15-F2). The MAX stops invoices that are not yet due from showing negative days.
How do I calculate a due date from payment terms in Excel?
Add the number of days in the terms to the invoice date, for example =C2+D2 for Net 30 with 30 in D2. Excel stores dates as day numbers, so simple addition works; format the result as a date.
How do I create ageing buckets in Excel?
Use IFS with the upper border included, for example =IFS(G2=0,"Current",G2<=30,"1-30 days",G2<=60,"31-60 days",G2<=90,"61-90 days",TRUE,"Over 90"). In older Excel versions a LOOKUP with the lower borders {0,1,31,61,91} does the same.
Does an invoice that is exactly 30 days late belong in 1-30 or 31-60?
It belongs in 1-30 days, because the bucket includes its upper border. That is why the bucket formula uses <= rather than <.
How do I check that my AP ageing is complete?
The sum of all bucket totals must equal the total of the invoice register, and the register total should agree with the accounts payable control account in the general ledger.
Keep going: Accounts Payable & Purchase-to-Pay: Three-Way Match, Duplicates & Payment Runs
This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time CHF 9.90.
- Three-Way Match with Price & Quantity Tolerances
- Duplicate Invoice Detection: Clean Keys, Running Counts & Near-Duplicates
- Early-Payment Discounts: 2/10 Net 30, Annualised Cost & Take or Skip
- The Payment Run: Due-Date Window, Discounts, Holds & the Cash Limit
- DPO & AP Turnover: How Long Kestrel Takes to Pay
- Vendor Master Checks: Missing Tax IDs, Bank-Detail Changes & Shared Accounts
- Month-End: Accruing Goods Received Not Invoiced (GRNI)
- Credit Notes & Debit Balances: Ageing Unapplied Credits and Netting per Vendor
- Supplier Statement Reconciliation: Payments in Transit, Missing Invoices & the Unexplained Difference
- Invoice Arithmetic Checks: Recalculating Tax, Freight & Totals Before Payment
- Invoice Cycle Time & PO Compliance: Working Days to Approve, SLA Share & Non-PO Spend
- Clearing the Hold Queue: Days on Hold, Discounts Lost & Holds by Reason
- Foreign-Currency Invoices: Booking Rate, Payment Rate & Realised FX Gains and Losses
- Paid Early, On Time or Late: Payment Timing and the Cost of Cash Paid Too Soon
- Harmonising Payment Terms: Spend-Weighted Terms, Moving to Net 60 & the Cash Released
- Payment File Control Totals: Record Count, Amount Total, Hash Total & Line Checks
- Reconciling the AP Sub-Ledger to the GL Control Account: Timing Items, Mispostings & the Correcting Entry
- AP Performance Trend: Cost per Invoice, First-Pass Match Rate & Invoices per FTE
- Final Project: the Month-End AP Dashboard for the CFO