Tellsheet
HomeExcel Guides › Calculate Date Difference in Excel

How to Calculate the Difference Between Two Dates in Excel

Subtracting dates gives you days, but whole months and years mean the hidden DATEDIF function — which errors on reversed dates and text dates alike. Here's why, and the one-click way.

Last updated: August 2026

StartEnd → gap
2020-01-012026-01-01 = 6 years
2026-02-012026-08-01 = 6 months

Why DATEDIF is a trap

Plain subtraction (=B2-A2) gives days, but for whole months or years you need DATEDIF — a legacy function so undocumented it doesn't even appear in Excel's formula autocomplete. It returns #NUM! the moment the start date is later than the end date, and it errors outright on dates stored as text rather than real Excel dates, which is how most exports arrive. So the one formula for the job is both hidden and brittle.

The 1-click way — Tellsheet's Date Difference

Pick the two date columns and run Date Difference. Choose days, whole months, or whole years — DATEDIF-style — and it adds a column with the gap on every row. It reads real and text dates alike, so exported date strings work without converting them first, and reversed dates don't blow up. Perfect for age, tenure, and lead time. Pairs with Add / Subtract Dates and Fix Dates.

Frequently asked questions

How do I get the difference between two dates?

Subtraction gives days; months and years need the hidden DATEDIF. Date Difference adds a column in days, whole months, or whole years in one click.

Why does DATEDIF error?

It's undocumented, returns #NUM! when the start is after the end, and errors on text dates. Date Difference handles both cases.

Does it read text dates?

Yes — text dates are parsed alongside real Excel dates, so exported strings work without converting them first.

What can I measure with it?

Age, tenure, lead time, days overdue — anything measured as an elapsed period, in the unit you choose.

Related Excel guides

Measure the gap between dates in one click

Date Difference adds a column in days, months, or years — reading real and text dates, and never tripping on reversed dates.

Get Tellsheet free See pricing