← All tools

Age Calculator

Enter a birth date (or any start date) and an end date to get the exact age in years, months and days — plus totals and the time left until the next birthday.

How it works

The calculator compares two calendar dates. It first counts the largest number of whole years you can add to the start date without passing the end date, then the largest number of whole months on top of that, and finally the leftover days. Only whole calendar units are used, so you get something like “34 years, 7 months, 12 days”.

Adding months is the hard part. Naive JavaScript date arithmetic overflows: adding one month to 31 January gives 3 March, because 31 February does not exist. This page uses clamped month arithmetic instead — the day of month is capped at the last day of the target month, so 31 January plus one month is 28 February (29 February in a leap year). That keeps the walk forward monotonic, which makes the year and month counts well defined.

Day differences are computed on UTC timestamps, not local ones, so daylight-saving transitions never create 23- or 25-hour days that would round the day count off by one. Totals are then derived from the day difference: 7 days per week, 24 hours per day. Leap years are handled by the calendar itself, not by an average of 365.25 days, so a full year spanning a 29 February is 366 days.

What this tool does not do

It works in whole days. If you need an age in hours and minutes — for a newborn, or for a legal deadline with a time-of-day cutoff — the result here is up to 24 hours coarse, because a date input carries no time. All dates are interpreted in your device’s local time zone; someone in another time zone entering the same dates can legitimately get a different “next birthday” countdown.

For 29 February birthdays in non-leap years the tool treats the anniversary as 28 February when counting down, which is one common convention but not the only one — some people and some legal systems use 1 March. This calculator is not a source of legal age, and it does not determine whether you are old enough for anything: age thresholds vary by country and by purpose. It also does not check that a birth date is real or plausible, so a typo like 2109 will simply produce a negative-age error.

Runs entirely in your browser. Dates of birth are personal data — nothing you type is uploaded or logged. You can disconnect from the network after the page loads and it keeps working.

Related tools

All small tools · Token Counter · IBAN Validator