How to Calculate an Age from a Date of Birth

Works out an age in completed years from a date of birth and a reference date, together with the days lived so far and the days until the next birthday.

This tool works out an age in completed years from a date of birth and a reference date. An age in completed years is simply the number of birthdays reached.

A=Y2Y1cA = Y_2 - Y_1 - c

Here Y1Y_1 is the year of birth, Y2Y_2 the reference year and AA the age. The correction cc is 1 if the birthday has not yet come round in the reference year and 0 if it has, so the difference in years is reduced by any birthday still to come.

Worked example

Someone born on 1 April 2000 is 26 on 27 July 2026, having lived 9613 days, with 248 days to go until the next birthday.

The difference in years is 2026 − 2000 = 26. Since 27 July falls after 1 April, that year's birthday has already passed and nothing is subtracted.

Counting from the birthday itself

The age here increases on the birthday itself, which is how ages are counted in everyday speech.

Some legal systems count differently. Japanese law treats a person as ageing at the end of the day before the birthday, which is why a child born on 1 April falls into the earlier school year. Where a legal age is at stake, expect a difference of one day.

Births on 29 February

A person born on 29 February has no birthday at all in a common year. This tool takes 1 March as the birthday in those years, since that is the day on which a full year has elapsed.

Points to watch

The reference date must not fall before the date of birth; reversing the two stops the calculation.