Σ Smart Calculators
Free · No sign-up required

Age Calculator

Calculate your exact age in years, months, and days — plus total weeks, days, hours, minutes, and seconds — and count down to your next birthday.

Age inputs

What this age calculator does

This calculator tells you your exact age the way humans actually count it: years, months, and days. It also expresses how long you have been alive in total months, weeks, days, hours, minutes, and seconds, and shows how many days remain until your next birthday. Enter a birth date, leave the "as of" field on today (the default), and press Calculate.

Why is this more useful than a simple "years old" number? Because age is a weird unit. A year is not a fixed number of days — 2024 had 366, 2025 will have 365 — and a month ranges from 28 to 31 days. Most online calculators take shortcuts (dividing milliseconds by 30.44 or 365.25) which give wrong answers around leap years and month boundaries. This one uses calendar-aware arithmetic so the result matches common sense.

How the calculation works

The algorithm is the same one you would use on paper. Starting from the "as of" date, we subtract the birth date:

  1. Subtract the year portion: years = asOf.year − birth.year.
  2. Subtract the month portion: months = asOf.month − birth.month.
  3. Subtract the day portion: days = asOf.day − birth.day.
  4. If days are negative, borrow one month — add the previous month's actual length (28, 29, 30, or 31 days).
  5. If months are now negative, borrow one year — add 12 months.

For the "total" outputs (hours, minutes, seconds) we simply divide the elapsed milliseconds by the appropriate constant. These are accurate to within a few seconds because we operate on dates at midnight, not timestamps.

Worked example

Suppose someone was born on 14 March 1990 and the "as of" date is 2 November 2024.

  • Year diff: 2024 − 1990 = 34
  • Month diff: 11 − 3 = 8
  • Day diff: 2 − 14 = −12 → borrow one month. October has 31 days, so days becomes −12 + 31 = 19. Months becomes 8 − 1 = 7.
  • Final age: 34 years, 7 months, 19 days.
  • Total days lived: approximately 12,651. Total hours: approximately 303,624.
  • Next birthday (14 March 2025) is 132 days away.

Why not just divide by 365.25?

A common shortcut is ageYears = msDiff / (365.25 × 24 × 3600 × 1000) — the 365.25 accounting for leap years in a Gregorian cycle. This gives a reasonable decimal but two bad answers:

  • On your birthday it may read 29.9997 instead of 30. People round down.
  • It hides the months-and-days breakdown that you actually want.

Worse, "years × 365" or "months × 30" approaches fall apart on leap-day birthdays and around 31-day months. Borrow arithmetic on real calendar dates is the only method that always produces the "X years, Y months, Z days" answer humans expect.

Uses for an age calculator

  • Celebrations: count the exact days to a birthday, anniversary, or milestone.
  • Paperwork: figure out precise age for forms that need years and months (child development, passports, retirement eligibility).
  • Parenting: track your child's age in months for growth and vaccine schedules.
  • Fitness & health: age in total days is handy for some fitness age calculations and training plans.
  • Curiosity: see just how many seconds you have been alive — a surprisingly large number that makes deadlines feel a little less scary.

Common mistakes

  • Swapping the two dates. If your "as of" date is before your birth date the calculator throws an error. Make sure birth comes first.
  • Wrong time zone expectations. Dates are treated as midnight local time. If you compare across time zones the total hours can differ by a few hours; for everyday age that is invisible.
  • Assuming every month is 30 days. It is not. The calculator borrows from the correct calendar month, so "one month old on the 31st" is treated correctly even when the previous month was February.
  • Expecting exact decimals. "34.58 years" is not very meaningful — use the years+months+days breakdown instead.

When to consult a professional

For legal, medical, or tax purposes where exact ages matter (age of consent, age-dependent insurance rates, statute-of-limitations dates, certain benefit entitlements), always cross-check with an official document and the relevant authority. This calculator is mathematically correct, but the legally binding age in any given jurisdiction may depend on local conventions (for example, whether someone born on 29 February reaches age 18 on 28 February or 1 March in a non-leap year).

Frequently Asked Questions

How does this age calculator work?
It performs calendar-aware subtraction. Starting from the "as of" date, it subtracts the birth date year by year, then month by month, then day by day — borrowing from the previous month when the day has not yet been reached. The result ("X years, Y months, Z days") is exactly how humans count age in everyday conversation. It also expresses your lifetime in total months, weeks, days, hours, minutes, and seconds.
Does the calculator handle leap years correctly?
Yes. The engine uses the host calendar (JavaScript Date constructed from year, month, day), which natively knows that 2024 has 366 days and that February 29 only exists in leap years. When a non-leap year has passed between a leap-day birthday and "today", the calculator still counts one full year as expected.
How are people born on February 29 handled?
For everyday age, someone born on 29 February is one year older each year on their birthday, just like anyone else. In non-leap years the calculator treats their "next birthday" as 1 March, which is the civil convention in most countries. In leap years, 29 February is used.
What does "total months" mean?
Total months is years × 12 + months — the number of complete calendar months you have lived. It is not the diff in milliseconds divided by 30.44, because months have different lengths. This is the figure you would give if someone asked how many months old your child is.
Why are hours, minutes, and seconds the same per day?
Because they are derived from the elapsed milliseconds using 24-hour days. Local daylight-saving-time transitions can add or subtract an hour from a particular day in local time, so if you compare two timestamps across a DST boundary the totals may be off by up to an hour. For everyday age this is not visible because we operate on calendar dates (midnight-to-midnight).
Can I calculate age on a future date?
Yes. Change the "as of" date to any date after the birth date to see how old someone will be then. Useful for planning birthdays, milestones, or checking retirement eligibility. The calculator will reject any "as of" date earlier than the birth date.
Why is my age in days not exactly years × 365?
Because of leap years. A 30-year-old has lived through roughly 7 or 8 leap days, so their total days are around 30 × 365 + 7 = 10,957. The exact number depends on which specific years contained a 29 February during your life, which is why the calculator computes it directly rather than using an average.
When is the next birthday countdown?
The result shows the next birthday after the "as of" date and how many days away it is. If "as of" is the birthday itself, the countdown reads 0 and will roll over to next year on the day after. Use this for reminders, planning, or answering the "how many days until my birthday?" question precisely.