How We Calculate Age – Method, Leap Years & Test Cases
This page explains exactly how results are produced, so you can check them yourself.
The method
- Count whole months between the two dates. Subtract one month if the later date’s day is earlier than the start day.
- Years are whole months divided by 12. The remainder is the months value.
- Move the start date forward by those whole months. The days value is the number of calendar days from that point to the end date.
- Totals (days, weeks, hours, minutes, seconds) come from the exact number of calendar days between the dates.
Edge-case rules
- Leap years: 29 February is counted as a real day in totals. A year is a leap year if it is divisible by 4, except century years not divisible by 400, so 2000 was a leap year and 1900 was not.
- 29 February birthdays: in non-leap years the birthday is observed on 28 February.
- Month ends: when the start day does not exist in a month (for example 31 in February), the last day of that month is used.
- Time zones: the calculator uses your device’s local date, so “today” matches where you are.
Verified test cases
| From | To | Result | Total days |
|---|---|---|---|
| 1990-08-15 | 2026-10-26 | 36y 2m 11d | 13,221 |
| 2000-01-01 | 2026-10-26 | 26y 9m 25d | 9,795 |
| 1985-05-20 | 2026-05-20 | 41y 0m 0d | 14,975 |
| 2000-02-29 | 2025-02-28 | 25y 0m 0d | 9,131 |
| 2000-02-29 | 2025-03-01 | 25y 0m 1d | 9,132 |
| 2024-01-31 | 2024-03-01 | 0y 1m 1d | 30 |
| 2023-12-31 | 2024-01-01 | 0y 0m 1d | 1 |
Why other tools differ
Tools that use 365.25 days per year and 30.44 days per month give approximate months and days. Ours counts calendar months, so results can differ by a few days from those tools.
Try it: age calculator · age difference calculator. Last reviewed November 10, 2026.