Age Is Harder to Compute Than It Looks
Subtracting two years gives you a number that is wrong roughly half the time, because whether this year’s birthday has passed changes the answer. Doing it properly means comparing month and day as well, and then handling the cases where the arithmetic has no clean result, a 31st in a month that has thirty days, or a birthday on 29 February in a year that does not have one.
This calculator works out an exact age in years, months and days, and can measure the span between any two dates rather than just from a birth date to today.
How to Calculate an Exact Age
Everything follows from two dates, and the second one does not have to be today.
- Enter the date of birth, or whichever date the span should start from.
- Leave the end date as today for a current age, or set it to a future date to find out how old someone will be then.
- Read the result in years, months and days. The months and days are what a plain year subtraction throws away.
- Check the total in days if you need a single unit, useful for visa durations, waiting periods and anything counted in days rather than years.
- To find a span between two arbitrary dates, put the earlier one first; the calculator measures forward from it.
The Cases That Trip Up Date Arithmetic
Month lengths are the first problem. One month after 31 January has no obvious answer, because 31 February does not exist. The usual convention, and the one used here, is to clamp to the last valid day of the target month, so the answer is 28 or 29 February. That means the operation is not reversible: going forward a month and then back a month does not always return you to where you started.
Leap years are the second. A birthday on 29 February occurs roughly once every four years, and jurisdictions differ on which day counts as the legal birthday in other years, some treat it as 28 February and others as 1 March. For age display purposes 1 March is the more common software convention, but where the date matters legally the local rule governs, not the calculator.
Date Arithmetic Edge Cases
Each of these has more than one defensible answer, which is why date libraries disagree.
| Case | Example | Common handling |
|---|---|---|
| Month-end overflow | 31 Jan + 1 month | Clamped to 28/29 Feb |
| Leap day birthday | Born 29 Feb, non-leap year | Usually 1 Mar for display |
| Leap year rule | Is 2100 a leap year? | No, divisible by 100, not by 400 |
| Same-day span | 1 Jan to 1 Jan | 0 days, not 1 |
| Inclusive counting | 1 Jan to 3 Jan | 2 days difference, 3 days inclusive |
| Age before birthday | Born 30 Dec, today 1 Dec | One year less than the year difference |
Whether a span counts endpoints matters more than it sounds: a hotel stay from the 1st to the 3rd is two nights, while a three-day event starting on the 1st ends on the 3rd. This calculator reports the difference between dates, not an inclusive count.
Days, Weeks and Why Months Are Awkward
Days and weeks are stable units, a week is always seven days, which is why medical, legal and travel contexts so often count in them. Months are not: they range from 28 to 31 days, so "three months" is a different length depending on where in the year it starts. When a deadline matters, converting to days removes the ambiguity.
Calendar reforms are a further edge for historical dates. Countries adopted the Gregorian calendar at different times, spanning from 1582 to 1923, so a span crossing that change in a given country does not correspond to a simple day count. For ordinary modern dates none of this arises, but it is why dates from old records sometimes disagree with a calculator by ten or more days.