Age Calculator Pro logoAge Calculator Pro

Leap Years and Age Calculation: The February 29 Edge Case

A leap-day birthday sounds like a fun quirk. It also happens to be one of the most common places age-calculation code gets things wrong. This guide explains the rules, the edge cases, and how our engine handles them.

Editorial teamPublished June 23, 20266 min read

Why leap years exist at all

Earth takes about 365.2422 days to orbit the sun. A 365-day calendar year drifts by roughly a quarter of a day every year, which adds up to a full day every four years. If left alone, the seasons would slowly slide out of sync with the calendar over centuries.

The Julian calendar addressed this with a simple rule: add a leap day every four years. This over-corrected slightly, because 365.25 is a hair more than the true orbital period. The Gregorian reform in 1582 refined the rule further:

  • Every year divisible by 4 is a leap year.
  • Except years divisible by 100 - those are not leap years.
  • Except years also divisible by 400 - those are leap years.

So 1900 was not a leap year, but 2000 was. And 2100 will not be, even though 2096 and 2104 will. Our calculator follows the Gregorian rule strictly, which is the same convention used by every mainstream operating system and browser.

What happens to a February 29 birthday

The tricky question is: if you were born on February 29, when do you celebrate in a non-leap year? Legally, jurisdictions handle this differently.

ApproachWhere it is commonWhat it does
Celebrate March 1UK, Hong Kong, and much of the common-law worldAge increments on March 1 in non-leap years.
Celebrate February 28Taiwan, New Zealand (in some contexts)Age increments on February 28 in non-leap years.
Age only on real leap daysCultural convention among some "leaplings"Person only ages up every four years - fun trivia, not law.

Our engine picks a consistent, defensible choice: on non-leap years, a February 29 birthday is considered to occur on March 1 for the purpose of the whole-year rollover. This matches the majority common-law convention and gives an answer that is generally acceptable on official forms. If your jurisdiction uses the February 28 convention, subtract one day from your result.

How the year count itself is affected

Once whole years are correctly counted, the day count naturally accommodates extra leap days. Suppose you were born on January 1, 2000 - a leap year. By January 1, 2020, you have lived exactly 20 calendar years and 7,305 days. That is 365 × 20 = 7,300, plus 5 extra days for the leap years in 2000, 2004, 2008, 2012, and 2016. (2020 has not yet added its extra day by January 1.)

The general rule: over an N-year span, the number of leap days is N / 4 - N / 100 + N / 400, rounded down at each step, and adjusted slightly for how the span aligns with century boundaries. For most personal use, our engine handles this arithmetic for you.

Why some homemade calculators get this wrong

A shockingly common bug is calculating age with "days divided by 365". For someone born January 1, 1990, checking their age on January 1, 2026, the true age is exactly 36 years and 0 days. But if a calculator computes 13,149 days ÷ 365, it gets about 36.03 years and rounds down to 36 - correct by luck. Shift the same person to February 28 or March 1 in different years and the rounding-luck goes away, and the number of "months remaining" starts to drift.

The right fix is not "divide by 365.25" - it is calendar decomposition: count whole years, then whole months, then leftover days, using the calendar itself rather than an average. That is what our engine does, and it is why the year-month-day numbers you see match the ones a human reviewer would produce by counting on their fingers.

Edge cases worth knowing

  • Born on February 29, calculating age on February 28 of a non-leap year. Our engine returns the age as of March 1 (i.e., increments the year on March 1). You will effectively see the "not yet had a birthday this year" result on February 28.
  • Long spans that cross a century. The 1900/2100 non-leap century years matter for people born in the late 1800s or projections into the late 21st century. Our engine handles the Gregorian rule for all supported browsers.
  • Historical dates before the Gregorian reform (1582). Different countries adopted the Gregorian calendar at different times. Our engine treats all dates using the modern Gregorian rule, which is standard for online calculators. For historical research work, consult a specialised source.

Try it yourself

Head to the calculator and enter a leap-day date of birth (like February 29, 1996). Pick a few different calculate-at dates near the end of February in non-leap years and see how the result rolls over. If you would like the underlying math walked through in more detail, our companion articleHow Age Is Calculated covers it end-to-end.