Date Difference Calculator

Find out how many days, weeks, months and years lie between any two dates. Includes both inclusive and exclusive day counts and a full unit breakdown.

Order does not matter, if the end date is earlier, the gap is measured backwards and labelled as such.

The gap between your dates appears here

Pick a start and end date, then press Calculate Difference.

Quick navigation
  1. Why there are two correct answers
  2. Which count to use, by situation
  3. Days, weeks, months and years
  4. Doing it by hand, and where that breaks
  5. The finance conventions nobody mentions

Why two calculators can both be right

Ask how many days there are between 1 March and 3 March and you will get two answers from two competent people. One says two. One says three. Both are defensible, and the gap between them has caused more disputed invoices, missed deadlines and blown notice periods than any arithmetic error ever has.

The two-day answer is the exclusive count. It measures the interval, how long you would wait, how far apart the two points sit on a timeline. Subtract one date from the other and this is what you get. It is what a computer does by default and what almost every date calculator reports without comment.

The three-day answer is the inclusive count. It counts both endpoints as whole days you occupy: the 1st, the 2nd and the 3rd. This is how a hotel counts nights of stay differently from days of stay, how a hire company counts rental days, and how many legal notice periods are drafted. It is always exactly one more than the exclusive count.

This calculator shows both figures side by side, labelled, so the question is settled before it becomes an argument.

Which count to use, by situation

Situation Use Reason
Days until an event Exclusive You want the waiting time, not a tally of dates
Hotel or car hire billing Depends, nights are exclusive, days inclusive Check which unit the invoice is priced in
Annual leave or sick days Inclusive The first and last day are both days off
Interest accrual Exclusive Interest is earned over elapsed time; see the day-count conventions below
Project duration in a plan Inclusive A one-day task starting and ending Monday is one day, not zero
Visa or permit validity Inclusive Entry day and exit day usually both count against the allowance
Age and anniversaries Exclusive You are nought days old on the day you are born, not one

When a document is genuinely ambiguous, the safe move is to work to the earlier deadline, the inclusive reading, and be a day early.

Where it works well

  • Both counts shown at once, so you never have to guess a convention
  • Order-agnostic, enter the dates either way round and the tool tells you the direction
  • Leap days handled automatically, with no 365-day approximation anywhere in the maths
  • UTC-normalised day counting, so a daylight-saving change inside the span cannot skew the total
  • The same span reported in days, weeks, months and calendar years for cross-checking

Where it falls short

  • Weekends and public holidays are included, for business days use the Working Days Calculator instead
  • Whole-calendar-month figures will look low next to tools that divide by an average month length
  • It cannot tell you which convention your contract intended, only what each one gives
  • Julian-to-Gregorian conversion for pre-1752 historical dates is out of scope

Days, weeks, months and years, four views of one span

A span of time has no single natural unit, so the calculator reports several and lets you pick the one that fits. What matters is knowing what each figure is actually counting.

Days is the only unit with no ambiguity. A day is a day, every day is the same length for counting purposes, and the total is simply how many of them fit in the span.

Weeks is days divided by seven. The calculator reports whole weeks plus the remaining days, because "12 weeks and 3 days" is more useful than "12.43 weeks" in almost every context where weeks are the natural unit, pregnancy, notice periods, training plans.

Months is where it gets interesting. We count whole calendar months. From 31 January to 28 February is nought months and 28 days, because 31 February does not exist and the month has not completed. From 31 January to 31 March is exactly two months. This irregularity is a property of the calendar, not of the calculator, and any tool that reports a clean 1.0 months for 31 January to 28 February is smoothing over it.

Years works the same way: whole calendar years, then the leftover months and days. A span from 1 January 2024 to 1 January 2025 is one year even though it contains 366 days, and a span from 1 January 2025 to 1 January 2026 is also one year with 365 days. Years are not a fixed quantity of days, and pretending otherwise is where most hand-worked date maths goes wrong.

Doing it by hand, and where that breaks

The reliable manual method is to break the span at year boundaries rather than trying to subtract dates directly. To go from 18 September 2024 to 7 March 2026:

  1. Days remaining in 2024 after 18 September: 12 in September, then 31 + 30 + 31 = 92 for October to December. That is 104.
  2. All of 2025: 365 days.
  3. Days into 2026 up to 7 March: 31 in January + 28 in February + 7 = 66.
  4. Total: 104 + 365 + 66 = 535 days exclusive.

This works, but it has four failure points and people hit all of them. You have to remember which months have 31 days. You have to check whether any year in the span is a leap year, and remember that century years are leap years only when divisible by 400, so 2000 was and 1900 was not. You have to be consistent about whether the start day is counted. And you have to do it without an off-by-one slip in the partial months at either end.

Spreadsheets remove three of those problems and introduce a new one: Microsoft Excel deliberately treats 1900 as a leap year to stay compatible with a bug in Lotus 1-2-3, so any span crossing 28 February 1900 comes out one day too long. It is a documented quirk rather than a defect, but it is a real source of wrong answers in historical calculations. We covered this and six other traps in seven mistakes people make doing date maths by hand.

The finance conventions nobody mentions

There is a third family of answers that neither inclusive nor exclusive counting produces, and if you have ever wondered why a bank's interest figure does not match yours, this is why. Financial instruments use day-count conventions, agreed rules for how many days a period contains and how many days a year contains, chosen for convenience rather than accuracy.

Convention Rule Typically used for
Actual/Actual Real days, real year length Government bonds
Actual/365 Real days, year always 365 Sterling money markets, many loans
Actual/360 Real days, year always 360 US and euro money markets, yields slightly more interest than Actual/365
30/360 Every month is 30 days, every year 360 Corporate bonds, some mortgages

Under 30/360, 31 January to 28 February is 28 days, and 1 January to 1 February is 30, the same instrument, two different day counts, both correct under their own rule.

This calculator reports real calendar days, which corresponds to the "Actual" family. If you are reconciling an interest figure and the numbers are close but not equal, the day-count convention in the contract is almost always the reason, and the difference will be a few days at most on any period shorter than a year.

For counting only the days a business is actually open, use the Working Days Calculator, which excludes weekends and lets you list your own holidays. To move a date forward or back by a set amount rather than measure between two dates, use the Date Add & Subtract Calculator.

Frequently Asked Questions

What is the difference between the inclusive and exclusive count?
The exclusive count measures the gap between the two dates, 1 March to 3 March is 2 days, because that is how long you would wait. The inclusive count counts both endpoints as whole days, so the same pair is 3 days: the 1st, the 2nd and the 3rd. Neither is more correct; they answer different questions. This calculator shows both so you never have to guess which one a form or contract meant.
Does the order of the two dates matter?
No. If you enter the later date first the calculator still returns the same magnitude and tells you which direction the span runs. You will see a small label indicating whether the second date falls before or after the first.
Are leap days included in the total?
Yes, automatically. The calculation works on real calendar dates, so any 29 February inside the span is counted like any other day. This is why a span you expected to be an exact multiple of 365 often comes out one or two days longer.
Why does the month figure look too low?
Because we count whole calendar months, not average months. From 15 January to 14 February is nought months and 30 days, the calendar month has not completed. A tool that divides the day count by 30.44 would report 0.98 months for the same span. The calendar figure is the one that matches contracts, tenancies and notice periods; the divided figure is only useful for rough averages.
Does the calculator account for time zones or daylight saving?
It is immune to both. Day counts are computed by normalising each date to midnight UTC before subtracting, so a clock change in the middle of your span cannot add or remove an hour and push the total across a rounding boundary. This is a real bug in naive date code and the reason some tools report 89 days where the answer is 90.
Can I use it for dates before 1900 or far in the future?
Yes, within the proleptic Gregorian calendar that browsers implement. Bear in mind that for dates before a country adopted the Gregorian calendar, 1752 in Britain and its colonies, 1918 in Russia, the historical record may use Julian dates, and the arithmetic here will not reconcile the two systems for you.