Skip to main content
CalcMax

Age Difference Calculator

Result

5First date is earlier

Years

Months
5
Days
14 days
Total months
65
Days apart (positive when the first date is earlier)
1,991 days

Two birthdays, one answer: this age difference calculator gives the exact age gap between two people as years, months and days, then says which of the two is older. Swap the two dates and the size of the gap does not move — only the verdict does, which is the whole point. The gap is also read as a single number of months and as a signed number of days apart, so you can compare it against a threshold written in either unit. Ages here are differences between two dates rather than ages measured from today, so both people can be long dead and the arithmetic is unchanged.

Formula

age difference = the later date minus the earlier date, decomposed into whole years, whole months and leftover days, with the sign of the result recording which of the two inputs was the earlier one

firstBirthDate
The first date of birth. Which box it goes in decides the sign of the days-apart figure, not the size of the gap
secondBirthDate
The second date of birth. Either order gives the same years, months, days and total months
years
Whole years between the two dates; how much older the older one is, in completed years
months
Whole months left over after those years; 0 to 11
days
Days left over after the whole months. Never negative, whichever order the two dates were entered in
totalMonths
The whole gap counted in months; five years and five months is 65, which is the figure to use when comparing across year boundaries
daysApart
The gap in days, signed: positive when the first date is the earlier one, negative when the second is, zero for the same day

Use it when two people's ages have to be compared rather than either age taken on its own: siblings' age gap, a class year, a pension or benefit rule that turns on who is older, or a pair of dates from a family tree where the years matter more than the exact day. Months is the unit that survives a rounded answer, because a gap of 65 months is still 65 months whichever way the birthdays fall. Do not use it to find out how old either person is today — that needs a clock and belongs to the age calculator, which reads the current date for you.

Worked examples

  1. 1990-01-01 and 1995-06-15

    1. 1 January 1990 to 1 January 1995 is five completed years, so years is 5
    2. 1 January 1995 to 1 June 1995 is five whole months, so months is 5
    3. The month boundary is 1 June 1995 and the later date is 15 June, so days is 14
    4. 5 x 12 + 5 = 65 months
    5. 1990-01-01 to 1995-01-01 is 1826 days (five years with 1992 as a leap year), plus 151 days to 1 June and 14 more to 15 June, giving 1991 days

    1991 is the number to sanity-check by hand: five calendar years is 1826 days rather than 1825 because 1992 is a leap year, and losing that day is the commonest way to get this wrong.

  2. The same two people, dates entered the other way round

    1. The four gap figures are unchanged: 5 years, 5 months, 14 days, 65 months
    2. The days-apart figure flips sign, from 1991 to -1991
    3. The badge flips with it: the first date is now the later one, so the second person is the older of the two
    4. Nothing else moves — there is no negative month count and no negative day count

    Only one of the five figures changes when you swap the inputs, and that is deliberate. The gap is a distance and distances do not have a direction; who is older is a separate question, and it is the one the sign answers.

Limitations

Both dates must be real calendar dates, and 30 February is rejected rather than quietly turned into 2 March. The gap is worked out in calendar months, so it counts whole months only and reads 0 for a difference of a few weeks — the days-apart figure is the one to read there. A difference of one day and a difference of 370 days can both report 0 months. There is no handling of time zones, because only dates are compared and no clock is consulted. The tool gives the size of the gap and which person is older; it does not give either person's current age, which needs today's date and is a different calculation.

Frequently asked questions

How do I work out the age gap between two birthdays?
Subtract the earlier date from the later one and break the result into years, months and days — 1 January 1990 to 15 June 1995 is 5 years, 5 months and 14 days. Order does not matter for that figure: enter the dates either way round and you get the same 5/5/14. The age gap in whole months, 65, is often the more useful number because it does not depend on which day of the month the birthdays fall.
Which of the two is older?
The one whose date of birth is earlier, and the badge above the results states it outright: "First date is earlier" or "Second date is earlier". This is the only thing that changes when you swap the two boxes — the five-year gap stays five years. If both dates are identical, the badge reads "Same day" and every figure is zero.
Does it matter which box I type each date into?
Not for the size of the age gap. Years, months, days and total months are identical either way, because a gap between two dates is a distance and distances have no direction. It does matter for the days-apart line, which is positive when the first box holds the earlier date and negative when it does not. That sign is what the badge reads.
Why is the months figure zero for two people born weeks apart?
Because it counts whole months only, and a gap of a few weeks contains none. Two people born 30 days apart report 0 months and 30 days, not 1.0 months. Read the days-apart figure for gaps under about two months; the whole-month count is there for gaps where the years and months are the headline, such as 65 months between two siblings.
How is this different from a years between dates calculator?
It answers a different question with the same arithmetic. A years between dates calculator reports how long a span is and leaves out who came first; this one adds the verdict, which is what you want for two birthdays rather than two events. It also reports the gap in days with a sign, so a five-year gap reads 1991 days and the reversed entry reads -1991.

References

Related calculators