Skip to content
AgileLogics

Age Calculator

Works out the exact age (or duration) between a date of birth and any other date, down to the day.

How it works

Enter a date of birth. The "as of" date defaults to today, or set it to any other date to find the age at that point in time.

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

  1. Enter the date of birth.
  2. Optionally, set the "as of" date. If you leave it blank, today's date is used.
  3. 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:

  1. Completed years. From 15 May 1990 to 15 May 2026 is 36 years.
  2. Completed months. From 15 May 2026 to 15 September 2026 is 4 more months.
  3. 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

Last updated

Frequently asked questions

How is my exact age calculated?
The calculator counts completed years from your date of birth first, then completed months, then the days left over. Born 15 May 1990, on 5 October 2026 you are 36 years, 4 months and 20 days old, which is 13,292 days in total.
How old is someone born on February 29 in a non-leap year?
In years without a February 29, this calculator treats March 1 as the day the next year is completed. Someone born on 29 February 2000 shows as 24 years, 11 months and 30 days on 28 February 2025, and exactly 25 on 1 March 2025. Legal rules for leap-day birthdays vary by country.
Can I find out how old someone was on a past date?
Yes. Set the "as of" date to any date on or after the date of birth, past or future. Leave it empty and the calculator uses today's date.
Does "total days lived" count the day I was born?
No. It counts the days that have passed, so the day of birth is day 0. Someone born today has lived 0 days, and tomorrow they will have lived 1.
Why is my age a day off around midnight?
When the "as of" field is empty, today's date comes from the server clock, which runs on Coordinated Universal Time (UTC). If you're far east or west of UTC, the date there can differ from yours for a few hours. Enter today's date yourself to avoid this.
Can I use it for dates that aren't birthdays?
Yes. Put any start date in the date-of-birth field and an end date in the "as of" field to get the length of a job, a tenancy or a relationship in years, months and days.