Years Between Dates Calculator
Result
Years
- Months
- 8
- Days
- 18 days
- Total months
- 440
- Total days
- 13,410 days
- Years, as a decimal
- 36.72
How many years lie between two dates? This years between dates calculator reports the gap as a calendar difference — years, months and the leftover days — and then gives the same span two other ways: as a total number of months, and as decimal years. Those last two are not the same number written differently. Whole years are counted by the calendar, where a year ends on the matching day of the following year; decimal years divide the day count by 365.2425, the average length of a Gregorian year. One day short of a year is 0 calendar years and 1.00 decimal years, and both readings are right.
Formula
whole years, months and days = the calendar difference between the two dates; total months = years × 12 + months; decimal years = total days ÷ 365.2425
- startDate
- The earlier of the two dates, though the order does not change any answer
- endDate
- The later date; swapping the two gives the identical six figures
- years
- Whole calendar years — a year completes on the matching date, so 29 February to 28 February is one
- months
- The whole months left over once the years are taken out, always 0 to 11
- days
- The days left over once the years and months are taken out
- totalMonths
- The whole span counted in months only: 36 years 8 months reads as 440
- decimalYears
- Total days divided by 365.2425 — a different criterion from the whole years, not a rounding of it
Use it wherever a duration is quoted in years: length of service, the age of a building, how long a company has been trading, the gap between two people's birthdays. The calendar difference is the honest answer, because it is what a person counting on their fingers would get. The two extra readings answer the questions the calendar difference cannot: total months is the unit for anything billed or vested monthly, and decimal years is the unit for a rate or an average — 36.72 years of service is a figure you can divide by, while 36 years 8 months is not. What it will not do is give you a fraction of a month, and it will not tell you whether the order of the dates was the one you meant, because both orders produce the same numbers.
Worked examples
1 January 1990 to 19 September 2026
- Thirty-six whole years take you to 1 January 2026
- Eight more whole months take you to 1 September 2026, leaving 18 days
- So the calendar difference is 36 years, 8 months and 18 days
- 36 × 12 + 8 = 440 months, which is the same span written in a single unit
- 13,410 days divided by 365.2425 gives 36.72 decimal years
Three readings of one gap. The calendar difference is what you would say out loud; the other two are for when you need something to do arithmetic with.
1 January to 31 December 2000 — one day short of a year
- The calendar year that starts on 1 January 2000 does not close until 1 January 2001
- So the whole years figure is 0, and the span is 11 months and 30 days
- In months alone that is 11 — the twelfth month is not finished
- The day count is 365, because 2000 is a leap year but 1 January to 31 December covers the common part of it
- 365 divided by 365.2425 is 0.99934, which rounds to 1.00 at two decimal places
This is the case that makes the page necessary. The calendar says 0 years and the division says 1.00, and a tool that reported only one of them would look wrong to half its readers.
29 February 2024 to 28 February 2025 — a leap day anniversary
- There is no 29 February in 2025, so the anniversary clamps to 28 February
- That makes the gap exactly 1 year, 0 months and 0 days
- 12 months, and 365 days because 2025 is not a leap year
- 365 divided by 365.2425 rounds to 1.00, so all three readings agree here
Adding a year is calendar arithmetic and landing on a day count is ordinary subtraction. This is the case where the two happen to agree — and the case above is where they do not.
31 January to 1 March 2026 — a short month in the way
- One whole month later than 31 January is 28 February, because February 2026 has 28 days
- 1 March is one day past that, so the leftover is 1 day and not minus 30
- Total months is 1 and the day count is 29
- 0.08 decimal years is what 29 days comes to against the 365.2425-day average
Subtracting the day numbers would give 1 minus 31, which is both the wrong size and the wrong sign. Months have to be taken out as whole months before the days are counted.
Limitations
The calendar difference and the decimal years answer different questions, and no page can merge them into one number: 1 January to 31 December is 0 whole years and 1.00 decimal years at the same time. Whole months are counted by calendar month, not by dividing days by an average, so a month can be 28 to 31 days long and the same day count can produce different month totals depending on which months it crosses. The order of the two dates makes no difference to any of the six figures — this tool reports the size of the gap, not a signed direction, so if you meant to measure backwards the sign is something you have to carry yourself. Dates are proleptic Gregorian between year 1 and year 9999, projected backwards before 1582 with no reform, and there is no time zone or time-of-day anywhere in the arithmetic: two dates a day apart are always one day apart, whatever clock you read them by.
Frequently asked questions
- How many years between 1 January 1990 and 19 September 2026?
- 36 years, 8 months and 18 days. Written in months alone that is 440, and in days it is 13,410. Dividing those days by the 365.2425-day average Gregorian year gives 36.72 decimal years, which is the calendar difference expressed as a single number rather than as three.
- Why does a span show 0 years but 1.00 decimal years?
- Because the two figures use different criteria. Whole years are counted by the calendar, and the year that begins on 1 January does not close until the following 1 January — so 1 January to 31 December 2000 is 0 years, 11 months and 30 days. Decimal years divide the 365 days by 365.2425, and 0.99934 rounds to 1.00. Neither figure is a mistake; the calendar answer is one day short of a year, and the division says so.
- How many months is that in total?
- Multiply the years by twelve and add the leftover months. For 1990 to 2026 that is 36 × 12 + 8 = 440 months. Total months is the right unit when something is billed, vested or reviewed monthly, and it is easier to compare than a three-part figure — two intervals that look similar written as years and months can differ by several months.
- Does it matter which date I put first?
- No. The tool reports the size of the gap between the two dates, and the size of a gap does not depend on which end you read from — 1990 to 2026 and 2026 to 1990 both give 36 years, 8 months and 18 days. That also means no figure is ever negative: if you need a direction, the order you typed is the only record of it.
- What is the gap between two birthdays?
- Enter both dates and read the calendar difference — that is the age gap in years, months and days, and it is what people mean by the phrase. One thing to watch: if one of the birthdays is 29 February, the anniversary in a common year falls on 28 February, so the gap between 29 February 2024 and 28 February 2025 is exactly one year rather than a day short of one.
References
- The Gregorian calendar — Claus Tøndering, Calendar FAQ
- RFC 3339: Date and Time on the Internet: Timestamps — IETF