Age Calculator Between Two Dates: Exact Years, Months and Days
Two dates. That is all you need. The Age Calculator does the rest and gives you the gap in years, months and days, plus the running totals down to seconds.
Most people type two birth dates and expect a single number. The useful answer is usually a full calendar gap: 29 years, 8 months and 9 days, not "about 30". Here is how that number is built, how to check it by hand, and where the traps hide.
What "age between two dates" actually means
The phrase covers three slightly different questions, and they share the same math.
The first is duration. You have a start date and an end date, and you want the elapsed time. A lease from 15 May 1995 to 24 January 2025 runs 29 years, 8 months and 9 days.
The second is age on a date. Take a birth date as the start, any calendar date as the end, and you get how old someone was or will be that day. This works in both directions, so you can check a birthday in the future or a milestone in the past.
The third is a gap between two people. Two birth dates go in, and out comes who is older and by how much. The gap itself never changes, because both birthdays move forward at the same rate.
All three run on the same rule: complete years first, then whole months, then the leftover days, using real calendar lengths. No average 30-day month, no dividing total days by 365. A division by 365 loses a day every four years, which is enough to break a legal or medical record that needs the exact figure.
Order of entry does not matter for the gap. Enter the younger person first and the calculator still labels the older one correctly. Identical dates return zero, which is the right answer and not an error.
How the date subtraction works
Calendar subtraction looks like the arithmetic you did at school, with one twist: a month is not a fixed size. So you borrow in real units.
Start with years. Subtract the birth year from the end year. If the end date has not yet reached this year's birthday, drop one year.
Then months. Subtract the birth month from the end month. If the result is negative, borrow one year, which turns into 12 months, and subtract again.
Then days. Subtract the birth day from the end day. If that goes negative, borrow one month. The borrowed amount is the actual length of the previous month, so 31 days, 30 days, 28 days, and 29 days in a leap February all appear at some point.
A worked case makes it concrete. Birth date 15 June 1990, evaluation date 10 May 2024.
Years: 2024 minus 1990 is 34, but May comes before June, so it drops to 33. Months: 5 minus 6 is negative, add 12 and get 11. Days: 10 minus 15 is negative, so borrow April's 30 days and get 25. The answer is 33 years, 11 months and 25 days.
The borrowing order matters. Do the days last and the month count is already fixed. Get the borrowed month length wrong by using a flat 30 and January or February birthdays land one or two days off, quietly, on every calculation.
Our calculator runs this chain in real calendar terms, with month lengths and leap days taken from the actual dates you enter.
Worked examples you can check by hand
Run these through the tool and the numbers should match. Each row is a start date, an end date, and the exact gap.
| Start date | End date | Exact gap | Total days |
|---|---|---|---|
| 15 May 1995 | 24 January 2025 | 29 years, 8 months, 9 days | 10,847 |
| 1 June 1970 | 1 June 2010 | 40 years, 0 months, 0 days | 14,610 |
| 29 February 2024 | 1 March 2025 | 1 year, 0 months, 1 day | 366 |
| 20 January 2000 | 5 March 2026 | 26 years, 1 month, 13 days | 9,540 |
| 19 October 2026 | 19 October 2026 | 0 days | 0 |
The second row is the clean case: same day, same month, forty years apart, and the leap days between 1972 and 2008 add ten extra days to the day total without touching the year count.
The third row is the one people argue about. One year after 29 February 2024 falls on 28 February 2025, because 2025 has no leap day. March 1 is one day after that, so the gap is one year and one day, not "one year" and not "366 days" alone.
The fourth row shows borrowing across a month boundary and a year boundary in the same calculation. Both adjustments fire, and the result still reconciles to the total day count.
If a hand calculation disagrees with the tool, check the borrowed month length first. It is the usual culprit.
Age difference between two people
Comparing two birthdays is the most common use of a two-date calculator, and it has a few nice properties.
The gap is fixed. Siblings born four years apart stay four years apart, apart from the short window between their birthdays when one has had a birthday and the other has not. During that window the gap reads one year less, which is correct and surprises people every time.
Reversed input is safe. The calculator detects the earlier date and reports the absolute span, so you never see a negative age.
Names are optional and only for readability. The math runs on dates alone.
Half-your-age-plus-seven is a social rule, not a law. Some tools show it next to the result. Ours keeps the arithmetic clean: you get the gap, and you decide what it means.
Where this gets practical: family trees, sibling spacing, sports age groups, school entry cutoffs, and any form that asks for the age gap between two people. For a single person's age today, the main Age Calculator page is the faster route.
One caution. Do not subtract two ages in whole years if you need an exact answer. Two people aged 30 can be 30 years and 1 day apart or 30 years and 364 days apart. Only full birth dates settle it.
Age on a past or future date
The same two-date engine answers "how old was I on that day" without extra work.
Take a birth date as the start and the target date as the end. A person born 24 August 1998 was 27 years, 8 months and 17 days old on 11 May 2026. Set the end date forward and you get the age they will be at a wedding, a retirement date, or a visa appointment.
This is where people usually reach for a rough subtraction and get burned. If the target date sits before this year's birthday, a simple year subtraction overstates the age by one. The calculator applies the birthday check before it reports anything.
Common uses: eligibility cutoffs, insurance quotes, school enrolment, medical chronologies, and milestone planning. All of them want the exact figure on a specific date, not today's age.
Future dates are fine. Nothing in the math requires the end date to be in the past, so planning ahead works the same way.
Doing it in a spreadsheet with DATEDIF
If the dates already live in a spreadsheet, you can get the same three numbers without leaving the sheet.
Excel's DATEDIF takes a start date, an end date and a unit code. Use "y" for complete years, "ym" for the leftover months after those years, and "md" for the leftover days after those months. The three codes map directly onto the sections above.
A full age from a birth date in cell B2 reads as three calls joined with ampersands: DATEDIF of B2 and TODAY with "y", then "ym", then "md", with the words "years", "months" and "days" between them. Change the unit to "d" and you get total days instead.
Two warnings. DATEDIF is undocumented: it does not autocomplete and Excel offers no argument hints, though it works in every version. And the "md" unit has a known quirk where the borrowed month length is taken from the start date, which can produce a day count that does not match a strict calendar subtraction near month ends.
The calculator avoids both issues. Use the spreadsheet for lists and sorting, and the tool when a single exact figure has to be right. If a DATEDIF result and the calculator disagree, trust the calendar and check the borrowed month.
Leap years and month-end traps
Leap years are where hand calculations fail most often, and the failures are silent.
Every year divisible by 4 is a leap year, except century years that are not divisible by 400. So 2000 was a leap year, 1900 was not, and 2024 was. That exception catches people who assume a simple every-four-years rule.
A 29 February birthday has one extra wrinkle. In a common year the anniversary falls on 28 February, so a calculation anchored to the birthday shifts by a day depending on which convention you follow. The calculator treats the anniversary as 28 February, which matches how most registries and courts read it.
Month-end borrowing is the second trap. From 31 January, one month later is 28 February in a common year and 29 February in a leap year, not 31 February. Subtract 31 January from 31 March and you get one month and 30 days, not two months, because February in between is too short.
Time zones and times of day are out of scope on purpose. Inputs are calendar dates, so a birth time of 23:50 does not change the result. For hours between timestamps, a time duration tool is the right one.
Frequently Asked Questions
How do I calculate the age between two dates?
Enter the earlier date as the start and the later date as the end. The calculator subtracts years, then months, then days, borrowing real month lengths where needed, and shows the exact gap plus total days.
Does the order of the dates matter?
No. The calculator detects which date is earlier and reports the absolute gap, so entering the younger person first still labels the older one correctly. Identical dates return zero.
Is a month always 30 days here?
No, and that is the point. Each borrowed month uses its real length, from 28 and 29 days for February up to 31. Flat 30-day months are what cause one or two day errors in January and February calculations.
Why is 29 February 2024 to 1 March 2025 one year and one day?
Because 2025 is not a leap year, so the first anniversary lands on 28 February 2025. March 1 comes one day after that. The total day count of 366 includes the leap day from 2024.
Can I use it for future dates?
Yes. Nothing in the math requires the end date to be in the past. Set a wedding, retirement or visa date as the end date and you get the exact age on that day.
How is this different from dividing total days by 365?
A division by 365 or 365.25 treats every year as the same length and drifts by a day every four years. Calendar subtraction counts complete years and months against real dates, so the years, months and days always reconcile with the total.
Sweden (U.S. Citizen) · SO reputation 1999 · Badges: 2🥇21🥈25🥉 · SO member since 2010