Age Calculator

Work out an exact age in years, months and days between a birth date and any reference date.

Result

Age
20 years, 0 months, 0 days
Total months
240
Total weeks
1,043.6
Total days
7,305
Export:

How the age is worked out

Age is built up one unit at a time, largest first. The calculator subtracts the birth year from the reference year, then the months, then the days. When the day of the month in the reference date has not yet caught up to the birth day, it would leave a negative number of days, so the tool "borrows" a month and adds back the number of days in the preceding month. The same borrow happens at the month level if needed.

This is exactly how people count birthdays in conversation: you have a full year only once the same calendar date comes around again. Because calendar months are uneven (28 to 31 days), a day-based borrow keeps the years-months-days figure aligned with the real calendar rather than an average month length.

Reading the totals

Below the headline years-months-days figure you also get the span expressed entirely in months, weeks and days. These are useful for different purposes: total months suits subscription or milestone tracking, total weeks is handy for pregnancy or infant ages, and total days is the precise count used for things like day-of-life records.

The three totals describe the same elapsed time in different units, so they will not add together — each is a complete answer on its own scale.

Tips and common mistakes

A few things to keep in mind so the result matches what you expect:

  • The reference date must be on or after the birth date; a future birth date returns an error rather than a negative age.
  • Set the "as of" date to today to get a current age, or to any past or future date to age someone at that moment.
  • Leap days are handled by the calendar arithmetic, so a 29 February birthday is counted correctly in common years.
  • Time of day is ignored — the calculator works at whole-day resolution, so two dates count as a full day apart regardless of the hour.

Formula

years/months/days = calendar difference; totalDays = (asOfDate − birthDate) / 86400000

Frequently asked questions

How are months counted?
Whole calendar months are counted between the dates. When the day-of-month has not yet been reached, days are borrowed from the previous month, matching how birthdays work.