Skip to content
Date & Time

Date Difference Calculator

The number of days between two dates has two correct answers. Counting elapsed days — nights passed — gives one figure; counting the days themselves, as a hotel booking or a notice period does, gives one more. Legal drafting separates them as clear days versus days inclusive.

By Updated Runs in your browser — nothing is uploaded

Input · parameters

One ISO date per entry, separated by commas, spaces or line breaks. Holidays falling on a weekend are ignored, since they were never working days.

On this page
  1. The question behind the question
  2. Days, weeks, months, years
  3. Working days
  4. Leap years and the Gregorian rule
  5. ISO 8601 weeks
  6. Why two calculators can disagree by one day
  7. What this calculator does not do

The question behind the question

"How many days between 1 March and 3 March?" has two correct answers, and which one you want depends entirely on what you are counting.

Two, if you are measuring elapsed time. Two nights pass. A car hired on the 1st and returned on the 3rd was out for two days, and that is what you are charged for.

Three, if you are counting the days themselves. A conference running from the 1st to the 3rd is a three-day conference. A jury summons for those dates asks for three days of your life.

Neither is a rounding error or a convention this tool picked; they are answers to different questions. This calculator reports both, labelled, rather than choosing for you — because the one-day discrepancy between them is the single most common date mistake in contracts, invoices and project plans.

Legal drafting has vocabulary for it. "Clear days" excludes both the first and the last day. "Days inclusive" counts both. A notice period of "14 days from 1 June" almost always means the period ends on 15 June, not 14 June, because the period runs from a day rather than including it. If a document does not say, the applicable procedural rules usually do.

Days, weeks, months, years

The total day count is unambiguous once you have fixed the inclusive question. The calendar breakdown — years, months and days — is not, and it is worth understanding what this tool does.

It counts real calendar months, not average ones. From 15 January to 15 March is exactly two months here, even though that span is 59 days in a common year and 60 in a leap year. Tools that report months by dividing the day count by 30.44 give a smoothed statistical figure. That figure is useful for a chart and wrong for an anniversary, a contract term or a rent period.

It clamps at month ends. One month after 31 January has no exact answer, since 31 February does not exist, so it resolves to 28 or 29 February. Every mainstream date library does this. One consequence is worth knowing: adding a month twice is not always the same as adding two months. From 31 January, one month gives 28 February, and one more month gives 28 March — but two months at once gives 31 March.

The remainder is measured in real days from a clamped anniversary, which is why it can never come out negative. The naive method — subtract the day numbers and borrow a month when the result goes below zero — breaks at month ends. From 31 January to 1 March it borrows February's 28 days against a shortfall of 30 and still ends up negative, producing a nonsensical "1 month, −2 days".

Working days

The default here is Monday to Friday, which is the convention most contracts, courier services and statutory deadlines use.

Public holidays are the part no calculator can assume. They differ by country, by region within a country, by industry, and often by employer — England and Scotland do not share a full set, and the United States has federal holidays that many private employers do not observe. So this tool takes them as input: paste the dates that apply to you and they are subtracted from the weekday total.

Holidays landing on a Saturday or Sunday are ignored, because they were never working days to begin with. Whether they generate a substitute weekday off is a matter of local law — the UK grants substitute days, the US federal system observes a nearby weekday, and many jurisdictions do neither. If a substitute day applies to you, enter the substitute date.

Some definitions are narrower still. Banking days exclude days when the settlement system is closed, which is not the same list as public holidays. Court days follow the court's own calendar. Trading days follow the exchange's. If a contract says "business days" without defining them, that ambiguity has been litigated more than once.

Leap years and the Gregorian rule

A year is a leap year if it is divisible by 4, except century years, which are leap years only if divisible by 400.

  • 1996: divisible by 4, leap year
  • 1900: century, not divisible by 400, not a leap year
  • 2000: century, divisible by 400, leap year
  • 2100: century, not divisible by 400, will not be a leap year

The 1900 exception is responsible for a famous piece of software archaeology: Lotus 1-2-3 treated 1900 as a leap year, Excel copied the bug for compatibility, and Excel's date serial numbers are still wrong by a day for anything before 1 March 1900 — a bug now preserved deliberately for thirty-odd years of backwards compatibility.

The rule gives 97 leap years per 400 years, making the average Gregorian year 365.2425 days. The actual tropical year is about 365.24219 days, so the calendar gains roughly 27 seconds a year — about one day every 3,200 years. That is a problem for a future civilisation, not for a project plan.

The calculator counts how many 29 Februaries fall inside your range, which is a quick way to check a day count that feels one off.

ISO 8601 weeks

Week numbers are more slippery than they look, and there are two incompatible systems in common use.

ISO 8601, used across Europe and in most logistics, manufacturing and payroll systems, defines the week as starting on Monday, with week 1 being the week that contains the first Thursday of January — equivalently, the week containing 4 January. This means a year has 52 or 53 weeks, and the first days of January can legitimately belong to week 52 or 53 of the previous year. 1 January 2027 falls in ISO week 53 of 2026.

The US convention starts weeks on Sunday and calls the week containing 1 January week 1, which produces a partial first week and different numbers for most of the year.

This calculator reports ISO weeks, and labels them with the ISO year rather than the calendar year for exactly the reason above.

Why two calculators can disagree by one day

Three causes account for nearly all of it.

The inclusive question. Covered above. Check what each tool is counting before assuming one is broken.

Time zones. A "date" is not a point in time; it is a date somewhere. If one tool interprets your input in local time and another in UTC, and you are east or west of Greenwich, the two can land on different days. This calculator parses both dates as UTC midnight, so the clock never enters the arithmetic and the result does not change depending on where you are sitting.

Daylight saving. A span crossing a DST transition is 23 or 25 hours long, not 24. Any tool that computes elapsed milliseconds and divides by 86,400,000 will produce a fraction and round it — sometimes the wrong way. Working on whole UTC dates avoids the problem entirely, which is why this tool does.

What this calculator does not do

It works with dates, not times. It cannot tell you the duration between 09:30 on Tuesday and 14:15 on Friday, and it does not know about time zones beyond deliberately ignoring them.

It also does not know your holidays, your notice-period rules, or whether your contract counts clear days. It gives you the raw counts under stated conventions; applying the right convention to your situation is a decision only you can make, and if the answer matters legally, the governing rules of procedure are the authority — not this page.

Dates are handled per the proleptic Gregorian calendar and ISO 8601, and week numbering follows ISO 8601-1:2019. The calendar rules trace to the USNO's astronomical applications material, and the bank holiday examples to GOV.UK — all linked below.

Common questions

Frequently asked questions

Should the end date be counted or not?

It depends on what you are measuring, which is why this calculator shows both. The difference between 1 March and 3 March is two days if you are measuring elapsed time — two nights passed — and three days if you are counting the days involved, as a hotel booking or a jury summons would. Contracts and statutes almost always specify which convention applies, and getting it wrong by one day is the most common date error there is.

How many days are in a month for these calculations?

This calculator does not average. It counts real calendar months, so from 15 January to 15 March is exactly two months regardless of the fact that those months contain 59 or 60 actual days. Tools that divide the day count by 30.44 give a smoothed figure that is convenient for statistics and wrong for anniversaries, deadlines and contract terms.

How do you handle the end of the month?

By clamping. One month after 31 January has no exact answer, because 31 February does not exist, so it resolves to 28 or 29 February depending on the year. Every mainstream date library does this, and it is why adding a month twice does not always give the same result as adding two months at once — 31 January plus one month plus one month is 28 March, while 31 January plus two months is 31 March.

What counts as a working day?

By default, Monday to Friday. Public holidays vary so much by country, region and even employer that no calculator can assume them, so this one lets you enter the ones that apply and subtracts any that fall on a weekday inside your range. Some contracts define business days differently again — banking days, court days, and clear days each have their own rules.

How many leap years are in a given range?

A year is a leap year if it is divisible by 4, except that century years are not leap years unless they are divisible by 400. So 1900 was not a leap year and 2000 was. That gives 97 leap years every 400 years, which makes the average Gregorian year 365.2425 days — about 27 seconds longer than the actual tropical year, an error of roughly one day every 3,200 years.

Why might two date calculators disagree by a day?

Almost always one of three things: the inclusive-versus-exclusive choice, a time zone difference that pushes one of the dates over midnight, or daylight saving. A span crossing a DST boundary is 23 or 25 hours long rather than 24, and a tool that divides elapsed milliseconds by 86,400,000 will round the wrong way. This calculator works in UTC on whole dates, so the clock never enters the arithmetic.

What is ISO 8601 week numbering?

A standard way of naming weeks in which every week starts on Monday and week 1 is the week containing the first Thursday of the year — equivalently, the week containing 4 January. It means a year has either 52 or 53 weeks, and the first days of January can belong to the last week of the previous year. Payroll, manufacturing and logistics systems use it heavily, and it differs from the US convention where weeks start on Sunday.

References

Sources

The formulas and reference ranges on this page come from the following publications. Where a source has been revised, we cite the current edition.

  1. 1ISO 8601-1:2019 — Date and time representations for information interchangeInternational Organization for Standardization (ISO)
  2. 2Inter Gravissimas — the papal bull introducing the Gregorian calendar (1582)United States Naval Observatory, Astronomical Applications Department
  3. 3UK bank holidaysUK Government (GOV.UK)

Keep going