Guides › Sound & time

When is a leap-day baby a year older? Age calculation edge cases, tested

Calculating an age looks trivial: subtract the birth year from this year, and take one off if the birthday has not happened yet. That works for most dates. It breaks for people born on 29 February, for "months" that have different lengths, and for software that adds months naively. We tested the awkward cases with our age calculator and compared it with a shortcut many programs use.

Short answer: in years that have no 29 February, our calculator treats a leap-day birthday as falling on 1 March. "One month" after 31 January has no single right answer; our calculator completes a month only when the same day number is reached, so 31 January to 29 February is still 0 months and 29 days, and the first full month is counted on 1 March. Watch out for software that simply adds a month to the date: in JavaScript, 31 January 2001 plus one month gives 3 March.

The test cases

BornOn dateOur resultNext birthday in
29 Feb 200428 Feb 202520 years, 11 months, 30 days1 day
29 Feb 20041 Mar 202521 years, 0 months, 1 day0 days (today)
29 Feb 200429 Feb 202824 years exactly0 days (today)
31 Jan 200029 Feb 20000 months, 29 days-
31 Jan 20001 Mar 20001 month, 1 day-
31 Jan 200031 Mar 20002 months exactly-
31 Mar 200030 Apr 20000 months, 30 days-
31 Mar 20001 May 20001 month, 1 day-
15 Aug 199019 Nov 202636 years, 3 months, 4 days (13,245 days)269 days

Leap-day birthdays

Someone born on 29 February has an exact birthday only once every four years. In other years there are two reasonable conventions: the birthday is 28 February (the last day of their birth month) or 1 March (the day after 28 February, when the 29th would have passed). Our calculator uses 1 March: on 28 February 2025 it shows 20 years and counts one day to the birthday; on 1 March it shows 21 years. On that date the days figure still counts from 28 February, the last day of February that year; this is a quirk of how our calculator anchors months.

For legal purposes, such as when someone becomes an adult, the rule is set by each country's law and can differ from either convention. If the exact day matters, check the law that applies rather than relying on any calculator.

Why "one month" is ambiguous

Months have 28 to 31 days, so "one month after 31 January" cannot always land on the 31st. Our calculator adds a month only once the same day number has been reached. If the month is too short, the last day of that month becomes the anchor for counting the leftover days. That gives the results in the table: from 31 January the first full month is reached on 1 March (1 month, 1 day, counted from 29 February in 2000), and from 31 March on 1 May (1 month, 1 day, counted from 30 April).

Java's built-in Period.between gives the same results for the month cases in our table, but conventions do differ between programs. That is why our calculator also shows the total number of days, which is never ambiguous: 13,245 days is exact whatever convention is used for months.

The shortcut that goes wrong

Many programs add a month by increasing the month number of a date and letting the computer sort out the rest. In JavaScript, that is setMonth(). We tested it:

The same kind of overflow is behind subscription renewals and payment reminders that drift from the 31st to the 3rd of the next month. A calculator built on that shortcut would also give different ages depending on the month in which you check.

Different ways of counting age

Most of the world counts age in completed years from birth, the method our calculator uses. South Korea traditionally used a different system in which a baby is one year old at birth and everyone gains a year on 1 January. Since 28 June 2023, Korean civil and administrative law uses the international method, defined in Article 158 of the Civil Act. A few specific laws still count by calendar year (the current year minus the birth year), so the answer to "how old" can still depend on the context in Korea. This is general information, not legal advice.

Practical tips

What a wider sweep showed

To see how these rules behave day by day, we entered 91 date pairs into the calculator, including every day from 25 February to 3 March in 2025 to 2028 for a 29 February birthday, and the days from late February to early March in 2000 and 2001 for birthdays on 28 to 31 January (29 to 31 January in 2000).

You can download the results and check them yourself. Both files are .csv and open in any spreadsheet; each starts with a header row.

Common questions

How many days old am I?

Enter your date of birth and today's date in the age calculator. The "total days" figure counts every calendar day, including leap days.

Does the time of birth matter?

For age in years, months and days, no. For an age in hours, the time of birth and the time zone would both matter, and the calculator does not use them.

Why does a different website give one day less?

Some calculators count the end date as included, others do not, and conventions for month lengths differ. Compare the total number of days to see whether the difference is only in how months are counted.

References

  1. Korean Law Information Center: Civil Act, Article 158 (age calculation, amended 2023)
  2. MDN: Date.prototype.setMonth() and date overflow
  3. Oracle Java SE: java.time.Period.between
  4. ISO 8601: Date and time format

Written and checked by Ria Kim for GlowHalo; figures without a source link come from the steps shown on this page. Companion tool: Age & Date Calculator. Spotted an error? Write to help@glowhalo.org.

More guides

Sound & timeWhite, pink or brown noise? We measured what each one actually containsWe analysed the noise our generator produces, octave by octave. The difference is where the energy sits, and it explains why brown noise sounds 'softer'.Read guide →Sound & timeWhy your international meeting moved by an hour: the daylight saving gaps of 2026The US, Europe and Australia change clocks on different dates. We computed every 2026 change and the weeks when the usual time difference is wrong.Read guide →Sound & timeCan a browser metronome keep time? setInterval against the audio clockWith simulated page load, setInterval clicks arrived up to 120 ms late in our test; clicks scheduled on the audio clock land on exact sample positions. How to tell a good web metronome.Read guide →