Calculators

How to Calculate Age from Date of Birth

Calculating age precisely — in years, months, and days — is more involved than it appears. Here is the full method, including how to handle months, leap years, and the common edge cases that trip people up.

The step-by-step method

1.
Calculate complete years
Subtract the birth year from the current year. If the birth month/day has not occurred yet this calendar year, subtract 1. This gives your age in complete years.
2.
Calculate remaining months
Subtract the birth month from the current month. If the current day-of-month is before the birth day-of-month, subtract 1 more month. If the result is negative, add 12.
3.
Calculate remaining days
Subtract the birth day-of-month from the current day-of-month. If this is negative, add the number of days in the previous month.

Age calculation in spreadsheets

If you need to calculate age in bulk (e.g. from a spreadsheet of birth dates), use the DATEDIF function:

=DATEDIF(A1, TODAY(), "Y")Age in complete years
=DATEDIF(A1, TODAY(), "YM")Remaining months after full years
=DATEDIF(A1, TODAY(), "MD")Remaining days after full months
=INT((TODAY()-A1)/365.25)Approximate age (fast but less precise)

Where A1 contains the date of birth. Works in both Microsoft Excel and Google Sheets.

Common edge cases

Leap year birthdays (February 29): In non-leap years, the birthday is typically observed on March 1 (in most countries) or February 28 (in some). For age calculation, the person turns a year older on that date.

Month-end birthdays: If you were born on January 31, the equivalent date in February is February 28 (or 29 in a leap year) since February has no 30th or 31st. The calculation adjusts for this automatically.

Cross-midnight calculations: For most practical purposes, age is based on the calendar date, not the exact time of birth.

Calculate your exact age instantly

Enter your date of birth — get years, months, days, total days lived, and next birthday. Free.

Open Age Calculator →

Frequently asked questions

How do you calculate age from a date of birth?

Subtract the birth year from the current year to get the approximate age. Then check whether the birthday has occurred yet this year — if not, subtract one from the result. For a more precise answer including months and days: take the difference in months (accounting for whether the birth day-of-month has passed this month), then take the remaining days. A calculator handles all of this automatically.

How do you calculate age in Excel or Google Sheets?

In Excel and Google Sheets, use the DATEDIF function: =DATEDIF(A1, TODAY(), 'Y') gives the age in complete years, where A1 contains the date of birth. For months: =DATEDIF(A1, TODAY(), 'YM'). For days: =DATEDIF(A1, TODAY(), 'MD'). Alternatively, =INT((TODAY()-A1)/365.25) gives an approximate age in years.

What is the formula for calculating age?

The conceptual formula is: Age = Current Date - Date of Birth. In practice: (1) subtract birth year from current year, (2) if the birth month/day hasn't occurred yet this year, subtract 1. For months: count how many complete months since the last birthday. For days: count remaining days after the complete months. Edge cases include leap years (February 29 birthdays) and months with different lengths.

How do you calculate age in years and months?

First calculate complete years (as above). Then for months: subtract birth month from current month. If the day of the current month is before the birth day-of-month, subtract one month and add the days from the previous month's end to get remaining days. This gives you years + months + days as three separate components.

How do you account for leap years when calculating age?

Leap years affect age calculation primarily through February 29 birthdays — people born on this date need a rule for non-leap years (most jurisdictions use March 1 or February 28). For total-days-lived calculations, leap years add an extra day every four years (roughly), which is why the total days calculation uses actual calendar logic rather than multiplying years by 365.

Why does my age calculator give a different answer than I expected?

The most common reason is the birthday-not-yet-occurred issue. If your birthday is later this year, you are still the age from your last birthday — not current year minus birth year. A second common source of confusion is timezone differences — calculators use your device's local date, which may differ from where you were born if you are in a different country.