The fastest way: simple subtraction
With a start date in A1 and an end date in B1:
That's it, this returns the number of days between them. The one catch: format the result cell as a plain number, not a date, or the spreadsheet will try to display a day count as if it were a calendar date, which looks like nonsense.
A years/months/days breakdown with DATEDIF
For a readable breakdown instead of a raw day count, use DATEDIF with three separate formulas:
=DATEDIF(A1,B1,"YM") ← remaining whole months
=DATEDIF(A1,B1,"MD") ← remaining days
Combine them into one readable line with text concatenation:
"MD" unit specifically has known edge-case bugs around month-end dates. It's fine for most everyday date ranges, but if you're building something that needs to be reliable at every month boundary, don't lean on "MD" alone, cross-check the result.Counting business days with NETWORKDAYS
To count business days instead of calendar days:
This excludes Saturdays and Sundays automatically and counts both the start and end date if they fall on weekdays. To also exclude a list of holidays, add a third argument pointing to a range of holiday dates:
Lock that holiday range with dollar signs so it doesn't shift if you copy the formula down a column.
A note on Excel's undocumented DATEDIF
DATEDIF won't show up in Excel's autocomplete or formula wizard when you start typing it, it's a legacy function kept for compatibility with Lotus 1-2-3 and Microsoft has never fully documented it. That doesn't mean it's broken, type it manually with all three arguments and it works correctly in every current version of Excel, including Excel for the web. Google Sheets documents it normally with no such quirk.
When the calculator is faster
For a one-off check, typing a formula into a spreadsheet is often slower than just using a purpose-built tool. The Days Between Two Dates Calculator and Business Days Calculator on this site give you the same numbers instantly, with no formula syntax to remember.
Frequently asked questions
What is the formula for days between two dates in Excel?
The simplest formula is plain subtraction: with a start date in A1 and an end date in B1, =B1-A1 returns the number of days between them. Just make sure the result cell is formatted as a number, not a date, or it will display as a date instead of a day count.
How do I get a years, months, and days breakdown in a spreadsheet?
Use DATEDIF with three separate formulas: =DATEDIF(A1,B1,"Y") for whole years, =DATEDIF(A1,B1,"YM") for the remaining whole months, and =DATEDIF(A1,B1,"MD") for the remaining days. Combine them with text concatenation to get a single readable string, or keep them in separate cells.
Sources
- LearnExcel.io, Excel Date Functions Cheat Sheet
- Microsoft Support, NETWORKDAYS function (official documentation)