Age Calculator

Enter a date of birth to get an exact age in years, months and days, plus total weeks, days and hours and a countdown to the next birthday.

Calculates in your browser. Dates you enter are not uploaded or stored.

Age Difference Between Two People

How to Calculate Age from Date of Birth

Age is not a number of days divided by something. It is a count of birthdays: you are 36 on the day of your 36th birthday and stay 36 until the day of your 37th. This age calculator works the same way. It finds the latest whole month since your date of birth that has already arrived, counts whole years and the leftover months from that, and then counts the days from that anniversary to the "age on" date.

Take someone born on 15 May 1990 and the date 23 October 2026. Their 36th birthday was 15 May 2026, so they are 36 years old. The fifth monthly anniversary after that was 15 October 2026, so the months part is 5. From 15 October to 23 October is 8 days. The age is 36 years, 5 months, 8 days, which is exactly what the calculator shows for those two dates.

The "age on" date starts as today, taken from your device's clock, but you can set it to any date — past or future. That answers questions like "how old was I on 1 January 2000?", "how old will I be at graduation?" or "what age was someone on the day a document was signed?". Every date from year 1 to year 9999 is supported, counted in the Gregorian calendar.

All the arithmetic is done on whole calendar days, without JavaScript Date objects, so your time zone and daylight saving changes cannot shift the answer by a day. That matters more than it sounds: the most common bug in age code is a date that silently moves to the previous day.

Age Calculator by Date of Birth: Worked Examples

Each row below was entered into the calculator above and the result copied from it. The last two columns show where the two choices for 29 February and month-end birthdays give different answers.

Date of birthAge onAge (28 February rule)Age (1 March rule)
15 May 199023 Oct 202636 years, 5 months, 8 dayssame
1 Mar 20001 Mar 20011 year, 0 months, 0 dayssame
1 Nov 202523 Oct 20260 years, 11 months, 22 dayssame
29 Feb 200023 Oct 202626 years, 7 months, 24 dayssame
29 Feb 200028 Feb 202727 years, 0 months, 0 days26 years, 11 months, 30 days
31 Jan 20001 Mar 20000 years, 1 month, 1 day0 years, 1 month, 0 days
31 Jan 200030 Mar 20000 years, 1 month, 30 days0 years, 1 month, 29 days

The last row surprises people. On 30 March the second monthly anniversary of 31 January has not happened yet — it is 31 March — so the age is still 1 month plus the days since the first anniversary. Under the 28 February rule that anniversary is 29 February (the last day of that February), giving 30 days; under the 1 March rule it is 1 March, giving 29. One day later both say exactly 2 months. Any calendar-correct calculator has edges like this, because months are not all the same length; the honest thing is to pick one rule and apply it every time.

Age in Months, Weeks, Days and Hours

Below the main result the calculator lists the same age as totals. For the 15 May 1990 example on 23 October 2026 those are:

UnitAgeHow it is counted
Months437 + 8 daysWhole monthly anniversaries since birth, plus the days since the last one
Weeks1,901 weeks, 3 daysTotal days divided by 7, with the remainder
Days13,310Calendar days from the date of birth to the "age on" date
Hours319,440Total days × 24

The day count does not include the birth date itself, the same way someone born today is 0 days old. Hours are whole days times 24, counted from midnight to midnight, because a date of birth on its own has no time of day. If you know the time you were born, add or subtract the difference yourself; an hour-precise age also depends on the time zone you were born in.

Totals are where approximate formulas break first. A year is 365 or 366 days and a month is 28 to 31, so "years × 365" or "months × 30" drifts by a day or more every few years. The calculator counts the real days between the two dates, so 1 March 2000 to 1 March 2001 is 365 days and 1 March 2003 to 1 March 2004 is 366.

Birthday Calculator: Days Until Your Next Birthday

The Next birthday box gives the date of the next birthday, the day of the week it falls on, how many days are left and the age you will turn. For someone born on 15 May 1990, on 23 October 2026 it reads 15 May 2027 (Saturday), in 204 days, turning 37. When the "age on" date is a birthday, the box says so instead of counting down to next year.

The Born on a box gives the day of the week of the date of birth — 15 May 1990 was a Tuesday. Weekdays are computed from the date itself, so they are correct for any year back to year 1 in the Gregorian calendar (dates before the calendar was adopted in 1582, and later in many countries, are counted as if it had always been in use).

Leap Year Birthdays: When Does a 29 February Baby Turn a Year Older?

About one day in 1,461 is 29 February, and people born on it have a real question three years out of four: is the birthday on 28 February or 1 March? There is no universal answer. Different countries, and different organisations within them, use one or the other for things like driving licences, pensions and age limits. So the calculator does not choose for you — the 29 February birthdays in other years fall on setting switches between the two.

The same setting applies to every date that does not exist in a given month, not just 29 February. Someone born on 31 January has a monthly anniversary on 28 or 29 February (or 1 March) and on 30 April (or 1 May). That only changes the months-and-days part of an age, never the years — except for 29 February, the only date of birth whose yearly birthday can fall on a day that does not exist.

Most age formulas in code quietly pick 1 March without saying so. The common "subtract the years, then take one off if the birthday has not happened yet" check compares month and day, and 28 February comes before 29 February, so the code decides the birthday has not arrived until 1 March. If your rule is 28 February, that is a one-day bug every common year.

Common Mistakes When Calculating Age

If your ages come from timestamps rather than dates, convert first: our Unix timestamp converter turns an epoch value into a calendar date, and the date is what an age is counted from.

How to Calculate Age in Code

For whole years, compare the month and day after subtracting the years. In JavaScript, using local-time dates:

function ageInYears(birth, on) {
  let years = on.getFullYear() - birth.getFullYear();
  const hadBirthday =
    on.getMonth() > birth.getMonth() ||
    (on.getMonth() === birth.getMonth() && on.getDate() >= birth.getDate());
  if (!hadBirthday) years--;
  return years;
}

ageInYears(new Date(1990, 4, 15), new Date(2026, 9, 23)); // 36
ageInYears(new Date(2000, 1, 29), new Date(2027, 1, 28)); // 26 (1 March rule)

In Python, tuples compare element by element, which makes the same check one line:

from datetime import date

def age(born, on):
    return on.year - born.year - ((on.month, on.day) < (born.month, born.day))

age(date(1990, 5, 15), date(2026, 10, 23))  # 36
age(date(2000, 2, 29), date(2027, 3, 1))    # 27

Both snippets follow the 1 March rule for leap-day birthdays, as explained above. For a 28 February rule, treat a 29 February birth date as 28 February when the "age on" year is not a leap year.

In Excel and Google Sheets, =DATEDIF(A2, TODAY(), "Y") gives whole years and =DATEDIF(A2, TODAY(), "YM") the months after the last birthday. Microsoft's documentation warns that the "MD" unit (days after the last whole month) can return wrong results, so compute the days part another way if you need it.

Years, months and days together take more care, because you have to decide what happens on the 29th, 30th and 31st. The approach this page uses is short: count the months between the two dates, step back one if that anniversary is still in the future, and count the remaining days. A JSON API that returns dates of birth is easier to check with our JSON formatter open, and the regex tester will confirm a ^\d{4}-\d{2}-\d{2}$ pattern accepts the dates you expect before they reach your age code.

Frequently Asked Questions

How do I calculate my exact age?
Enter your date of birth in the age calculator. It counts the whole years since your last birthday, the whole months since the last monthly anniversary and the days after that — for example, someone born on 15 May 1990 is 36 years, 5 months and 8 days old on 23 October 2026.
How many days old am I?
The Total days box shows it. It counts calendar days from your date of birth to the "age on" date, not counting the day you were born: someone born on 15 May 1990 is 13,310 days old on 23 October 2026.
When is the birthday of someone born on 29 February?
In leap years it is 29 February. In other years it depends on the rule you follow — 28 February or 1 March — and countries and organisations differ. Choose either one in the calculator's setting; someone born on 29 February 2000 turns 27 on 28 February 2027 under the first rule and on 1 March 2027 under the second.
Can I calculate age on a past or future date?
Yes. Change the "age on" date to any date from year 1 to 9999. The Today button sets it back to today's date on your device.
Why not just divide the number of days by 365.25?
Because it is wrong on and around birthdays. From 1 March 2000 to 1 March 2001 is 365 days, and 365 ÷ 365.25 rounds down to 0, but the person turned 1 that day. Counting birthdays on the calendar, as this calculator does, has no such error.
How do I find the age difference between two people?
Use the Age Difference Between Two People box: enter both dates of birth and it shows who is older and by how many years, months and days. For 10 May 1990 and 2 August 1993, the first person is older by 3 years, 2 months, 23 days (1,180 days).
What day of the week was I born?
The Born on a box shows it as soon as you enter your date of birth. 15 May 1990, for example, was a Tuesday.
Is my date of birth sent anywhere?
No. The calculation runs in your browser in JavaScript. Nothing you enter is uploaded or stored.