Guides

How to Calculate Age in Years from a Birth Date

Calculate age in years from a birth date with the 365-day formula, five steps and a worked 1989 example. Learn about leap years and working back from your age.

Miryori Editorial Team5 min read
Try the Age in Years Calculator

Ask how old someone is and you will usually get an answer in years, even though the underlying quantity is the span between two calendar dates. The age in years calculator turns that span into a number, and it also runs the question in reverse: give it an age and it can find the corresponding birth date. This article explains both directions using only the method and figures behind the tool.

Age in years is the interval between a birth date and a reference date, expressed in years. The calculator subtracts the date of birth from the current date and shows the result in years, months, weeks, days, hours, minutes and seconds. By hand, combine the year, month and day differences as (years × 365) + (months × 31) + days, then divide by 365. That hand method ignores leap years, so it is an approximation; the calculator includes them.

What formula turns a birth date into age in years?

The calculator's own equation is a direct subtraction of the two dates:

yourAge=currentDate−DOB\text{yourAge} = \text{currentDate} - \text{DOB}

Here DOB\text{DOB} is the date of birth and currentDate\text{currentDate} is the reference date, which defaults to today but can be changed to any other date. The result is then presented in smaller units as well.

For a hand calculation, the source method assumes that every year has 365 days and every month has exactly 31 days. First express the gap in days, then convert it to years:

age in days=(years×365)+(months×31)+days\text{age in days} = (\text{years} \times 365) + (\text{months} \times 31) + \text{days}

age in years=age in days365\text{age in years} = \frac{\text{age in days}}{365}

In these expressions, years\text{years}, months\text{months} and days\text{days} are the differences between the birth date and the reference date, not the values shown on either date itself.

How do the year, month and day differences combine?

Each component of the gap is computed separately and then fed into the age-in-days formula. The worked example in the source — a person born on July 4, 1989, compared with July 5, 2022 — shows every term:

Quantity Expression from the source Value
Year difference 2022 − 1989 33
Month difference July to July 0
Day difference 5 − 4 1
Age in days (33 × 365) + (0 × 31) + 1 ≈ 12,046
Age in years 12,046 ÷ 365 33.0027

The source notes that the year difference of 33 is the person's age if the date being compared with were their birthday in the current year. Here the reference date is one day after the birthday, which is why the month difference is zero and the day difference is one.

How do I calculate age in years step by step?

The five-step procedure in the source applies to any pair of dates:

  1. Take the difference between the current year and the birth year: years = current year − birth year.
  2. Take the difference between the current month and the birth month: months = current month − birth month.
  3. Take the difference between the current day and the birth day: days = current day − birth day.
  4. Replace these differences in the age formula: age = (years × 365) + (months × 31) + days. This is the age in days.
  5. Divide the result by 365 to get the age in years.

Worked example: born July 4, 1989, as of July 5, 2022

Using the five steps above with a birth date of July 4, 1989 and a reference date of July 5, 2022 gives a year difference of 33, a month difference of 0 and a day difference of 1. Substituting those values produces time = (33 × 365) + (0 × 31) + 1, or approximately 12,046 days. Dividing by 365 gives 12,046 ÷ 365 = 33.0027 years.

The source describes this result as approximate because it does not consider leap years. The age in years calculator does include leap years, and it can also report the same interval in days, hours, minutes and seconds.

Why is the hand calculation only an approximation?

Assuming 365 days in a year and 31 days in every month makes the arithmetic short, but neither assumption matches the calendar exactly. Over a long life the missing leap days accumulate, so the hand result drifts away from the calendar-based answer the calculator produces. Treat the formula as a quick estimate and the calculator's figure as the precise one.

The tool reports the interval in several units at once. Alongside the age in years, its presentation fields show months, weeks, days, hours, minutes and seconds, all derived from the same difference between the two input dates.

How do I use the age in years calculator?

The calculator needs two dates and returns one main result:

Field Source label Role
DOB Date of birth The starting date of the interval
currentDate Current date The reference date; defaults to today and can be changed
yourAge Your age The computed result in years
months, weeks, days, hours, minutes, seconds presentation outputs The same interval in smaller units

Enter the birth date, leave the current date on today's default or choose a different reference date, and read the age from the Your age field. Because the reference date is editable, the same tool also answers how old someone was on any other date you choose.

The reverse direction works with the same inputs in mind. To find a date of birth, enter the person's age in years, months and days, and the tool calculates the date that matches it.

FAQ

How do I calculate someone's age in years?

Subtract the birth year from the current year, the birth month from the current month and the birth day from the current day. Put those three differences into age = (years × 365) + (months × 31) + days to get the age in days, then divide by 365 for the age in years.

How old is the oldest person ever?

Jeanne Calment is the oldest person whose age was verified. She lived 122 years and 164 days, from February 21, 1875 to August 4, 1997.

How old will I be in 2024 if I was born in 2002?

22 years old on your birthday in 2024. Subtract the birth year from the year you are comparing with: 2024 − 2002 = 22.

Can the calculator find a date of birth from an age?

Yes. Enter the person's age in years, months and days, and the tool works backward to find the corresponding date of birth.

References

  • Omni's age in years calculator reference content: the 365-day and 31-day approximation formula, the five-step method and the worked July 4, 1989 example.
  • The calculator's own equation, field labels and presentation units (DOB, currentDate, yourAge, months, weeks, days, hours, minutes, seconds).
  • Standard calendar references covering leap years and the 86,400-second day underlying the tool's unit conversion.
Calculator

Age in Years Calculator

Age in Years: age in years calculator can calculate a person's age from their birth date and find their birthdate from their years!. Free, fast and private.

Try the Age in Years Calculator