GenerateRandomSearch

Age Calculator

An age in years, months and days is not a subtraction. Thirty-first of January to the first of March is one month and one day, and no amount of borrowing thirty days gets you there — the month being borrowed from is shorter than the day being borrowed for. So this counts whole months forward from the birth date instead, and then proves it by adding the answer back on and requiring the second date to come out.

What this generator does

Counts whole months from the birth date up to the second date, clamping the day where a month is too short, then measures the remainder in days.

How to use this tool

  1. Enter the date of birth and the date to measure to.
  2. Read the age in years, months and days.
  3. The totals in days and weeks are given as well.
  4. The next anniversary is worked out too, with leap-day birthdays handled.

Understanding the controls

Date of birth
Written as YYYY-MM-DD. A date that does not exist, such as the thirtieth of February, is refused rather than quietly shifted.
Age at
The date to measure to, which defaults to today. It must not be before the first date.

Common use cases

  • Working out an exact age for a form
  • Finding how long ago something happened, precisely
  • Checking the day of the week somebody was born
  • Counting down to an anniversary
  • Measuring the gap between two dates in a way people understand

How this generator works

The answer is added back onto the birth date — years, then months with the day clamped where a month is short, then days — and the second date must come out exactly. That is the only check that proves the month arithmetic was right, since a wrong answer differing by a day or two looks entirely plausible. Dates are handled in UTC throughout, so no clock change can move a day.

Randomness and fairness

Nothing is random. The same two dates always give the same answer.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • The Gregorian calendar as used now, projected backwards. Dates before its adoption in a given country will not match historical records.
  • Whole days only, with no time of day.
  • A 29 February birthday takes 28 February as its anniversary in a common year, which is the common convention but not the only one.
  • Ages are measured between dates, not between moments, so time zones do not enter into it.

Privacy and your data

The calculation runs in your browser. No dates are transmitted or stored.