# How to group invoices into aging buckets in Excel

Work out the days past due once with LET, then pick the bucket with IFS: `=LET(days,$G$1-B2,IFS(days<=0,"Current",days<=30,"1-30",…,TRUE,"Over 90"))`.

**Excel:** `=LET(days,$G$1-B2,IFS(days<=0,"Current",days<=30,"1-30",days<=60,"31-60",days<=90,"61-90",TRUE,"Over 90"))` (Excel 2021, 2024 and Microsoft 365)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- |
| Invoice | Due date | Amount | Aging |  | As of | 2026-10-31 |
| INV-301 | 2026-11-15 | 1200 |  |  |  |  |
| INV-302 | 2026-10-20 | 850 |  |  |  |  |
| INV-303 | 2026-09-30 | 2300 |  |  |  |  |
| INV-304 | 2026-08-15 | 640 |  |  |  |  |
| INV-305 | 2026-06-30 | 1975 |  |  |  |  |
| INV-306 | 2026-10-01 | 410 |  |  |  |  |
| INV-307 | 2026-08-02 | 560 |  |  |  |  |

Formula in D2, filled to D8: `=LET(days,$G$1-B2,IFS(days<=0,"Current",days<=30,"1-30",days<=60,"31-60",days<=90,"61-90",TRUE,"Over 90"))`

Result: Current; 1-30; 31-60; 61-90; Over 90; 1-30; 61-90

## How it works

LET calculates the days past due once and names it `days`. IFS returns the label for the first test that is true, so the tests run from the smallest bucket up: an invoice 31 days late fails the first two and lands in 31-60, and one exactly 90 days late is still 61-90.

## Other ways

- `=XLOOKUP($G$1-B2,{0,1,31,61,91},{"Current","1-30","31-60","61-90","Over 90"},"Current",-1)`: Looks the days up in a bucket table, where each number is the start of a bucket. Keep the table in cells to change the buckets easily.
- `=IF($G$1-B2<=0,"Current",IF($G$1-B2<=30,"1-30",IF($G$1-B2<=60,"31-60",IF($G$1-B2<=90,"61-90","Over 90"))))`: Nested IF for versions without IFS and LET.

## Common mistakes

- Check the boundaries: exactly 30 days belongs in 1-30 here, because the test is `<=30`.
- Labels like "31-60" sort as text in pivot tables. Prefix them ("1. Current", "2. 1-30") to keep them in order.
- Paid invoices should drop out. If the payment date is in its own column, test it first: `IF(paid<>"","Paid",…)`.

## Questions

**How do I total each bucket?**

`=SUMIFS(C2:C8,D2:D8,"31-60")`, or a pivot table on the Aging column.

**Should I age from the invoice date or the due date?**

Both are common. From the due date, as here, shows days past due; from the invoice date shows the age of the invoice.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/aging-buckets-for-invoices
