Excel stores dates as numbers, so the days between two dates is simply the later one minus the earlier one: =C2-B2. Format the result cell as a number. For working days, without weekends and holidays, use NETWORKDAYS.
{"cells": {"A1": "Question", "A2": "Days", "A3": "Working days", "A4": "Complete months", "A5": "Days, both ends counted", "A8": "Start", "A9": "End", "B1": "Answer", "B2": "=B9-B8", "B3": "=NETWORKDAYS(B8,B9)", "B4": "=DATEDIF(B8,B9,\"M\")", "B5": "=B9-B8+1", "B8": 46023, "B9": 46112}, "focus": "B2", "formats": {"B8:B9": {"fmt": "date"}}, "note": "Change the start or end date."}
Calendar days
Subtract the dates. Add 1 if both the first and the last day should count.
=C2-B2Days from start to end.=TODAY()-B2Days since the date in B2.=C2-TODAY()Days left until the date in C2.Working days
NETWORKDAYS counts Monday to Friday, both ends included. Add a list of holidays as the third argument.
=NETWORKDAYS(B2, C2)Working days between the two dates.=NETWORKDAYS(B2, C2, $H$2:$H$20)Without the public holidays in H2:H20.Months and years
DATEDIF counts complete months or years.
=DATEDIF(B2, C2, "M")Complete months.=DATEDIF(B2, C2, "Y")Complete years.Common mistakes
- The result looks like a date
- The cell kept the date format. Change it to Number (Home → Number Format).
- #VALUE! error
- One of the dates is text. Check with
=ISNUMBER(B2)and convert it.
Frequently asked questions
Does NETWORKDAYS count the start date?
Yes, both the start and the end date. See NETWORKDAYS.
How do I add 30 days to a date?
=B2+30. For 30 working days: =WORKDAY(B2, 30).
How do I calculate someone's age?
See calculate age.