Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Age Difference
5 yr 5 mo 14 d
between the two birthdays
Years 5
Months 5
Days 14
Total days apart 1,991

What is the Age Difference Calculator?

This tool finds the exact difference between two people's birthdays. Enter each person's date of birth and it returns the gap expressed in years, months and days, plus the total number of days apart. It works regardless of which person is older — the calculator automatically uses the earlier date as the start.

How to use it

Pick the birth year, month and day for Person 1 and Person 2, then submit. The result shows the calendar difference broken into whole years, remaining months and remaining days, along with the total elapsed days for a precise comparison.

The formula explained

The breakdown subtracts the start date components from the end date components.

$$\text{diff} = |\text{date}_1 - \text{date}_2| \rightarrow \{\text{years},\ \text{months},\ \text{days}\}$$

If the day result is negative, we borrow one month and add the number of days in the start month.

$$\text{days} = \text{days} + \text{daysInMonth}(\text{start})$$

If the month result is then negative, we borrow one year and add 12 months. The total days is simply the millisecond difference divided by 86,400,000 (the number of milliseconds in a day), rounded to the nearest whole day.

$$\text{totalDays} = \left\lfloor \frac{|t_1 - t_2|}{86400000} \right\rceil$$
Timeline showing two birthdays with the gap split into years, months and days
The age difference is the gap between two birthdays, broken into years, months and days.

Worked example

Person 1: 31 January 1990. Person 2: 1 March 1990. Day: \(1 - 31 = -30\), so borrow: months becomes \(-1\) and days becomes \(-30 + 31 = 1\) (days in January). Month: \(-1 + 12 = 11\) and years drops by 1 to 0... after borrow we get 0 years, 1 month, 1 day. Adjusting for the standard calendar interpretation, the day count comes out positive as expected.

Two calendar pages connected by an arrow showing the span between two dates
Subtract the earlier date from the later one to find the total span.

FAQ

Does the order of the two people matter? No. The earlier birthday is always treated as the start, so the result is the same either way.

Are leap years handled? Yes. The calendar logic accounts for the actual number of days in each month, including February in leap years.

What does "total days apart" mean? It is the raw count of calendar days between the two dates, useful when you need a single number rather than a years/months/days breakdown.

Last updated: