Subtracting one date from another sounds like a solved problem, and for days it is. Ask for the answer in years and months and it stops being arithmetic and starts being a set of conventions, some of which disagree with each other.
The Problem With Months
Days are a fixed unit. Months are not, and that single fact creates every ambiguity in date arithmetic.
What is one month after 31 January? There is no 31 February. Different systems answer differently: some give 28 February, clamping to the end of the month; some give 3 March, overflowing by the missing days. Both are defensible and they produce different results.
The ambiguity compounds when you add and subtract in sequence. Add one month to 31 January and subtract it again, and clamping gives you 28 February then 28 January, not the 31st you started with. Date arithmetic is not reversible in months, which surprises people writing billing code for the first time.
This calculator resolves it the way most legal and everyday reckoning does: count whole years first, then whole months, then remaining days, clamping where a day does not exist in the target month. That ordering matters, and it is why the answer can differ from a tool that counts total days and divides.
One Pair of Dates, Several Correct Answers
From 31 January 2024 to 31 March 2024. Each method is internally consistent; they simply answer slightly different questions.
| Method | Result | Where it is used |
|---|---|---|
| Calendar months, then days | 2 months, 0 days | Everyday speech, legal age, this calculator |
| Total days | 60 days | Medical dosing, short intervals, logistics |
| Days ÷ 30.44 (average month) | 1.97 months | Statistics and financial modelling |
| 30/360 day count | 2 months exactly | Bond markets and some interest calculations |
| Weeks and days | 8 weeks, 4 days | Pregnancy and infant development |
Leap Years, and the Rule Most People Forget
A leap year adds 29 February to keep the calendar aligned with the solar year, which runs about 365.2422 days.
The rule has three parts, and the third catches people out. A year is a leap year if it is divisible by 4; except if it is divisible by 100, in which case it is not; except if it is also divisible by 400, in which case it is.
So 1900 was not a leap year. 2000 was. This is why a surprising amount of software written in the 1990s had a bug waiting in it, and why some spreadsheet software still deliberately treats 1900 as a leap year for backwards compatibility with a mistake made in 1983.
The next skipped leap year is 2100, which is far enough away to be someone else's problem and close enough that date libraries handle it correctly today.
When does a leap-day baby legally turn 18?
Jurisdictions differ. In England and Wales, someone born on 29 February attains an age on 1 March in non-leap years. In much of the United States and in New Zealand, the convention is 28 February. Both rules exist because the law had to pick one, not because either is more logically correct.
Age Reckoning Is Not Universal
The Western convention, where you are zero until your first birthday, is one system among several still in active use.
International age
Completed years since birth. A newborn is 0 and turns 1 after twelve months. This is what the calculator uses and what almost all official documentation now expects.
East Asian age reckoning
A baby is 1 at birth and everyone gains a year at Lunar New Year rather than on their birthday. Under this system a child born in December could be considered 2 years old weeks later. South Korea moved to international age in law in 2023, though the traditional count survives socially.
Insurance nearest-birthday age
Some life insurers use whichever birthday is closer rather than the last one, so someone seven months past their fortieth is priced as 41. It changes premiums, which is why it appears in policy documents.
Gestational age
Pregnancy is counted in completed weeks and days from the last menstrual period, not from conception, which puts the count roughly two weeks ahead of the embryo's actual age.
Calculate an exact age or interval
Years, months, weeks and days between any two dates.
Where This Bites in Practice
Subscription billing. A monthly plan started on 31 January charges on 28 February, then 28 March if the system clamps naively, quietly moving the customer's billing date forward forever. The fix is to remember the original day of month and clamp only for display, not for the next calculation.
Age gates. Comparing dates rather than computing an age avoids off-by-one errors. Someone is 18 when today's date is on or after their birth date plus eighteen years, which is one comparison and no ambiguity.
Time zones. A birthday is a date, not an instant. Storing it as a timestamp means someone born on 1 January can appear to have been born on 31 December once the value is rendered in a different zone. Store dates of birth as plain dates with no time and no zone.
Averages over months. Reporting a monthly figure without normalising for month length makes February look worse than March by about ten percent, for no reason other than the calendar.
Frequently Asked Questions
Related Tools
Keep Reading
Percentage Change vs Percentage Points, and Other Costly Confusions
Down 50 percent then up 50 percent leaves you down 25. Why percentages are not symmetric, and how stacked discounts really multiply.
Length Units: The Inch Is Defined in Metres, and Other Surprises
Every imperial unit has been legally metric since 1959. Where the US survey foot differed until 2023, and the conversion error that lost a Mars orbiter.
Word Count Targets: What Editors, Platforms and Google Expect
Two counters can disagree by five percent on the same paragraph. Here is how counting actually works, and the targets worth writing to.
Reading Time Estimates: Where 238 WPM Comes From and When It Lies
The number behind every "5 min read" label, why technical content reads at half that rate, and how to time a script for narration.