What is the Age Calculator?
An age calculator computes the exact years, months and days between two dates — usually a birthday and today. It correctly handles leap years and varying month lengths, so the answer matches what you'd get by counting on a calendar.
Formula
Difference is computed by subtracting calendar fields with carry: borrow days from the previous month and months from the previous year as needed.
- From — Start date (e.g. date of birth)
- To — End date (defaults to today)
Step-by-step example
Setup: Born 15 March 1990, today 26 June 2026.
- Years = 36
- Months = 3 (Mar → Jun)
- Days = 11 (15 → 26)
Answer: 36 years, 3 months, 11 days
Frequently asked questions
Does this account for leap years?
Yes. JavaScript Date handles leap years correctly out of the box.
Can I use it for legal age checks?
It's accurate, but always rely on official records for any legal proof of age.