The short answer: find the earlier date, add whole years until one more would pass the later date, then whole calendar months the same way, and finally count the leftover days. Clamp to the last valid day when the target day does not exist. From March 15, 1990 to November 2, 1995 is 5 years, 7 months, and 18 days — 2,058 days in total. A naive subtract-the-parts method gives a negative day count at month ends, which is why the order of operations matters.

Key takeaways

  • Age difference is a distance between two dates, not either person’s age.
  • Years first, then months, then days. A different order changes the answer at month ends.
  • Clamp instead of borrowing. January 31 plus one month is February 28, not March 3.
  • Total days is a separate count, the actual calendar days between the dates.
  • Order the dates before subtracting. The gap is non-negative; the sign only says who is older.
  • Subtracting whole ages loses the months and days.

What age difference measures

The age difference between two people is the distance between their birth dates. It is fixed at birth and never changes, unlike either person’s age, which increases on each birthday. If one sibling was born on June 1, 2000 and another on September 15, 2003, the gap is 3 years, 3 months, and 14 days forever.

The calculator answers “how far apart are these dates”, which is a different question from “how old is each person today”. The first is a date subtraction; the second is two separate age calculations with their own rounding rules. Mixing them is the source of most errors here.

The years-months-days algorithm

Order the two dates so the earlier one is the start. Add one year at a time while the result is still on or before the later date; that count is the year component. From that point, add one month at a time under the same test; that count is the month component. The days left over are the day component.

For March 15, 1990 to November 2, 1995: five years lands on March 15, 1995, and six years would pass November 2, so the year count is 5. Seven months lands on October 15, 1995; eight would pass, so the month count is 7. From October 15 to November 2 is 18 days. The result is 5 years, 7 months, and 18 days, and the total day count is 2,058.

The order matters. Subtracting the raw parts first — years, then months, then days — gives negative days whenever the end day-of-month is smaller, and borrowing 30 or 31 days to fix it produces a different month count than the add-forward rule.

Month-end clamping

Adding a month is not always possible: January 31 plus one month has no February 31. The convention is to clamp to the last day of the target month, so January 31, 1990 plus one month is February 28, 1990, and January 31, 2000 plus one month is February 29, 2000.

Clamping changes results near month ends. January 31 to March 1, 1990 is 29 days. The add-forward rule gives 1 month (to February 28) and 1 day. The naive part-subtraction gives 0 months and a negative day count that borrowing turns into 0 months and 29 days. Both describe 29 days; only one is in the convention the calculator documents.

Total days is a separate count

The total day count is the number of calendar days between the two dates, computed by subtracting ordinal day numbers. It is not derived from the years-months-days decomposition and should never be reconstructed from it: 5 years, 7 months, 18 days is 2,058 days only because of the specific months involved.

The same decomposition elsewhere in the calendar yields a different total. Five years, seven months, and eighteen days starting in a leap year includes one more February 29 than the identical decomposition starting a year later. Report the total separately and compute it directly.

Leap days

February 29 exists in years divisible by 4, except centuries not divisible by 400. So 2000 was a leap year, 1900 was not, and 2028 will be. A span crossing a leap day is one day longer than the same span in a common year.

Example: February 29, 2000 to February 28, 2001. Adding one year to February 29, 2000 clamps to February 28, 2001 — the target — so the decomposition is 1 year, 0 months, and 0 days. The total is exactly 365 days, not 366, because the anniversary is defined by the clamped date rather than by dividing days.

Example: November 14, 2026 to November 14, 2028 is 731 days, because February 29, 2028 falls inside the span. Multiplying 2 × 365 gives 730 and is one day short.

Ordering, signs, and who is older

The gap between two birth dates is non-negative. The calculator identifies the earlier date first and reports which one it is, so a reversed input produces the same distance with the opposite label. That is correct behavior: “how much older” is a magnitude plus a direction.

For people, the earlier birth date is the older person. For events, the earlier date is the one that happened first and the difference is a duration rather than an age. The formula does not care which is which, but the sentence you write about the result does.

Age difference is not the difference of ages

On November 14, 2026, a person born June 1, 2000 is 26 and a person born September 15, 2003 is 23. Subtracting the ages gives 3 years, which is wrong by 3 months and 14 days: the real gap is 3 years, 3 months, and 14 days, because the older person’s birthday comes earlier in the year.

The same trap appears in legal and medical contexts: “at least 18 years apart” is a statement about dates, and reported ages are themselves rounded down to completed years.

Worked examples

March 15, 1990 to November 2, 1995: 5 years, 7 months, 18 days; 2,058 days.

February 29, 2000 to February 28, 2001: 1 year, 0 months, 0 days; 365 days, via clamping.

January 31, 1990 to March 1, 1990: 1 month, 1 day; 29 days.

December 31, 1999 to March 1, 2000: 2 months, 1 day; 61 days, with February 29 in the middle.

December 31, 1988 to November 14, 2026: 37 years, 10 months, 14 days; 13,832 days.

June 30, 2015 to November 14, 2026: 11 years, 4 months, 15 days; 4,155 days. June 30 plus four months is October 30, and 15 more days reach November 14.

Common mistakes

Subtracting the parts directly. Years minus years, months minus months, days minus days produces negative components and an arbitrary borrowing rule.

Forgetting leap years. Any span across February 29 is one day longer than a 365-day estimate.

Converting birth dates through UTC. A date parsed as local midnight can become the previous day in UTC, shifting the whole result.

Confusing the gap with the ages. Two people 11 months apart can report whole-year ages that differ by one for most of the year.

Practical caveats

Birth dates are dates, not timestamps. If a birth time and time zone are known, the instant matters for exact-interval questions in medicine or law, but the civil date on the birth certificate is what age calculations use.

Legal systems differ on the February 29 anniversary. Some treat March 1 as the anniversary in common years, some use February 28, and some statutes specify the last day of February. The choice moves a one-day boundary, which matters for eligibility and age-of-majority rules.

Frequently asked questions

How do I calculate an age difference exactly?

Order the dates, add whole years, then whole months, then count the remaining days, clamping to month-end when needed. Compute the total day count separately from ordinal dates.

Why is my answer one day off from another calculator?

Usually a different month-end convention, a different treatment of the end date, or a leap-day anniversary rule. Check whether the other tool borrows 30 days or clamps.

Is the age difference ever negative?

No. The gap is a distance and the earlier date is identified first. A sign, if shown, only indicates which date is earlier.

How does February 29 affect the result?

A span crossing a leap day is one day longer in total. For a February 29 birth date, the anniversary clamps to February 28 in common years under this rule.

Can two people born in the same year be a year apart in age?

In reported ages, yes: a January birth and a December birth are 11 months apart, but their whole-year ages differ by one until December.

Further reading

Keep exploring

Read next Date Countdown: Days Until, Inclusive, and Time Zones Count the days between two dates with exclusive and inclusive conventions, weeks, weekdays, and months, and see why… Read next Age Calculator: Exact Age, Leap Years, and Time Zones Age is completed years, not elapsed days divided by 365. The subtraction rule, leap-day birthdays, total days, and… Read next Date Duration: Days Between Dates Without Off-by-One Errors Count days between dates without the off-by-one. Day-number arithmetic, inclusive versus exclusive counting, leap years, and daylight saving.

Decision path

Use this guide in a decision

Open Date & Time Decision Center Open companion solver