Date Calculator: Intervals Between Dates and Date Arithmetic
This date calculator does the two things people actually need from a calendar. It measures the exact interval between two dates, expressed in years, months and days along with totals in weeks, days and hours, and it adds or subtracts a duration from a date to tell you where you land. Both use real calendar rules, so leap years, unequal month lengths and the awkward end of month cases come out the way they would if you counted on a wall calendar rather than dividing by 365.
Table of Contents
How Intervals Are Counted
Subtract in order: years, then months, then days. From 15 June 2024 to 4 September 2026 is 2 years, 2 months and 20 days. Each unit is taken out in turn rather than everything being converted to days and divided back.
Borrowing is where the care goes. When the day of the month in the later date has not yet been reached, a month is borrowed and its real length in days added. From 31 January to 1 March borrows February, which contributes 28 days or 29 in a leap year.
The totals are computed separately. Total days comes from the actual number of calendar days between the two dates, so it counts every leap day. It will not always agree with multiplying the years and months figure back out, and that is correct rather than a bug.
Order does not matter. Entering the later date first produces the same span, with a note telling you the dates were the other way round.
How to Use Both Modes
Difference mode takes two dates and reports the gap. The three headline numbers are one answer split into parts, not three separate figures, so reading only the years discards most of the precision. The totals underneath give you the same interval expressed in single units, which is usually what a form wants.
Add or subtract mode takes a starting date and a duration in years, months, weeks and days, and tells you where you land. Fields combine, so three months and ten days works in one go. Switch the direction to count backwards.
The weekday is always shown, which matters more often than people expect. A deadline that lands on a Saturday usually needs moving, and knowing that immediately saves a second lookup.
Copy Result puts the full breakdown on your clipboard as plain text, ready to paste into a ticket, an email or a form.
Inclusive and Exclusive Counting
This is the single most common source of off by one errors. From Monday to Friday is four days if you are measuring an interval, and five days if you are counting the days involved. Both are correct answers to different questions.
Leave the checkbox off for an interval. That is what you want for age, notice periods, time until a deadline and anything phrased as how long between.
Switch it on for a count of days. Days of annual leave, nights billed, duration of a stay and most contractual day counts include both ends.
When it matters legally, read the wording. Contracts and statutes usually say whether a period is inclusive, and getting it wrong by one day can invalidate a notice.
The End of Month Problem
What is one month after 31 January? There is no 31 February, so something has to give. This calculator clamps to the last valid day, giving 28 or 29 February, which is what most people expect and what most legal drafting assumes.
Other systems spill forward instead, landing on 2 or 3 March. Neither is wrong in the abstract, but the two disagree, which is why the same calculation in two tools can differ by a couple of days.
Adding months is not associative. Adding one month twice to 31 January gives 31 March under clamping, because the first step lands on 28 February and the second returns to the end of the month. Adding two months at once gives 31 March as well, but for other dates the two routes can differ. If precision matters, add in a single step, as this tool does.
Leap Years and Why 365 Fails
The rule has three parts. A year is a leap year when divisible by four, except centuries, unless the century is divisible by 400. So 2000 was a leap year, 1900 was not, and 2100 will not be. Software that only checks divisibility by four will be wrong in 2100.
Dividing days by 365 drifts. The error is about one day every four years, which over a working lifetime is more than a week. It is fine for a rough answer and wrong for anything official.
29 February needs a convention. Anniversaries of a leap day have no exact equivalent in common years. Most legal systems treat 28 February as the anniversary, though some prefer 1 March, and families often disagree with both.
Where Exact Dates Matter
Contracts and notice periods. A three month notice served on 30 November expires on 28 February in a common year under clamping. Getting this wrong has real consequences, which is why the end of month convention is worth knowing.
Project planning. Working out a delivery date from a start plus a duration, then checking which weekday it lands on, is the everyday case. If weekends matter, the business days calculator is the better tool.
Warranties and expiry. Two years from purchase, thirty days to return, six months of cover. All of these depend on calendar arithmetic rather than day counts.
Travel and visas. Many visa rules are expressed as a number of days within a rolling window, and the counts are usually inclusive, which is exactly where the checkbox above earns its place.
Doing This in a Spreadsheet
Subtracting two dates gives days. In Excel and Google Sheets, later minus earlier returns the number of days as a plain number, which is the exclusive count.
DATEDIF gives the broken down form, with unit codes for years, months and days. It is an undocumented holdover in Excel, still supported, and it has known quirks around month ends, which is one reason results can differ from a purpose built calculator.
EDATE adds months with clamping, matching the behaviour used here. Adding 30 days and adding a month are different operations and should not be substituted for each other.
Why There Is No Time Field
Calendar dates avoid a whole class of bug. As soon as a time is attached, the answer depends on time zone, and on whether daylight saving moved the clock between the two moments. A day is not always 24 hours.
Most date questions are not about instants. A contract that runs for ninety days is counting calendar days, not 2,160 hours. Keeping the arithmetic on dates matches how the question is actually asked.
When you do need clock time across zones, that is a different problem, and the time zone converter handles it with daylight saving applied properly.
Common Mistakes to Avoid
Confusing inclusive and exclusive counts. The off by one that catches everyone. Decide which question you are answering before reading the number.
Treating a month as 30 days. Adding 30 days and adding one month give different answers in eleven months of the year.
Ambiguous date formats. Third of April is 04/03 in the United States and 03/04 nearly everywhere else. The date picker used here removes the ambiguity; typed dates in emails do not.
Ignoring the weekday. A deadline landing on a weekend or a public holiday usually moves, and the rule for which way it moves varies by contract and jurisdiction.
Frequently Asked Questions
On legal deadlines: Contracts and statutes set their own rules for inclusive counting, end of month dates and what happens when a deadline falls on a weekend. Where a date carries legal weight, confirm it against the wording that governs it.