Age Difference Calculator
Compare two people by age, by exact date of birth or by birth year. Dates of birth give the most precise answer, down to months and days.
Related calculators
Created by the Reeliy Editorial Team. Last updated: Oct 19, 2026
How to use the age difference calculator
Select how you want to describe the two people, then fill in the two matching boxes. The order does not matter, because the calculator always reports the gap as a positive amount.
- Ages. Enter two ages in years. Decimals are accepted, so 22.5 works for someone who is twenty-two and a half.
- Dates of birth. Enter both full birth dates. The result is shown in years, months and days, and as totals in years, months and days.
- Years of birth. Enter just the two birth years when nothing more precise is known.
The formula and some worked examples
For ages or birth years, the difference is a plain subtraction of the smaller number from the larger one.
age gap = |age 1 − age 2|The same applies to birth years: |year 1 − year 2|.
Example with ages. A person aged 30.5 and another aged 22 are 30.5 − 22 = 8.50 years apart. Whole-number answers are shown bare (a 30 and a 25 year old are 5 years apart), while fractional answers appear with two decimals, or with four when the exact value has more than two decimal places.
Example with dates of birth. One person was born on 10 March 1985 and the other on 15 May 1990. From 10 March 1985 to 10 March 1990 is 5 years, 10 March to 10 May is 2 months, and 10 to 15 May is 5 days. The gap is 5 years, 2 months and 5 days, which equals 62 months or 1,892 days.
Example with birth years. People born in 1999 and 2006 are 7 years apart on paper. In reality the true gap could be anywhere from just over 6 years to just under 8, depending on the birthdays, so treat a year-only answer as approximate.
How precise is each method?
| Method | You need | Precision |
|---|---|---|
| Dates of birth | Two full birth dates | Exact to the day |
| Ages | Two ages in years (decimals allowed) | As good as the ages you type |
| Years of birth | Two birth years | Within about one year either way |
When months are counted, a birth at the end of a long month is handled by rolling the date forward, the same way the age calculator does. To measure the span between any two dates, not only birthdays, the date and time duration calculator and the day counter are better suited.
Age gaps between partners
Couples are often curious whether their age gap is unusual. Records in many countries show that most partners are within a few years of each other, with larger gaps becoming less common as the gap widens. There is no single number that is right for everyone, and how a gap feels depends on the ages involved: five years separates two forty-year-olds very differently from a twenty-year-old and a fifteen-year-old.
A popular rule of thumb, sometimes called the half-your-age-plus-seven rule, estimates a socially comfortable minimum partner age. Turned around, it also gives a maximum.
minimum age = your age ÷ 2 + 7 maximum age = (your age − 7) × 2
| Your age | Minimum partner age | Maximum partner age |
|---|---|---|
| 20 | 17 | 26 |
| 25 | 19.5 | 36 |
| 30 | 22 | 46 |
| 40 | 27 | 66 |
| 50 | 32 | 86 |
| 60 | 37 | 106 |
It is a folk guideline, not research and not a legal standard, and the upper figures quickly become unrealistic. Laws on the age of consent and marriage differ between countries and regions and take precedence over any rule of thumb.
Other uses
- Sibling spacing: the gap between two siblings, from their birth dates.
- Parent and child: enter the parent's and the child's dates of birth to see how old the parent was at the birth.
- School and sports cohorts: check whether two children fall in the same age band.
- History and genealogy: compare birth years of people in a family tree.
To see how old each person is on a particular day, use the age calculator, and to find the next birthday of either person, try the birthday calculator.
Frequently asked questions
How do I calculate the age difference between two people?
Subtract the smaller age from the larger one. With dates of birth, count the years, months and days from the earlier birth date to the later one, which is exact.
Does it matter which person I enter first?
No. The calculator takes the absolute difference, so swapping the two people gives the same answer.
Why is the year-of-birth answer only approximate?
Two people born in different years may be less than or more than that number of years apart, depending on where their birthdays fall within the year. The true gap is within about a year of the figure shown.
What is the half-your-age-plus-seven rule?
It is an informal guideline that the youngest comfortable partner age is half your own age plus seven. It has no scientific or legal standing.
Cite this calculator and page
If you use this page in your work, you can cite it as:
Reeliy Editorial Team. (2026). Age Difference Calculator. Reeliy. https://reeliy.com/calculators/age-difference-calculator“Age Difference Calculator.” Reeliy, 2026, https://reeliy.com/calculators/age-difference-calculator.