Days and Months Between Dates in Excel or Google Sheets

Every spreadsheet formula in this article works identically in Excel and Google Sheets unless noted otherwise. The fastest one is also the one most people skip past.

On this page
Skip the spreadsheet → Use the Days Between Two Dates Calculator

The fastest way: simple subtraction

With a start date in A1 and an end date in B1:

=B1-A1

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,"Y") ← whole years
=DATEDIF(A1,B1,"YM") ← remaining whole months
=DATEDIF(A1,B1,"MD") ← remaining days

Combine them into one readable line with text concatenation:

=DATEDIF(A1,B1,"Y")&" years, "&DATEDIF(A1,B1,"YM")&" months, "&DATEDIF(A1,B1,"MD")&" days"
The "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:

=NETWORKDAYS(A1,B1)

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:

=NETWORKDAYS(A1,B1,$H$2:$H$12)

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

Cedrick Reese

Ready Utilities was founded by Cedrick Reese, a retired veteran and web developer who enjoys building free, user-friendly online tools that simplify everyday tasks. His journey began in the early 2000s with affiliate marketing and niche site development, which grew into a passion for creating practical digital utilities and calculators. After retiring, he earned a Computer Systems Technician certificate from UEI College, completed Electro-Mechanical Technologies at Tulsa Welding School, and finished the Carpentry program at Florida State College at Jacksonville. Today, he combines his technical background and craftsmanship by building furniture using traditional woodworking methods, gardening, and developing helpful online tools for users worldwide.