Gearboxly
Date & TimeHow-toCalculators

How to Calculate Age From a Date of Birth

By Gearboxly4 min read

Working out an age sounds trivial — subtract the birth year from this year — until you need it to be *exact*, in years, months and days, and the birthday hasn't happened yet this year. Then the little edge cases start to bite.

Here's how to calculate age correctly, the gotchas to watch for, and the easy way to get an exact answer.

The quick method (and its flaw)

The rough version is: current year − birth year. But that's only right if the birthday has already passed this year. If it hasn't, you've counted a year too many. The fix: subtract one if today is *before* this year's birthday. That gives the correct age in whole years.

Exact age in years, months and days

For a precise age, work down the units: subtract the years, then the months, then the days — and 'borrow' when a value goes negative (much like long subtraction). If the day-of-month comes out negative, borrow a month; if the month comes out negative, borrow a year. Doing this by hand is fiddly, which is exactly why a calculator helps.

The leap-year gotcha: people born on February 29 technically only have a 'real' birthday every four years. Most systems treat their birthday as Feb 28 (or Mar 1) in common years — worth knowing when a date looks off by a day.

Calculate it instantly

Enter a birth date and get an exact age in years, months and days with the free Age Calculator — it handles the borrowing and leap years for you.

Age CalculatorFind your exact age in years, months and days.

Related date calculations

Tools mentioned in this post

Frequently asked questions

Subtract the birth year from the current year, then subtract one if this year's birthday hasn't happened yet. For an exact age, break it down into years, months and days.

Subtract each unit in turn — years, then months, then days — borrowing when a value goes negative. An age calculator does this automatically.

Leap-day birthdays only occur every four years, so most systems treat the birthday as Feb 28 or Mar 1 in non-leap years.

Use a date difference calculator, which counts the exact days, weeks, months or years between any two dates.

Yes. The age and date tools run locally — nothing you enter is uploaded.

Keep reading