Calculators

Age Calculator

An age calculator finds the exact time elapsed between two dates. The reason so many get it wrong by a day is that they subtract two timestamps and divide: across a daylight-saving boundary a day is 23 or 25 hours, which shifts the result. This one works with plain calendar dates and never involves a clock, so the answer is stable regardless of timezone or when in the day you run it.

Runs entirely in your browser — your figures are never uploaded.

How do you calculate age in years, months and days?

Subtract the birth date from the reference date field by field, borrowing from the previous month when the day is negative. Someone born on 15 June 1990 is 36 years, 1 month and 22 days old on 6 August 2026.

Defaults to today. Change it to check age at any past or future date.

Age

36y 2m 7d

Born on a Friday

Total days
13,217
Total weeks
1,888
Total months
434
Total hours
317,208

Next birthday

297 days away, on 2027-06-15 — a Tuesday.

The maths

Age Calculator formula

Formula

years = Y₂ − Y₁, months = M₂ − M₁, days = D₂ − D₁, borrowing from the preceding month when days is negative

Y₁ M₁ D₁
Year, month and day of birth
Y₂ M₂ D₂
Year, month and day of the reference date

Worked example

Born 15 June 1990, calculated on 6 August 2026

Inputs

Birth date
1990-06-15
Reference date
2026-08-06

Working

  1. days = 6 − 15 = −9, so borrow from July which has 31 days
  2. days = −9 + 31 = 22, and months reduces by one
  3. months = 8 − 6 − 1 = 1
  4. years = 2026 − 1990 = 36

36 years, 1 month and 22 days. Born on a Friday.

How to

How to use the Age Calculator

  1. 1

    Enter the date of birth

    Pick the birth date. Any date is accepted, including dates far in the past — the calendar arithmetic handles leap years correctly.

  2. 2

    Set the reference date

    Defaults to today, but you can set any date to find age at a past or future moment — useful for eligibility cut-offs.

  3. 3

    Read the breakdown

    Age appears as years, months and days, with totals in days, weeks and hours alongside.

  4. 4

    Check the next birthday

    The countdown shows days remaining and the weekday it falls on, with 29 February handled by clamping to the 28th in common years.

Examples

Age Calculator examples

Standard case

Input
Born 1990-06-15, on 2026-08-06
Output
36 years, 1 month, 22 days

The day borrow takes 31 days from July, since July precedes the August reference date.

Short-month borrowing

Input
Born 2000-01-31, on 2000-02-28
Output
0 years, 0 months, 28 days

There is no 31 February, so the result is expressed in days. Calculators that assume 30-day months return 27 or 29 here.

Leap day birthday

Input
Born 2000-02-29, next birthday from 2026-03-01
Output
28 February 2027

2027 is not a leap year, so the birthday clamps to 28 February rather than rolling into March.

Why use it

What the Age Calculator gives you

No timezone drift

Calendar dates are handled as year, month and day rather than timestamps, so daylight saving cannot shift the answer by a day.

Correct month borrowing

Borrowing takes the real length of the preceding month, so 31 January to 28 February gives 28 days rather than an assumed 30-day approximation.

Leap years handled properly

Including the century rule — 1900 was not a leap year but 2000 was — and clamping 29 February birthdays in common years.

Works for any two dates

Not restricted to today, so you can check age at a deadline, a cut-off date or a future event.

Good to know

Age Calculator limitations

  • Uses the Gregorian calendar throughout. Dates before its adoption, which varied by country between 1582 and 1923, will not match historical records.
  • Months are not a fixed length, so 'total months' is a count of complete months rather than a precise division of days.
  • Does not account for the time of day. Someone born late in the evening is treated as a full day old on the following date.
  • Time zones are deliberately ignored, so a birth in a different zone is taken as the calendar date entered.

Summary

Age Calculator in short

  • Age is calculated field by field, borrowing from the preceding month.
  • Borrowing must use the real length of that month, not an assumed 30 days.
  • Timestamp subtraction is unreliable across daylight-saving changes.
  • A leap-day birthday clamps to 28 February in common years.
  • 1900 was not a leap year; 2000 was — the century rule matters.

FAQ

Age Calculator questions

How is exact age calculated?

By subtracting year, month and day separately and borrowing when needed. If the day is negative, add the number of days in the preceding month and reduce the month count by one; if months then goes negative, add 12 and reduce years.

Why do some age calculators give a different answer?

Most subtract two timestamps and divide by 86,400,000. Across a daylight-saving change a day is 23 or 25 hours, so the division can land a day out. Working with calendar dates avoids the problem entirely.

How are different month lengths handled?

By borrowing the actual length of the month before the reference date. From 31 January to 28 February the borrow uses January's 31 days, giving 28 days — not the 27 or 29 that a fixed 30-day assumption produces.

What happens with a 29 February birthday?

In common years the birthday clamps to 28 February, which is the convention most legal systems use. The calculator applies the full leap rule, so 1900 is correctly treated as a common year and 2000 as a leap year.

What is the leap year rule exactly?

A year is a leap year if divisible by 4, except centuries, which must also be divisible by 400. So 1996 and 2000 are leap years, but 1900 and 2100 are not. Calculators that only check divisibility by 4 are wrong for century years.

Can I calculate age at a future date?

Yes. Change the reference date to any date you like. This is useful for checking eligibility against a cut-off, such as a school admission or a scheme's qualifying date.

Why does total days not match years times 365?

Because leap years add a day roughly every four years. Over 36 years that is nine extra days, so a simple multiplication drifts by more than a week.

How is the day of the week worked out?

From the number of days since a known reference point, taken modulo seven. Because it is derived from the calendar rather than a timestamp, it is correct for any date without depending on your device's clock.

Is my date of birth stored?

No. The calculation is arithmetic performed in your browser. A date of birth is personal information and it is never transmitted, logged or retained anywhere.

Discover

Related calculators