Guides

How to Calculate Your Age from Your Date of Birth

Calculate your exact age from a birth date: year, month and day formulas, result-unit conventions, calculator steps, and a worked 5 December 2000 example.

Miryori Editorial Team4 min read
Try the Age Calculator

Asking "how old am I?" sounds trivial until you need an exact number of years, months and days. The age calculator builds that answer from two dates: your birth date and the date you want your age measured on. The same method works for a date in the past or in the future, and the result can be shown as full years, months and days, or converted into a single unit such as weeks or seconds.

A person's age is the time that has passed from the moment they were born; in most parts of the world a baby starts at 0 and turns 1 on the first anniversary of their birth. To find it, count the full years to your last birthday, then the full months, then the remaining days. The age calculator does this from a birth date and an "as of" date that defaults to today.

What is the formula for age from a birth date?

The calculator compares the year, month and day of the two dates. A full year is counted only once the birthday has passed in the end year, and a full month only once the same day of the month has been reached. The source equations reduce to three calendar differences:

yearsDiff=yearend−yearstart−{1if monthend<monthstart1if monthend=monthstart and dayend<daystart0otherwise\text{yearsDiff} = \text{year}_{end} - \text{year}_{start} - \begin{cases}1 & \text{if } \text{month}_{end} < \text{month}_{start} \\ 1 & \text{if } \text{month}_{end} = \text{month}_{start} \text{ and } \text{day}_{end} < \text{day}_{start} \\ 0 & \text{otherwise}\end{cases}

monthsDiff={monthend−monthstart+12−1[dayend<daystart]if monthend<monthstartmonthend−monthstart−1[dayend<daystart]if monthend>monthstart11if same month and dayend<daystart0otherwise\text{monthsDiff} = \begin{cases}\text{month}_{end} - \text{month}_{start} + 12 - \mathbb{1}[\text{day}_{end} < \text{day}_{start}] & \text{if } \text{month}_{end} < \text{month}_{start} \\ \text{month}_{end} - \text{month}_{start} - \mathbb{1}[\text{day}_{end} < \text{day}_{start}] & \text{if } \text{month}_{end} > \text{month}_{start} \\ 11 & \text{if same month and } \text{day}_{end} < \text{day}_{start} \\ 0 & \text{otherwise}\end{cases}

daysDiff=dayend−daystart+days in start month⋅1[daystart>dayend]\text{daysDiff} = \text{day}_{end} - \text{day}_{start} + \text{days in start month} \cdot \mathbb{1}[\text{day}_{start} > \text{day}_{end}]

The start values come from the birth date and the end values from the "Calculate age on" date. The source treats a year as a leap year when it divides by 4 but not by 100, unless it also divides by 400, which is why February can contribute an extra day to daysDiff\text{daysDiff}. Time before birth is called gestational age and is counted from conception; the age calculated here begins at birth.

Which result units can the calculator show?

The unit selector offers nine options, from milliseconds up to a combined calendar result. Two of them use averaging conventions that matter when you interpret the output:

Setting Sourced convention
milliseconds Selectable result unit
seconds Selectable result unit
minutes Selectable result unit
hours Selectable result unit
days Selectable result unit
weeks Selectable result unit
months 30.4375 days per month (average)
years 365.25 days per year (accounts for leap years)
years / months / days Exact calendar age; a month runs from a chosen day in one month to the same day in the next (22.02 to 22.03)

The exact option is the one to use when the answer must read like a birthday: it defines a month by matching day numbers rather than by an averaged length.

How do I calculate my age step by step?

Working forward from the date of birth:

  1. Add full years until you reach your most recent birthday: 5.12.2020 - 5.12.2000 = 20 years.
  2. From there, add full months without passing the target date: 5.12.2020 to 5.01.2021 is 1 month.
  3. Add the remaining days: 15.01.2021 - 5.01.2021 = 10 days.
  4. Add the three results: 20 years, 1 month and 10 days.

To let the tool do it, enter your birth date in the first field, optionally set your birth time, leave the third and fourth fields at today for your current age (or change the "Calculate age on" date), and choose the result unit. Time is counted from birth up to and including the moment shown.

Worked example: born 5 December 2000, calculated on 15 January 2021

The source example starts with a birth date of 5.12.2000 and a calculation date of 15.01.2021. The last birthday before that date fell on 5.12.2020, giving 20 full years. Moving forward one month reaches 5.01.2021, still before the target date, so the month count is 1. The remaining span from 5.01.2021 to 15.01.2021 is 10 days. The exact age is therefore 20 years, 1 month and 10 days, which is what the calculator returns with the years/months/days option selected.

Frequently Asked Questions

Does the age calculator need my birth time?

No. Birth time is optional. If you leave it out, the calculator uses 12:00 AM and counts from midnight of the day you were born. The "Include time of birth" setting is there only when you want the result precise to the hour or smaller.

Why subtract a year when my birthday has not happened yet?

Because a full year runs from one birthday to the next. If the end month is before the birth month, or it is the same month but an earlier day, the most recent birthday was in the previous year, so the year difference is reduced by one.

Which age-counting system does this article use?

The common system, in which a baby starts at 0 and becomes 1 on the first anniversary of birth. Some countries, notably Korea, count age differently; this guide and the calculator follow the common system.

Does the result include the current moment?

Yes. Time is counted from birth until the moment shown in the calculation fields, including the current time. That is why an age in hours, minutes or seconds keeps changing while the years/months/days result stays put during the day.

References

  • Omni age calculator source text: age definition, calculator inputs, unit conventions and worked date examples.
  • Calendar arithmetic references on leap-year rules and variable month lengths.
  • Standard date-and-time conventions for the 12:00 AM midnight default.
Calculator

Age Calculator

Calculate Age with practical date & time formulas, interactive references and step-by-step results. Free, fast and private.

Try the Age Calculator