Formula Fixer

Days between dates in Excel or Sheets

Updated 2026-12-04

TL;DR: To count the days between two dates in Excel or Google Sheets, subtract the start from the end (=B2-A2) and format the result as a number. Use DATEDIF for years or months, and NETWORKDAYS if you only want working days.

Days between two dates

=B2 - A2

Format the result as a number, not a date.

Working days

=NETWORKDAYS(A2, B2, holidays_range)

Counts Monday to Friday, including both start and end dates. Use NETWORKDAYS.INTL for other weekend patterns.

Age in years

=DATEDIF(A2, TODAY(), "Y")

DATEDIF units: "Y" years, "M" months, "D" days, "YM" months after whole years, "MD" days after whole months. DATEDIF works in Excel even though it is not in the function list, and it works in Google Sheets. The start date must be earlier than the end date or you get #NUM!.

Add days or months

Planning the rest of the year?

See working days left in 2026 for holiday lists, WORKDAY deadlines and custom weekends, or build a full 2027 calendar in Excel or Google Sheets.

Quick FAQ

How do I count the days between two dates in Excel? Subtract the start date from the end date (=B2-A2) and format the result as a number, not a date.

What is the Excel formula for days between dates? The simple one is =B2-A2. Use DATEDIF(A2,B2,"D") if you prefer a function, or NETWORKDAYS(A2,B2) to count only working days.

Does this work in Google Sheets? Yes. Subtraction, DATEDIF and NETWORKDAYS all work in Google Sheets as well as Excel.

Counting down to a date? See our countdown formula guide, including days until Christmas.

Need someone's age rather than days? See how to calculate age in Excel and Google Sheets.

Getting #VALUE! instead of a number of days? See how to fix the #VALUE! error.

Counting in weeks instead? See ISOWEEKNUM vs WEEKNUM for 2027.

Prefer a ready-made file?

Templates we sell: see all downloads and prices.

← More guides