Illustration of March 1, 2024 to June 6, 2026 broken into 2 years, 3 months, and 5 days

Calculators & everyday math

How to Calculate the Difference Between Two Dates

The difference between two dates can be given as a day count or as years, months, and days. This guide shows how to work out the calendar breakdown by hand, how to check it, and the mistakes that most often throw the answer off by a day.

Ready to try the tool this guide describes?

Step by step

  1. Start from the earlier date: March 1, 2024.
  2. Add whole years while you stay on or before the later date: March 1, 2026 is 2 years.
  3. Add whole months the same way: June 1, 2026 is 3 more months.
  4. Count the remaining days: June 1 to June 6 is 5 days.
  5. The difference is 2 years, 3 months, 5 days.

Check it with a day count

Counting every day from March 1, 2024 to June 6, 2026 gives 827 days. The pieces add up the same way: March 1, 2024 to March 1, 2026 is 730 days, the next 3 months are 92 days, and 5 more days makes 827.

Common mistakes

  • Counting both dates. January 1 to January 2 is 1 day apart, not 2. Count both only when both days belong to the period.
  • Assuming 30-day months. January 15 to March 15 is 2 months but 59 days in 2026, and 60 in 2024.
  • Forgetting leap days. Any span that includes a February 29 has one extra day.
  • Counting backward from the later date. Count forward from the earlier date so the month lengths line up.

In a spreadsheet

Subtracting two date cells gives the number of days. Excel and Google Sheets also have a DATEDIF function for whole years and months, but month-end dates are handled differently by different tools, so test a month-end case before relying on any of them.

Difference Between Dates FAQ

How do I find the years, months, and days between two dates?
Count whole years forward from the earlier date, then whole months, then the days that remain.
Does the order of the dates matter?
Not for the size of the gap. Always measure from the earlier date to the later one.
Is the difference the same as the number of days between the dates?
It is the same span. The day count gives it in days; the calendar breakdown groups those days into years and months.
Why do different calculators give slightly different months and days?
Month-end dates have no single rule: some tools end a month on the last day of a shorter month, others roll over into the next. The total days always agree.
Is the start date counted?
Not in a difference: January 1 to January 2 is 1 day. Count both dates only for periods that include both days.

Related guides

Open the tool

Jump into Date Difference Calculator when you are ready to process your files.

← Back to all guides

More from Looty

Explore Looty’s Ecosystem

Discover more ways Looty can help you learn, organize, create, and make an impact.