How many years between two dates?
Enter two dates to see how many years are between them. The end date starts as today, so the page also tells you how many years ago a date was.
- Time between
- 26 years, 8 months, 29 days
From January 1, 2000 to September 30, 2026 is 26 years, 8 months, 29 days, or 26.75 years.
- In years
- 26.75
- Whole months
- 320
- Days
- 9,769
Answer for the example date Wednesday, September 30, 2026. It changes to today's date when the page loads.
Time between: 26 years, 8 months, 29 days. From January 1, 2000 to September 30, 2026 is 26 years, 8 months, 29 days, or 26.75 years.
Where are the dates on the calendar?
How to calculate
Counts how many years are between two dates: whole years, months, and days, the same span as a decimal number of years, and the total months and days.
Example with the default inputs (Start date January 1, 2000, End date September 30, 2026) on the example date Wednesday, September 30, 2026: From January 1, 2000 to September 30, 2026 is 26 years, 8 months, 29 days, or 26.75 years.
Method: years = the most whole years Y with start + Y years ≤ end, then months and days; decimal years = Y + (end − (start + Y years)) ÷ ((start + (Y + 1) years) − (start + Y years))
- Dates are whole calendar days in the Gregorian calendar, with no time of day.
- An anniversary of February 29 falls on February 28 in a common year; a day that a month does not have moves to its last day.
- The decimal part is the days since the last anniversary divided by the days (365 or 366) until the next one.
- The end date is today unless you change it; the page reads today’s date from your device when it loads.
- A start date after the end date has no answer.
Worked examples
Each example is checked against the calculator on every build.
- Start date 2000-01-01, End date 2026-09-30 gives Time between 26 years, 8 months, 29 days, In years 26.745205, Whole months 320, Days 9,769.Source: Julian Day numbers (Meeus, Astronomical Algorithms, 1991, chapter 7): JD 2461313.5 − JD 2451544.5 = 9769 days
- Start date 1990-07-15, End date 2026-03-10 gives Time between 35 years, 7 months, 23 days, In years 35.652055, Whole months 427, Days 13,022.
- Start date 2020-02-29, End date 2021-02-28 gives Time between 1 year, In years 1, Whole months 12, Days 365.Source: Gregorian leap-year rule (ISO 8601)
- Start date 2024-02-29, End date 2028-02-28 gives Time between 3 years, 11 months, 30 days, In years 3.997268, Days 1,460.Source: Gregorian leap-year rule (ISO 8601)
How it works
Dates are whole calendar days in the Gregorian calendar, with no time of day. Dates from January 1, 1600 to December 31, 2400 are accepted, and the start date must be on or before the end date; otherwise there is no answer.
- Time between (years, months, and days): from the start date, the most whole years Y such that the start date plus Y years is not after the end date; then the most whole months M such that the start date plus Y years and M months is not after the end date; then the days left up to the end date. Adding years or months keeps the day of the month; a day that the month does not have moves to the month’s last day, so February 29 plus 1 year is February 28.
- In years = Y + d ÷ L, where d is the days from the last anniversary (the start date plus Y years) to the end date, and L is the days from that anniversary to the next one (the start date plus Y + 1 years), which is 365 or 366. It shows to 2 decimal places.
- Whole months = 12 × Y + M.
- Days = the end date minus the start date, in whole days.
The end date starts as today. The page was built on one day and may be opened on another: the built page shows the answer for its build day, and your browser replaces it with the answer for your today as soon as the page loads.
Worked examples by hand
January 1, 2000 to September 30, 2026. January 1, 2026 is the 26th anniversary, and January 1, 2027 would be after the end date, so Y = 26. January 1, 2026 plus 8 months is September 1, 2026, and plus 9 months would be October 1, which is too late, so M = 8. September 1 to September 30 is 29 days: 26 years, 8 months, and 29 days. The last anniversary is 272 days before the end date and the next one is 365 days after it: 26 + 272 ÷ 365 = 26.75 years. Whole months: 26 × 12 + 8 = 320. Days: the Julian Days are 2,451,544.5 and 2,461,313.5, so 9,769 days.
July 15, 1990 to March 10, 2026. The 35th anniversary is July 15, 2025. Plus 7 months is February 15, 2026, and 23 more days is March 10: 35 years, 7 months, and 23 days. From July 15, 2025 to March 10, 2026 is 238 days, and July 15, 2025 to July 15, 2026 is 365 days: 35 + 238 ÷ 365 = 35.65 years, or 427 whole months and 13,022 days.
February 29, 2020 to February 28, 2021. 2021 is a common year, so the first anniversary is February 28, 2021: exactly 1 year, 365 days.
February 29, 2024 to February 28, 2028. 2028 is a leap year, so the 4th anniversary is February 29, 2028, one day after the end date. The 3rd anniversary is February 28, 2027 (2027 has no February 29). Months count from the start date, so February 29, 2024 plus 3 years and 11 months is January 29, 2028, and 30 more days is February 28: 3 years, 11 months, and 30 days. From February 28, 2027 to February 28, 2028 is 365 days and to February 29, 2028 is 366 days, so the decimal is 3 + 365 ÷ 366 = 4.00 years to 2 places (3.997).
Other questions people ask
How do I work out how many years are between two dates?
Count the whole years first: the most anniversaries of the start date that are not after the end date. Then count whole months, then the days left. From January 1, 2000 to September 30, 2026 is 26 years, 8 months, and 29 days.
How is the decimal number of years found?
It is the whole years plus the part of the next year that has passed. From January 1, 2000 to September 30, 2026: the last anniversary is January 1, 2026, 272 days earlier, and the next is 365 days after it, so the answer is 26 + 272 ÷ 365 = 26.75 years.
Why not just divide the days by 365.25?
Because that gives a fraction of an average year, not of the real year. Dividing by the days in the actual anniversary year means a whole number of years always comes out whole: exactly 10 years after a date is 10.00 years, never 9.99 or 10.01.
What happens with a February 29 start date?
In a common year the anniversary falls on February 28. So February 29, 2020 to February 28, 2021 is exactly 1 year. When the later year is a leap year, the anniversary is February 29 itself.
How many years ago was a date?
Leave the end date as today and enter the date as the start date. The page reads today’s date from your device when it loads, so the answer is right on the day you open it.
Does the order of the dates matter?
Yes. The start date must be on or before the end date; otherwise there is no answer. Swap the two dates.