Age Difference Calculator with Step-by-Step Working

Enter two dates of birth to see who is older and by how much, in years, months, days, weeks and hours. Every answer comes with the full working, so students can follow each step and check their own homework.

Enter two dates of birth

Person 1
Person 2

The order does not matter. The calculator works out who was born first and subtracts the earlier date from the later one.

How this age difference calculator works

  1. Enter each person's date of birth as Day, Month and Year. Names are optional, but they make the answer easier to read.
  2. Press Calculate age difference. The calculator finds out who was born first.
  3. Read the answer at the top of the page: the gap in years, months and days, plus total months, weeks, days, hours and minutes.
  4. Scroll to the step-by-step calculation to see exactly how the answer was found, including any borrowing.

New to the topic? Press Try an example to see a full worked answer in one click.

Age difference formula with example

The age difference formula is a subtraction: take the earlier date of birth away from the later one. Work out the year, month and day separately.

Age difference = Later date of birth − Earlier date of birth

Years  = Later year  − Earlier year
Months = Later month − Earlier month
Days   = Later day   − Earlier day

If the days come out negative, borrow the number of days in the month before the later date's month, then take 1 off the months. If the months come out negative, add 12 and take 1 off the years.

Formula when you only know the ages

Age difference = Older person's age − Younger person's age

This is the quick version used in school word problems. It can be almost a year away from the real gap, because birthdays fall on different dates. Use dates of birth when you need an exact answer.

Example: born 20/11/1999 and 05/02/2003

  1. Days: 5 − 20 = −15, which is negative. Borrow the 31 days of January: 5 + 31 − 20 = 16 days. This takes 1 off the months.
  2. Months: (2 − 1) − 11 = −10, which is negative. Add 12: −10 + 12 = 2 months. This takes 1 off the years.
  3. Years: (2003 − 1) − 1999 = 3 years.

Age difference = 3 years, 2 months and 16 days. Counted day by day, that is 1,173 days.

Age difference for students: solved examples

Age difference questions turn up in school maths and reasoning papers. The rule that solves most of them is simple: the age difference between two people never changes.

Example 1: age difference from ages

Ananya is 14 years old and her brother is 9. Find the age difference, and check it again after 6 years.

Age difference = 14 − 9 = 5 years
After 6 years  = 20 and 15
New difference = 20 − 15 = 5 years

The gap stays 5 years.

Example 2: when will the father be twice as old?

A father is 42 and his son is 12. After how many years will the father be twice as old as the son?

  1. Age difference = 42 − 12 = 30 years, and it never changes.
  2. The father is twice as old when father = 2 × son. Since father = son + 30, that happens when the son is 30.
  3. The son is 12 now, so 30 − 12 = 18 years.

Check: in 18 years the father is 60 and the son is 30, and 60 = 2 × 30.

Example 3: age difference from dates of birth

Riya was born on 18/07/2009 and Karan on 02/01/2010. Who is older, and by how much?

  1. Days: 2 − 18 = −16, which is negative. Borrow the 31 days of December: 2 + 31 − 18 = 15 days.
  2. Months: (1 − 1) − 7 = −7, which is negative. Add 12: −7 + 12 = 5 months.
  3. Years: (2010 − 1) − 2009 = 0 years.

Riya is older than Karan by 0 years, 5 months and 15 days (168 days).

Key points to remember

Age gap converted into months, weeks, days and hours

Rough conversions for common age gaps, using an average year of 365.2425 days. Your own result above counts the exact days between the two dates of birth.

Approximate months, weeks, days and hours for common age differences in years
Age gapMonthsWeeksDaysHours
1 year12523658,766
2 years2410473017,532
3 years361571,09626,297
5 years602611,82643,829
10 years1205223,65287,658
15 years1807835,479131,487
20 years2401,0447,305175,316
25 years3001,3049,131219,146

Age difference calculator FAQs

How do I calculate the age difference between two people?

Subtract the earlier date of birth from the later one, working out the years, months and days separately and borrowing whenever a result is negative. The person with the earlier date of birth is the older one. You can also enter both dates in the calculator above to see the working step by step.

Example: Rahul was born on 05/03/2000 and Priya on 15/06/2002. Then 15/06/2002 − 05/03/2000 = 2 years, 3 months and 10 days, so Rahul is 2 years, 3 months and 10 days older than Priya.

How do I calculate the age difference in days, weeks and hours?

Count the days between the two dates of birth. Divide by 7 for weeks, and multiply by 24 for hours. Every calendar day is counted, so leap days are already included.

Example: from 05/03/2000 to 15/06/2002 is 832 days. That is 832 ÷ 7 = 118 weeks and 6 days, and 832 × 24 = 19,968 hours.

How do I find the age difference if I only know their ages?

Subtract the younger person's age from the older person's age. This works well for school problems, but the real gap can be almost a year different, because birthdays fall on different dates. Use dates of birth for an exact answer.

Example: a 45-year-old and an 18-year-old are 45 − 18 = 27 years apart by age. Depending on their birthdays, their real gap is somewhere between 26 and 28 years.

Does the age difference between two people ever change?

No. The gap between two dates of birth is fixed, so the age difference stays the same for life even though both people keep getting older. Only the ratio of their ages changes.

Example: a 30-year-old and a 20-year-old are 10 years apart. In 20 years they are 50 and 40, still 10 years apart, but the older person is now 1.25 times as old instead of 1.5 times.

How do leap years affect the age difference?

A leap year adds an extra day, 29 February, so the same gap in years can contain 365 or 366 days. The working in years, months and days stays the same. Only the total number of days changes.

Example: 01/03/2003 and 01/03/2004 are exactly 1 year apart, but that is 366 days because 29 February 2004 falls between them. 01/03/2004 and 01/03/2005 are also 1 year apart, but that is 365 days.

How do I calculate the age difference between siblings?

Use each child's date of birth. Subtract the elder sibling's date of birth from the younger sibling's, and read the result as the gap between them.

Example: one sibling was born on 12/08/2008 and the other on 03/02/2012. Days: 3 − 12 = −9, so borrow the 31 days of January to get 22. Months: (2 − 1) − 8 = −7, so add 12 to get 5. Years: (2012 − 1) − 2008 = 3. The gap is 3 years, 5 months and 22 days.

Can students use this calculator to check maths homework?

Yes. Solve the question by hand first using the formula on this page, then enter the dates and compare each line with the step-by-step working. If your answer is different, look at the borrowing step first, because that is where most mistakes happen. For word problems that give only ages, subtract the smaller age from the larger one.

Example: for the question "Riya was born on 18/07/2009 and Karan on 02/01/2010", the working shows the borrow from December that leads to 5 months and 15 days.