How to Calculate Your Exact Age in Years, Months and Days
Why calculating exact age isn't just 'this year minus birth year,' the correct step-by-step method, and a worked example.
Published July 12, 2026
Calculating age precisely — not just “how many years” but the exact years, months and days elapsed since a birth date — is a genuinely fiddly calendar problem, since months have different lengths and the naive “subtract the years” approach breaks the moment a birthday hasn’t happened yet this year.
Why simple subtraction doesn’t work
The obvious approach — subtract birth year from current year — works only if the birthday has already occurred this calendar year. Someone born March 15, 1990, calculated on July 12, 2026 using simple year subtraction (2026 − 1990 = 36) happens to get the right answer here, since March has already passed by July. But calculated on January 12, 2026 instead, simple subtraction still says 36, even though that person’s birthday hasn’t happened yet that year — they’re still genuinely 35, not yet 36, until March 15 arrives. This is exactly the “off by one” error that naive age calculation runs into constantly, and it’s why a correct method needs to actually check whether the birthday has passed yet in the current year, not just subtract years.
The correct step-by-step method
Start by subtracting years the naive way, then check and correct using months and days:
- Subtract birth year from the current (or target) year to get a starting year count.
- Subtract birth month from current month. If negative, borrow one year from the year count (subtract 1) and add 12 to the month count.
- Subtract birth day from current day. If negative, borrow one month from the month count (subtract 1) and add the number of days in the previous month (relative to the target date) to the day count.
Working through an example: someone born March 15, 1990, age calculated as of July 12, 2026. Years: 2026 − 1990 = 36. Months: July (7) − March (3) = 4. Days: 12 − 15 = −3, which is negative, so borrow: months becomes 3, and days becomes −3 plus the number of days in June (the month before July) — 30 days — giving 27. Final result: 36 years, 3 months, 27 days.
| Step | Years | Months | Days |
|---|---|---|---|
| Naive subtraction | 36 | 4 | −3 |
| After borrowing | 36 | 3 | 27 |
Why “borrow the previous month’s day count” matters
The day-borrowing step is where month-length variation actually enters the calculation, and it’s the step most naive implementations get wrong. When the day subtraction goes negative, you’re borrowing a full month from the month count and need to know how many days that borrowed month actually contained — and since months range from 28 to 31 days, the correct number to add back depends on which specific month is being borrowed, not a fixed constant. A calculation that always adds back 30 (assuming every month is the same length) will produce a slightly wrong day count whenever the actual borrowed month had 28, 29, or 31 days instead.
Leap years and February 29 birthdays
Leap years add one further wrinkle: a birthday of February 29 only occurs on the actual calendar every four years (with the additional century-year exception — 1900 wasn’t a leap year, but 2000 was, following the rule that century years are only leap years if divisible by 400). Someone born on February 29 doesn’t have a literal calendar birthday most years, and different systems handle this differently — treating the “birthday” as February 28 or March 1 in non-leap years is a genuine judgment call, not a mathematically forced choice, worth being aware of if you’re calculating age for a February 29 birth date specifically.
Calculating it directly
The Age Calculator on this site applies this exact borrow-correctly method, handling variable month lengths and leap years automatically rather than assuming every month is the same length. For the more general question of elapsed time between any two dates (not specifically framed as “age”), the Date Difference Calculator covers the same underlying calendar math, and the Days Until Calculator answers the related but distinct question of counting down to a specific future date.
Related calculators
Age Calculator
Find your exact age in years, months and days from your date of birth — down to the total number of days you've been alive.
Date Difference Calculator
Find the exact number of days, weeks, months and years between any two dates — useful for durations, deadlines and everything in between.
Days Until Calculator
Count down the days, weeks and months remaining until any future date — perfect for deadlines, holidays and countdowns.