Age Calculator
Calculate exact age in years, months, days, weeks, and hours from a date of birth.
How it works
This calculator computes your exact age from a date of birth and an optional "as of" date. The age is broken into calendar units — full years, then full months, then remaining days — using the standard convention that someone born March 15, 1990 turns 35 on March 15, 2025 regardless of leap years.
The math is subtler than it looks. Subtracting calendar dates directly (year_now − year_born) overstates age until the birthday passes. We handle this by checking whether the current month/day has reached the birth month/day — if not, subtract one year. The same logic applies recursively to months and days when computing the broken-down age.
Total days, weeks, and hours are computed by simple subtraction in milliseconds. For most purposes this is fine, but it ignores leap seconds (rare 1-second adjustments to UTC) — irrelevant for personal use, important for some scientific calculations.
Date-of-birth privacy. Birth dates are surprisingly identifying — combined with ZIP code and gender, they identify ~87% of US residents uniquely (Latanya Sweeney's classic study). Be cautious entering real DOBs into untrusted sites; this calculator runs entirely in your browser and does not send your input anywhere.
Age in different cultures. Western age counts whole years from birth. East Asian "lunar age" historically counted you as 1 at birth and added a year at New Year, so a baby born December 31 was 2 by January 1 — though this practice has largely been replaced by Western counting in modern legal and medical contexts. For ages that matter (driving, voting, drinking), use the standard calendar calculation.
Frequently asked questions
Does it handle leap years?▾
Yes — JavaScript Date handles leap years natively, and the calendar-based age calculation is correct across them.
Why is "total months" different from "years × 12 + months"?▾
It's not — total months is computed exactly that way. The breakdown shows years/months/days; "total months" sums the years times 12 plus residual months.