~/lokafile / guides / calculate-age-from-date-of-birth

How to Calculate Age from a Date of Birth — Exactly

Updated July 2026 · 2 min read · 254 words
26y 5m 25dEXACT · LEAP-YEAR SAFE

“How old” sounds trivial until a form wants years, months and days — or an enrollment cutoff hinges on whether a birthday has passed. Then the calendar’s irregularities start to matter.

The method (same as long subtraction)

Subtract date of birth from the target date column by column — days, months, years — borrowing when a column goes negative. Born 15 Jan 2000, as of 10 Jul 2026: days 10 − 15 is negative, so borrow one month (June has 30 days): 40 − 15 = 25 days. Months become 6 − 1 = 5. Years: 26. Exact age: 26 years, 5 months, 25 days.

Where it goes wrong by hand

The borrow uses the length of the previous month — 28, 29, 30 or 31 — and February’s leap-year rule (divisible by 4, except centuries not divisible by 400) is exactly the kind of detail that slips. This is why two people computing the same age by hand often differ by a day.

When exactness actually matters

School enrollment cutoffs (“must be 5 by September 1”), visa and passport applications, insurance premiums that step on birthdays, pension eligibility, and legal thresholds. In each, “about 26” isn’t an answer; the day count is.

Fun byproducts of the same math

Total days lived (divide by 7 for weeks), and the countdown to the next birthday — which also quietly answers “what day of the week will it fall on.” All of it derives from one careful subtraction the calculator does the same way every time.

Questions people ask

How does a Feb 29 birthday work?

In non-leap years, most rules treat Mar 1 as the day the age ticks over; the day-exact math above handles it consistently.

Why do two calculators give different answers?

Usually a one-day difference from how each handles the borrow month — the previous month’s length is the detail implementations disagree on.

More guides