Date & Time

DAYS Formula

DAYS returns the number of days between two dates as a simple integer. Unlike direct date subtraction which can sometimes produce formatting issues, DAYS always returns a clean number, making it clear and intentional that you want a day count.

Syntax

DAYS(end_date, start_date)
ParameterDescription
end_date Parameter of the DAYS function.
start_date Parameter of the DAYS function.
Try DAYS in Viztab — free, no signup

Examples

Days between dates

Formula
=DAYS("2026-12-31", "2026-01-01")
Returns 364 — the number of days from January 1 to December 31, 2026.

Days until deadline

Formula
=DAYS(B2, TODAY())
If B2 contains a future deadline date, returns the number of days remaining. Negative result means the deadline has passed.

Age in days

Formula
=DAYS(TODAY(), A1)
If A1 contains a birth date, returns the person's age in days. Divide by 365.25 for approximate age in years.

Common Errors

#VALUE!

Occurs when either argument is not a valid date or cannot be interpreted as a date.

Tips

Argument order matters

DAYS(end, start) — end date first, start date second. If you reverse them, you get a negative number. This is the opposite of DATEDIF's order.

Same as subtraction

=DAYS(B1, A1) gives the same result as =B1-A1. DAYS is more readable and explicitly communicates intent.

For workdays only, use NETWORKDAYS

DAYS counts all calendar days including weekends and holidays. For business days only, use NETWORKDAYS instead.

Try DAYS in Viztab

Import your data and use DAYS with 370+ other formulas. No signup required.

Open Viztab

Related Formulas