Dates function

DAYS

How many days between two dates.

Purpose

Count the days between two dates

Returns

A number: how many days lie between them

Syntax

=DAYS(end, start)

ArgumentRequiredWhat goes here
endRequiredThe later date, which goes first here.
startRequiredThe earlier date, which goes second.

How to use DAYS

DAYS takes the later date first and the earlier one second, which is the opposite of the order they appear in a sentence and the usual reason the answer comes back negative.

Subtracting one date from another does the same thing and reads more naturally. DAYS is worth writing when the two dates come from far apart in a formula and the order needs to be obvious.

This is the whole of ageing: how long between the date on the invoice and the date the schedule is drawn up. Everything else is banding that number.

Examples

Every result below is worked out by the same evaluator that marks your answers, on the sheet shown here.

Receivables ageing — October.xlsxSheet1
A receivables schedule with its reporting date above the data, the layout a real ageing uses
ABCDE
1Reporting date2026-10-31
2
3InvoiceInvoice dateTerms (days)AmountCustomer
4INV-90012026-07-14301200Calder Utilities
5INV-90022026-08-2930640Brightwell Paper
6INV-90032026-09-03453100Meridian Freight
7INV-90042026-09-3014455Thornbury Print
8INV-90052026-10-12302080Calder Utilities
9INV-90062026-10-2760725Ashgrove Catering
FormulaResult
=DAYS(B1,B4)From the invoice date to the reporting date. This is the age of the debt.109
=B1-B4The same answer, written as a subtraction. Most schedules are written this way.109
=DAYS(B4,B1)The arguments the wrong way round. Negative days are how you find out you did it.-109
=DAYS(B1,B4)-C4Days past due rather than days old, by taking the agreed terms off the age.79

Notes

  • DAYS counts calendar days, not working days.
  • The result is a plain number, so it bands with IFS and totals with SUMIF like any other figure.
Practise DAYS in Unit 24

A reference tells you what it does. A unit makes you use it.