Age Difference Calculator

Use this age gap calculator to easily calculate the number of years between two birth dates, or between two years, or between the ages of two persons. Also computes an exact age difference in years, months, and days, as well as in number of days.

Share calculator:

Embed this tool:
get code     

    Quick navigation:
  1. How to use the age difference calculator
  2. Age difference formula
  3. The age gap in dating and relationships

    How to use the age difference calculator

The calculator can be used to compute the age difference between any two persons, given one of the following:

  • their ages in years
  • their years of birth
  • their dates of birth

In case you know one person's age, and another person's year of birth or date of birth, it is easy to compute the second person's age by using our online age calculator. It is also possible to compute the year of birth given the age in years by using a time difference calculator to subtract the age from the current date.

The two ages, years, or dates can be entered in any order. The result will be the age gap in terms of years. In case dates of births were provided as input, the output will also contain the age difference in terms of full months, weeks, and days, as well as an accurate chronological difference, e.g. "the age difference is 3 years, 6 months, and 12 days".

    Age difference formula

The universal formula for calculating an age difference is:

Age Difference = |Age 1 - Age 2|

where |...| is the absolute function (ABS()) which basically removes the sign of a number. It is used so one does not need to care about getting a negative result from the formula in case the second age is greater than the first age. The ages can be whole numbers or decimals, depending on the required precision.

The same equation can be used with years instead of ages. It can also be used to calculate the age gap exactly, to the day, if dates of birth are supplied. The date difference calculation is somewhat more difficult as it requires adjustments for leap years.

For example, if you have a sibling who is 15 years old while you are 8, to find the difference between you simply subtract 8 from 15 to get 7. Another example is the age difference between two famous actors, singers, or historical figures. If it is known that one was born in 1960 and the other in 1988, then the age difference is simply 1988 - 1960 = 28 years.

    The age gap in dating and relationships

An age difference calculator can be used, among other things, to check how much younger or older a potential romantic partner is. While there are no hard set rules in dating and relationships, there are some age differences largely deemed acceptable and others which might be too much for some to accept without questions.

The rule of seven

A common rule for the maximum and minimum age one is supposed to date is the so-called "rule of seven". It sets boundaries based on the age of one of the partners, and can be applied both ways. It goes as such: to define the minimum age of a partner, half your age and add seven. E.g. if you are thirty years old, calculate 30 / 2 + 7 = 15 + 7 = 22, or an age gap of 8 years would be acceptable in this direction).

To find the maximum socially acceptable age for a partner, subtract seven from your own age, then multiply it by two. For example, if you are 30 years of age, calculate (30 - 7) * 2 = 23 * 2 = 46 years or an age difference of 16 years would be acceptable in this direction.

Obviously, the above are just general guidelines. You should use your best judgment, take into account your personal circumstances, goals, etc. as well as those of the other person, before deciding whether a potential partner is probably too young or too old for you.

Desired age difference in relationships

Regarding the connection between one's age, gender, and attractiveness, there is some scientific research available as well, and it goes somewhat against the rule of seven. In 2001, a team of Dutch social psychologists from the University of Groningen examined desired minimum and maximum ranges across different ages by means of anonymous in-person interviews. 137 men and women were interviewed on questions about what ages are considered appropriate depending on the level of relationship. The study found that women’s preferences remain consistent with age, and across all five levels of engagement: marriage, serious relationship, falling in love, casual sex, and sexual fantasies. Women of all ages preferred men around their own age, with a range of just a couple of years in each direction. For men the study came to significantly different conclusions. Men in their forties, fifties, and sixties all expressed interest in younger partners. When it came to sexual fantasies and casual affairs it included women in their mid to late 20s.

When it comes to marriage, the above seems to be supported by statistics from the U.S. Census. In the US, in 35% of heterosexual marriages the age difference is less than one year. In 19.3% of marriages, a husband is 2-3 years older than his wife, in 23% the husband is 4-9 years older, and 7.5% the husband is more than 9 years older. In contrast, a wife is 2-3 years older than her husband in just 7% of cases. In 6.1% of families the wife is 4-9 years older and that percentage drops to 1% for more than 9 years in age difference in favor of the wife. Below is a table excerpt from the relevant U.S. Census data:

Age difference in opposite-sex married couples in the U.S.
Age differencePercent of couples
Husband 20+ years older than wife 1.1%
Husband is 15-19 years older 1.6%
Husband is 10-14 years older 4.8%
Husband is 6-9 years older 10.8%
Husband is 4-5 years older 12.2%
Husband is 2-3 years older 19.3%
Husband and wife within 1 year 35.3%
Wife is 2-3 years older 7.0%
Wife is 4-5 years older 3.5%
Wife is 6-9 years older 2.6%
Wife is 10-14 years older 1.0%
Wife is 15-19 years older 0.3%
Wife is 20+ years older 0.4%

The table clearly shows an age gap in which men are older than their marriage partners in a nearly 3.4 to 1 ratio across all included couples. In nearly 50% of couples husbands are older than their wives by more than one year, compared to just under 15% for the couples in which the age difference is in the opposite direction.


[1] Buunk B. et al. (2001) "Age preferences for mates as related to gender, own age, and involvement level", Evolution and Human Behavior 22(4):241-250, DOI: 10.1016/S1090-5138(01)00065-4

U.S. Census Bureau (2021), "America’s Families and Living Arrangements: 2021", Table FG3

Cite this calculator & page

If you'd like to cite this online calculator resource and information as provided on the page, you can use the following citation:
Georgiev G.Z., "Age Difference Calculator", [online] Available at: URL [Accessed Date: 01 Apr, 2023].