How does the age calculator work?
An age calculator finds the time between a date of birth and another date, expressed as completed years, months and days. This one also gives the total number of days lived. Leave the "as of" date empty to get your age today, or pick any past or future date to see how old someone was, or will be, on that day.
How to calculate your age
- Enter the date of birth.
- Optionally, set the "as of" date. If you leave it blank, today's date is used.
- Click Calculate. You get four numbers: years, months, days and total days lived.
The "as of" date has to be on or after the date of birth. If it isn't, you'll see an error instead of a negative age.
Worked example
Someone born on 15 May 1990, measured on 5 October 2026:
- Completed years. From 15 May 1990 to 15 May 2026 is 36 years.
- Completed months. From 15 May 2026 to 15 September 2026 is 4 more months.
- Remaining days. From 15 September to 5 October is 20 days.
The result is 36 years, 4 months, 20 days.
For total days, the calculator counts every day between the two dates. The 36 full years contain nine February 29ths (1992 through 2024), so they add up to 36 × 365 + 9 = 13,149 days. From 15 May to 5 October 2026 is another 143 days, giving 13,292 days lived.
Birthdays on February 29
People born on a leap day only get a real birthday once every four years, so a calculator has to decide when they complete a year in the other three. This one uses the date arithmetic in PHP's DateTime::diff, which treats the year as complete on March 1 in non-leap years:
| Born | As of | Result |
|---|---|---|
| 29 Feb 2000 | 28 Feb 2025 | 24 years, 11 months, 30 days |
| 29 Feb 2000 | 1 Mar 2025 | 25 years, 0 months, 0 days |
| 29 Feb 2000 | 29 Feb 2024 | 24 years, 0 months, 0 days |
Some places treat February 28 as the legal birthday in common years instead. If an exact legal age matters, for a licence or a contract for example, check the rule where you live.
In the Gregorian calendar, a year is a leap year if it divides by 4, except century years, which must also divide by 400. That's why 2000 was a leap year and 1900 and 2100 aren't. The calculator follows this rule automatically.
Month-end dates
Months have different lengths, and that can make the months-and-days split look odd when the start date is late in a month. Someone born on 31 March is shown as 0 months and 30 days old on 30 April, because April has no 31st, so the first month isn't counted as complete yet. The same happens from 31 January to 29 February. The years figure and the total-days figure aren't affected; only the way leftover time is split between months and days.
If you need an answer in a single unit, use total days lived. It's unambiguous: divide by 7 for weeks.
Ages in other units
The total-days figure is the easiest way to get other units:
| Unit | How to get it from total days |
|---|---|
| Weeks | Days ÷ 7 |
| Hours | Days × 24 |
| Minutes | Days × 1,440 |
For the worked example, 13,292 days is 1,898 weeks and 6 days, or 319,008 hours. These figures assume every day is 24 hours long, which is close enough for anything except a birth certificate that records the minute.
What this calculator doesn't do
- It works in whole days and ignores the time of birth, so it won't tell you your age in seconds.
- It doesn't adjust for time zones. If you were born in one country and live in another, your birth date is taken as written.
- It doesn't count forward to your next birthday. For that, the countdown calculator shows the days left until any date.
Related calculators
- Date calculator: add or subtract days, weeks, months or years from a date.
- Countdown calculator: how long until a birthday, holiday or deadline.
- Time zone converter: check what the date is in another part of the world.
Last updated