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
| Born | On date | Our result | Next birthday in |
|---|---|---|---|
| 29 Feb 2004 | 28 Feb 2025 | 20 years, 11 months, 30 days | 1 day |
| 29 Feb 2004 | 1 Mar 2025 | 21 years, 0 months, 1 day | 0 days (today) |
| 29 Feb 2004 | 29 Feb 2028 | 24 years exactly | 0 days (today) |
| 31 Jan 2000 | 29 Feb 2000 | 0 months, 29 days | - |
| 31 Jan 2000 | 1 Mar 2000 | 1 month, 1 day | - |
| 31 Jan 2000 | 31 Mar 2000 | 2 months exactly | - |
| 31 Mar 2000 | 30 Apr 2000 | 0 months, 30 days | - |
| 31 Mar 2000 | 1 May 2000 | 1 month, 1 day | - |
| 15 Aug 1990 | 19 Nov 2026 | 36 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:
- 31 January 2001 plus one month gave 3 March 2001. February 2001 has 28 days, so "31 February" overflowed by three days.
- 31 January 2000 plus one month gave 2 March 2000, because 2000 was a leap year.
- Creating the date 29 February 2025 directly gave 1 March 2025.
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
- For official forms, enter the date of birth, not an age; the organisation will apply its own rules.
- When counting days to an event across time zones, a date can change before or after midnight in your own zone; our time zone converter shows the local date at the other end.
- For durations under a few months, such as a baby's age in weeks or the days since an event, use the total-days figure.
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).
- Leap-day birthdays were consistent every year. In 2025, 2026 and 2027 the age changed on 1 March, and in 2028 on 29 February. In each non-leap year, 28 February showed 11 months and 30 days with 1 day to the birthday.
- Different birthdays can give the same answer. On 1 March 2001, birthdays of 28, 29, 30 and 31 January all showed "1 month, 1 day", although the total days were 32, 31, 30 and 29. Only the 28 January birthday ever showed "1 month, 0 days" that year (on 28 February). The total-days figure is the one that tells these cases apart.
- Near the end of a month, the shortcut often goes wrong. We also applied JavaScript's "add one month" to every date from the 29th to the 31st in 2000 and 2001, 59 dates in all. In 13 of them, about one in five, the result skipped into the month after next, for example 31 May to 1 July instead of 30 June.
You can download the results and check them yourself. Both files are .csv and open in any spreadsheet; each starts with a header row.
- 91 date pairs from our calculator: one row per pair with columns set (case for the nine dates in the table, leapday-sweep or month-end-sweep), born, on_date, years, months, days, total_days and days_to_next_birthday, copied from the calculator's screen.
- 59 month-end dates plus one month in JavaScript: columns start_date, after_setMonth_plus_1 and result, where "overflow" means the result went past the end of the next month.
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
- Korean Law Information Center: Civil Act, Article 158 (age calculation, amended 2023)
- MDN: Date.prototype.setMonth() and date overflow
- Oracle Java SE: java.time.Period.between
- 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.