How to Calculate Age: Complete Guide

Learn to calculate age manually, in Excel, and with Python. Includes examples.

Skip the math - use our free age calculator for instant, accurate results:

Calculate Age Instantly

Method 1: Calculate Age Manually

Follow these simple steps to calculate someone's age by hand:

  1. Write down the current date in day-month-year format.
  2. Write down the birth date in the same format.
  3. Subtract the birth year from the current year to get the initial age.
  4. Check the months: If the current month is before the birth month, subtract 1 from the year result.
  5. If months are equal but the current day is before the birth day, subtract 1 year.
  6. Calculate remaining months by counting forward from the birth month to the current month.
  7. Calculate remaining days by counting forward from the birth day.

Example: Born March 15, 1990. Today is June 10, 2026.

  • Years: 2026 − 1990 = 36 years
  • Months: June (6) − March (3) = 3 months
  • Days: 10 − 15 = −5 → borrow 1 month → 2 months, 25 days
  • Final Result: 36 years, 2 months, 25 days

Method 2: Calculate Age in Excel

Use the DATEDIF function for accurate age calculation in Microsoft Excel or Google Sheets:

=DATEDIF(A1, TODAY(), "Y") & " years, " & DATEDIF(A1, TODAY(), "YM") & " months, " & DATEDIF(A1, TODAY(), "MD") & " days"

Put the birth date in cell A1. This formula accounts for leap years automatically.

Method 3: Calculate Age in Google Sheets

Google Sheets uses the same DATEDIF formula as Excel:

=DATEDIF(A1, TODAY(), "Y")

This returns just the full years. Use the extended formula above for years, months, and days.

Method 4: Calculate Age in Python

For developers, here's a simple Python script:

from datetime import date

birth = date(1990, 3, 15)
today = date.today()
age = today.year - birth.year - ((today.month, today.day) < (birth.month, birth.day))
print(age)

Handling Leap Years

If someone is born on February 29 (leap day), their legal birthday is usually considered March 1 in non-leap years (or February 28 in some jurisdictions). Our DOB calculator handles this automatically.

A leap year occurs every 4 years, except for years divisible by 100 but not by 400. For example, 2000 was a leap year, but 1900 was not.

Chronological Age vs Other Types

  • Chronological age: Time since birth (what most calculators show).
  • Biological age: How old your body seems based on health markers.
  • Mental age: Your cognitive ability level compared to average.
  • Korean age: 1 at birth, +1 every January 1st (phased out legally in 2023).

Frequently Asked Questions

How do I calculate my age from my date of birth?

Subtract your birth year from the current year. If your birthday hasn't happened yet this year, subtract 1. Use our age calculator to get the exact months and days automatically.

What is the formula to calculate age in Excel?

Use =DATEDIF(A1, TODAY(), "Y") where A1 contains the birth date. For years, months and days, use the extended formula shown in the guide above.

How does a leap year affect age calculation?

Leap years add an extra day (February 29) every 4 years. If born on Feb 29, most legal systems use March 1 as your birthday in common years. Good calculators handle this automatically.

Related Tools