Skip to main content

Date Difference Calculator

Find your age, or the gap between two dates in years, months, days, weeks and hours.

A date difference is counted in whole years first, then whole months, then the remaining days, which is why an age in years is not the total days divided by 365. Someone born on 29 February has a legal birthday of 1 March in most jurisdictions during common years.

By Piero Nanni · Last checked

Date Difference Calculator

Calendar difference

Total days

Weeks

Hours

Two different questions hide behind "how far apart are these dates". One is the total elapsed time, which is a number of days and converts cleanly to weeks or hours. The other is the calendar difference, expressed as years, months and days, and that one depends on where in the calendar you are standing, because months are not the same length.

The calculator below gives both. The total-days figure is what you want for interest, deadlines and durations; the years-months-days figure is what you want for age, tenure and anniversaries. They are not interchangeable, and converting one to the other by dividing is where the errors come from.

Why months make this hard

From 31 January, one month later is 28 February in a common year, 29 February in a leap year and never 31 February. Every calendar system clamps to the end of the shorter month, so adding a month and then subtracting one does not always return you to where you started.

The convention almost everyone follows counts whole months first and takes the remainder in days. From 31 January to 30 April is two months and thirty days, not three months, because 31 March had not been reached. Different libraries disagree at these edges, which is why two tools can give answers a day apart.

Leap years and 29 February

A leap year is any year divisible by four, except centuries, except centuries divisible by 400. So 2000 was a leap year, 1900 was not, and 2100 will not be. That rule keeps the calendar year within half a minute of the solar year, and gives an average year of 365.2425 days.

Someone born on 29 February has a birthday only every four years. Most legal systems treat 1 March as the anniversary in common years, though a few use 28 February. For age calculations the practical answer is that they turn a year older at the end of February regardless.

When to use total days instead

Contracts, notice periods, interest and shipping windows are almost always specified in days, precisely to avoid the month problem. Thirty days from 31 January is 2 March in a common year, which is not the same as one month.

Convert total days to weeks by dividing by seven, and to hours by multiplying by 24. Both are exact, unlike months and years. If a period matters legally, count the days rather than the months.

Frequently Asked Questions

How do I calculate my exact age?

Count whole years from your birth date to today, then whole months, then the remaining days. Dividing total days by 365 gives a slightly different answer.

How many days are between two dates?

Count the calendar days from one to the other. The calculator above gives the total, along with the equivalent in weeks and hours.

What is a leap year?

A year divisible by four, except century years, except those divisible by 400. 2000 was a leap year; 1900 was not.

When does a 29 February birthday fall in a common year?

Most jurisdictions treat 1 March as the legal anniversary, though a few use 28 February.

Why is one month from 31 January not 31 February?

February has no 31st, so the date clamps to the last day of the month, 28 or 29.