Converters

How to Calculate Age from Date of Birth

How to calculate age from a date of birth by hand: count years, then months, then days. A worked example, why dividing by 365 is wrong, and the two dates that have no clean answer.

6 min readUpdated Sep 16, 2026

Age is the one calculation almost everybody does in their head and almost nobody does the same way twice. In conversation a year is close enough; on a passport application or a school admission form it has to be exact to the day, and at that point the arithmetic stops being obvious, because months are not the same length and years are not either. This guide sets out the rule and the two dates that have no clean answer.

The rule: years first, then months, then days

Age counts anniversaries that have already happened, largest unit first. That is the whole method, and it is worth stating because it is not what a subtraction does. In order:

  1. Count the completed years: move the date of birth forward a year at a time for as long as the result is still on or before today. The number of steps is the age in years.
  2. Count the completed months on top of that, stepping forward a month at a time from the date you landed on.
  3. Count the days left over between that date and today.

The order is what keeps the answer stable: work the days out first and you end up borrowing from a month whose length you have to guess at, which is where most attempts go wrong.

A worked example

Take a date of birth of 20 May 1990, and work out the age on 16 September 2026.

  • Years: 20 May 1990 plus 36 years is 20 May 2026, still on or before 16 September 2026; plus 37 would be 20 May 2027, which is not. So 36 completed years.
  • Months: from 20 May 2026, one month is 20 June, two 20 July, three 20 August - still before 16 September. Four would be 20 September, past it. So 3 completed months.
  • Days: from 20 August 2026, 11 days takes you to the 31st and 16 more to 16 September. That is 27 days.

The age is 36 years, 3 months and 27 days. The Age Calculator does the same three steps and also reports the same span counted in single units: 435 months, 1,895 weeks and 3 days, 13,268 days, or 318,432 hours. It will tell you that 20 May 1990 was a Sunday, and that the next birthday - the 37th - falls on Thursday 20 May 2027, 246 days after the date we measured from.

Why dividing by 365 gives the wrong answer

The shortcut everyone reaches for is to subtract the dates for a number of days and divide by 365. Try it on the example: the gap is 13,268 days, which is 36 years with 128 days left over, and dividing those by 30 gives 4 months and 8 days. The shortcut says 36 years, 4 months and 8 days; the calendar says 36 years, 3 months and 27 days. It is out by eleven days.

Two errors combine to produce that. The first is leap days: there were 9 leap years between 1991 and 2026, so the span holds 9 days a 365-day year does not account for. The second is the 30-day month, which does not exist in the calendar at all - seven months have 31 days, four have 30, and February has 28 or 29. Neither error is constant, so no better divisor fixes them: 365.25 narrows the first, does nothing about the second, and adds a third, because 1900 and 2100 are not leap years. The fix is not a better average but to stop averaging - count real anniversaries on the real calendar.

The two dates with no clean answer

Born on the 29th, 30th or 31st

What is one month after 31 January? There is no 31 February, so the question has no arithmetic answer - only a convention. Every mainstream date library, and this calculator, moves to the last day of the shorter month: 28 February, or 29 in a leap year. One consequence is worth knowing: adding a month twice is not the same as adding two months. 31 January plus a month is 28 February, and plus a month again is 28 March; plus two months in one step is 31 March - three days apart from the same start date, depending only on how you grouped the steps. A calculator should say when it has applied the rule rather than quietly shifting your anniversary.

Born on 29 February

A leap-day birthday exists only one year in four. In the other three it has to be assigned to a date that does exist, and different places decided differently. England and Wales, and India, treat it as 28 February, so somebody born on 29 February 2000 turns 23 on 28 February 2023; Hong Kong and several US states use 1 March. Nothing in the arithmetic settles it, so a calculator showing one date without naming the other is hiding a legal question behind a number.

Age in months, weeks and days

Plenty of forms do not want years at all. A paediatric chart wants a baby's age in completed months; some visa forms want days; a school cut-off wants the age on a fixed date - 31 March or 1 September - rather than today, which is why the date you are ageing to should be editable. These are not conversions of one another: the 435 months above is not 36.35 multiplied by 12 and rounded, it is the count of monthly anniversaries that have actually passed, and that is the figure a registrar or a doctor will arrive at.

Counting the days between two dates

The same machinery answers the other common question - how long from one date to another - but it carries a trap that has nothing to do with arithmetic. From 16 September to 15 December 2026 there are two correct answers: 90 is the gap between the dates, and 91 counts both the first day and the last. Leave, notice periods and hotel stays are usually written the second way; a deadline means the first. If a contract says 90 days, check which before you diary it.

Working days are a third figure again: that span holds 65 weekdays and 26 weekend days counting both ends, so 60 working days is not the same deadline as 90 calendar days. The Days between tab in the Age Calculator reports all three at once, but deducts no public holidays - those differ by country and state.

Doing it in a spreadsheet

Excel and Google Sheets both carry DATEDIF, inherited from Lotus 1-2-3. The three-part age is DATEDIF(dob, today, "Y") for years, "YM" for the months on top and "MD" for the days. Microsoft's documentation warns against that last one: "MD" can return a negative number in exactly the month-end cases above.

Plain subtraction - =B1-A1 - gives the day count, because a spreadsheet stores a date as a day number internally. That is the idea used here too: whole calendar dates on an integer day number, with no time of day and no time zone, so the answer does not move with your location or with daylight saving. Timestamps are a different job - for those, see the Epoch Converter.

Frequently asked questions

How do I calculate my exact age in years, months and days?
Count the completed years from your date of birth first, then the completed months on top of those, and finally the days left over - in that order, largest unit first. Born on 20 May 1990, on 16 September 2026 that gives 36 years (to 20 May 2026), then 3 months (to 20 August 2026), then 27 days to reach 16 September. The order matters: if you start with the days you end up borrowing from a month whose length you have to look up, which is where most by-hand attempts go wrong. The Age Calculator does the three steps and also shows the same age as 435 months, 1,895 weeks and 3 days, or 13,268 days.
Why do two age calculators give me different answers?
Almost always for one of three reasons. The first is that one of them divides by 365 or by 365.25 instead of counting real anniversaries, which drifts by a day or more over a long span and by more still if the period covers several leap years. The second is the month-end convention: from 31 January to 28 February, a calculator that counts anniversaries says one month while one that borrows day-of-month figures says 28 days, and both are defensible. The third is time zones - a tool that parses your date of birth as UTC midnight and then reads it back in local time shows yesterday's date to anyone in the Americas, which moves the whole answer by a day.
When does someone born on 29 February have a birthday?
It depends on where you are, and it is a legal question rather than a mathematical one. In England and Wales, and in India, the birthday is treated as 28 February in a year that has no 29th, so a person born on 29 February 2000 turns 23 on 28 February 2023 and 24 on 29 February 2024. Hong Kong and several US states take 1 March instead. There is no arithmetic that settles this, which is why the calculator here uses 28 February and names 1 March as well rather than quietly picking one.