How We Calculate Age

The rules behind every calculator on this site, and the test cases we check them against.

The short version

  • We work with calendar dates, not clock times. “Today” is the date on your device.
  • Age is counted as full years, then full months, then the days left over.
  • In shorter months, a monthly anniversary moves to the last day of the month.
  • If you were born on February 29, you choose whether your birthday falls on February 28 or March 1 in non-leap years.
  • One small calculation engine powers every page, and it runs in your browser.

Years, months and days

Start from the date of birth. The number of birthdays that have passed by the target date gives the years. From the last birthday, the number of monthly anniversaries that have passed gives the months. The days from the last monthly anniversary to the target date are the days.

Example: born May 14, 1990, on November 6, 2026.

  • 36 birthdays have passed, the last one on May 14, 2026: 36 years.
  • Monthly anniversaries since then: June 14 to October 14, so 5 months.
  • October 14 to November 6: 23 days.

The end of the month

Not every month has a 29th, 30th or 31st. When a monthly anniversary would fall on a day that doesn't exist, we use the last day of that month. Someone born on January 31 is one month old on February 28 (February 29 in a leap year) and two months old on March 31.

We use this calendar-month rule everywhere on the site. Some tools treat every month as 30 days instead, which is why results from different calculators can differ by a day or two near the end of a month.

February 29

Non-leap years have no February 29, and countries and organizations disagree on whether a leap-day birthday then falls on February 28 or March 1. So the calculators ask. The choice only changes results on and around the birthday itself.

Totals and decimal age

Total days is the exact number of days between the two dates, with the day of birth as day zero. Total months is years × 12 plus months. Weeks are total days divided by 7, with the leftover days shown. Decimal age is full years plus the share of the current year between birthdays that has passed, so 36.48 means a little under halfway from 36 to 37.

Time zones and clocks

Dates here carry no time of day, so daylight saving changes and time zones can't shift a result. The only exceptions are the live counters, such as seconds alive and the birthday countdown, which use your device's clock and, if you enter it, your time of birth.

Chronological age for tests

Test record forms often use a hand method: subtract the day, month and year columns, borrowing a month as 30 days when needed. The chronological age calculator offers this Borrow-30 method next to the calendar method, with options to keep, drop or round the days.

Weekdays and old dates

Weekdays and day counts use the Gregorian calendar, the one we use today, extended backwards. Britain and its colonies adopted it in 1752 and most of Catholic Europe in 1582, so dates copied from older records may be 6 to 13 days off, depending on the century and the country. The calculators accept years from 1000 onwards.

How we test

An automated test suite runs on every change to the engine. It checks:

  • every day from January 1, 1000 to December 31, 2200, converted to a day number and back;
  • 5,000 random dates against the browser's own date arithmetic;
  • 20,000 random pairs of dates against the rules on this page, under both February 29 rules;
  • the fixed cases below, plus the examples used across the site.

Test cases

BornOnFeb 29 ruleAgeDaysWhat it checks
May 14, 1990Nov 6, 2026Feb 2836 y, 5 m, 23 d13,325A standard case
May 14, 1990Jan 1, 2000Feb 289 y, 7 m, 18 d3,519A date in the past
Jan 31, 2023Feb 28, 2023Feb 280 y, 1 m, 0 d28Born on the 31st, shorter month
Jan 31, 2023Mar 30, 2023Feb 280 y, 1 m, 30 d58One day before the next monthly anniversary
Jan 31, 2024Feb 29, 2024Feb 280 y, 1 m, 0 d29February in a leap year
Feb 29, 2000Feb 28, 2023Feb 2823 y, 0 m, 0 d8,400February 29 birthday, Feb 28 rule
Feb 29, 2000Feb 28, 2023Mar 122 y, 11 m, 30 d8,400February 29 birthday, Mar 1 rule
Feb 29, 2000Mar 1, 2023Mar 123 y, 0 m, 0 d8,401Turning 23 on March 1
Feb 29, 2000Feb 29, 2024Feb 2824 y, 0 m, 0 d8,766A real February 29
Dec 24, 1829Mar 5, 1880Feb 2850 y, 2 m, 10 d18,334Historical dates

Found a mistake?

If a result looks wrong, email hello@example.com with the dates you entered and what you expected. Confirmed errors get fixed and added to the tests.

All age calculators