Arte SheetsLearn. Try. Understand.

Dates and reporting

DAYS function: count elapsed calendar days between two dates

Calculate exact calendar days between an issue date and settlement date, remember that end_date comes first, and interpret negative results for early settlements.

Invoice settlement vs due-date variance

An invoice issued on 1 April 2026 (serial 46113 in B2) is due on 15 April 2026 (serial 46127 in C2) and settled on 19 April 2026 (serial 46131 in D2).

Invoice (A)Issued (B)Due (C)Settled (D)
INV-712026-04-01 (46113)2026-04-15 (46127)2026-04-19 (46131)

Put end_date first and start_date second

Unlike DATEDIF or NETWORKDAYS (which start with start_date), DAYS(end_date, start_date) subtracts the second date from the first: =DAYS(D2, B2) computes 46131 - 46113 = 18 elapsed calendar days.

Comparing Settled against Due—=DAYS(D2, C2)—returns 4 days late.

=DAYS(D2,B2)

Early payments return negative days

Unlike DATEDIF (which errors with #NUM! when dates are reversed), DAYS simply returns a negative number. Change D2 to 12 April 2026 (serial 46124) and =DAYS(D2, C2) evaluates to -3, showing the invoice was paid 3 days early.

=DAYS(D2,C2)

Try the example

Use the original values or change them to test your understanding.

Further reading