Skip to main content
Mathovia

Time & Date / Date Calculators

Date Difference Calculator

Pick a start and end date to see exactly how much time is between them.

Total days
364
Weeks
52.0
Years
1.00

Calculated as the number of full days between the two dates.

Written by
MPhil in Mathematics, Founder of Mathovia
Updated

Mathematics verification: Mathematical formulas, calculations, worked examples and solutions are reviewed for accuracy before publication. How we check our work

Counting the days between two dates looks like subtraction, but calendars fight back — 28-, 30-, and 31-day months, leap years, and the perennial question of whether to count the first day, the last day, both, or neither. That last one causes most of the off-by-one errors people hit in spreadsheets and by hand.

Date Difference Calculator formula
The Date Difference formula

How the calculation works

Each date is converted to a running day number (days since a fixed reference point), and the difference between the two numbers is the answer:

Because each date already accounts for month lengths and leap days in its day number, the subtraction is exact regardless of how the calendar behaves in between.

Worked example

The calculator’s defaults are 1 January 2026 to 31 December 2026.

It’s 364 rather than 365 because the count is the gap between the two dates, not an inclusive tally of both endpoints. Add 1 for an inclusive count.

The 365.25 in the years figure

Dividing by 365.25 rather than 365 folds in the leap day that lands every fourth year. Over a single year the difference is tiny; over a few decades a flat 365 would be off by weeks.

Common uses

This kind of date math comes up constantly — countdown to an event, calculating someone’s exact age in days, determining a project timeline, or figuring out a legal or contractual deadline where the exact day count matters.

Common mistakes

  • Expecting an inclusive count. Jan 1 to Jan 31 is 30 days between them, 31 if you count both ends.
  • Assuming every year is 365 days when converting a long span to years — leap years add up.
  • Ignoring that the result is calendar days, not business days. A two-week gap includes weekends.
  • Mixing up start and end. A later start than end gives a negative result.

Counting across months by hand

Count what’s left in the starting month, add the full months in between, then add the days into the final month. From 15 March to 2 June 2026:

  • Rest of March: days.
  • April and May: days.
  • Into June: 2 days.

The knuckle trick helps with month lengths: make a fist and count the months across your knuckles and the gaps between them. Months that land on a knuckle have 31 days; the gaps are the shorter months.

Leap years

A year is a leap year if it divides by 4, except century years, which must also divide by 400. So 2024 and 2028 are leap years, 2000 was one, and 2100 won’t be. The extra day only matters when February 29 falls inside your range: 1 February to 1 March is 29 days in 2024 but 28 days in 2026.

Business days

The calculator counts calendar days. For working days, count full weeks first, since each one holds exactly five weekdays. From Monday 2 March to Monday 30 March 2026 is 28 days, which is exactly 4 weeks, so there are weekdays between them. Then subtract any public holidays that fall on a weekday in that span. When the span isn’t a whole number of weeks, count the leftover days individually on a calendar.

Age in days

Your age in days is the gap from your birth date to today. Someone born on 15 May 2000 is 9,639 days old on 5 October 2026. The 365.25 rule gives a good approximation: .

About the formula: Calculated as the number of full days between the two dates.

Frequently Asked Questions

How many days are between January 1 and December 31 of the same year?+

364 in a common year (the calculator's default output), or 365 in a leap year. It counts the days between the dates, not both endpoints.

Does this count the start day, the end day, or both?+

Neither endpoint is double-counted — it's the number of days that pass between them. The same date for both fields gives 0 days.

How do I count both endpoints (an inclusive count)?+

Add 1 to the result. For 'how many days is my trip' where you're there on both the first and last day, inclusive counting is what you want.

Why is the years figure a decimal?+

It divides total days by 365.25, which averages in the leap day every four years. A flat 365 would drift off by about a day per year.

How do I find someone's age in days?+

Enter their birth date as the start and today's date as the end. The total-days result is their exact age in days.

Does it handle dates in different years, or across a leap year?+

Yes. The calculation works from a day count for each date, so month lengths and leap years are handled automatically no matter how far apart the dates are.

Related calculators