Find the number of days between a start and end date by subtracting.
Copy this formula
=B2-A2Excel stores dates as serial numbers, so subtracting one date from another gives the day count. Format the result cell as Number (not Date) to see the count.
=DATE(2026,1,31)-DATE(2026,1,1)→3030 days between Jan 1 and Jan 31.
=TODAY()-A2→45Days elapsed since the date in A2.
=DAYS(DATE(2026,1,31), DATE(2026,1,1))→30DAYS returns the same result; note that the end date comes first.
Whole months / years
=DATEDIF(A2, B2, "m")Use "m" for months or "y" for years.
Excel inherited the date format. Change the cell's number format to General or Number.
No. B2-A2 counts the nights between them. Add 1 to include both days: =B2-A2+1.
At least one date is stored as text. Use =DATEVALUE(A2) to convert it, or re-enter the date.
Use =NETWORKDAYS(A2, B2), which skips Saturdays and Sundays.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.