Age Difference Calculator
Enter two dates of birth and get the exact age gap in years, months, and days — plus the total days, weeks, and months between them.
Age difference
4 years, 9 months, 5 days
- Older birthday
- 1990-06-15
- Younger birthday
- 1995-03-20
- Total days apart
- 1,739
- Total weeks apart
- 248
- Total months apart
- 57
Complete years between the two birthdays, then additional whole months, then leftover days — the same additive breakdown used by date-fns, PHP DateInterval and Wolfram Alpha. Calendar arithmetic uses the proleptic Gregorian calendar in UTC, so daylight-saving and timezone offsets cannot shift the result.
How to use this calculator
Enter each person's date of birth — year, month, and day. The order does not matter; the calculator automatically detects who is older. The result shows the exact age difference as years, months, and days, and also as total days, weeks, and months between the two birthdays.
How the calculation works
The calculator subtracts the older birthday from the younger using complete-year, then complete-month, then leftover-day arithmetic. From the older date, it counts how many full years fit before passing the younger date, then how many full months fit after that, and the remainder in days. The same algorithm is used by date-fns, PHP DateInterval, dayjs, and Wolfram Alpha. All arithmetic uses the proleptic Gregorian calendar in UTC, so timezone shifts and daylight-saving boundaries never alter the result.
Worked example
Person 1 was born on 15 June 1990 and Person 2 on 20 March 1995. The older birthday is 15 June 1990. Counting from there: four complete years reach 15 June 1994 (a fifth would overshoot, landing on 15 June 1995). Nine complete months from 15 June 1994 reach 15 March 1995. From 15 March 1995 to 20 March 1995 is five days. So the age difference is 4 years, 9 months, and 5 days — or 1,739 days, 248 weeks, and 57 months in total.
Frequently asked questions
Does the order I enter the two birthdays matter?
No. The calculator works out which date is earlier and reports the difference as a positive value. You can put either person first; the labels "older" and "younger" in the breakdown are assigned automatically based on the dates you enter, not on the order they were typed in.
How is the age difference calculated when one person has a 29 February birthday?
Leap-day birthdays clamp to 28 February in non-leap years, the same convention used by date-fns, dayjs, PHP DateInterval, and the UK Births and Deaths Registration Act 1953 (Scotland). So someone born on 29 February 2000 is considered to have a birthday on 28 February in years like 2025 and 2026, and the difference calculation lines up accordingly. In the next leap year (2028), the birthday returns to 29 February.
Why does the calculator show years, months, and days separately?
Because that is how humans naturally describe an age gap. "Four years, nine months, and five days" is more meaningful than "1,739 days" when comparing siblings, partners, or classmates. The total days, weeks, and months figures are still shown underneath if you need a single-unit number — for example, for legal documents, school enrolment cut-offs, or actuarial calculations.
Why does the total days figure differ from years × 365?
Leap years. Across the example span of 1990–1995 there is one leap day (29 February 1992), so the literal day count is one more than five years × 365. The calculator counts actual calendar days, including every leap day, so the total is accurate to the day. Dividing the total days by 365.25 (the average length of a Gregorian year) should produce a number close to the years-and-months gap.
Can I enter dates in the future or far in the past?
Yes. Years from 1 to 9999 CE are accepted. The calculator uses the proleptic Gregorian calendar — the modern Gregorian rules projected back into history — which is the right choice for everyday use. If you need Julian-calendar dates for pre-1582 historical research, convert them to proleptic Gregorian before entering them. Year zero and BCE dates are not supported.
Does the time of day affect the result?
No. The calculator works with calendar dates only, not times. If you need hour-and-minute precision — for example, comparing twin births or computing exact elapsed time — use the Time Duration Calculator alongside the date difference shown here. For nearly every age-comparison use case, day-level precision is more than enough.