Skip to content
ToolShelf

Date difference calculator

Count the days between two dates, broken down into years, months and days, weeks, and working days, with the choice of counting the end date or not.

The two dates

How to count them

Counting

Days between

—

Enter two dates to see the difference.

The off-by-one that starts arguments

From 1 March to 8 March is seven days. It is also eight days. Both are correct, and which one you want depends entirely on what you are counting: seven nights in a hotel, but eight days of car hire; seven days until a deadline, but eight days of a festival that runs from the 1st to the 8th.

This is why two date calculators so often disagree, and why the choice is a visible setting here instead of a convention buried in the code. If a figure from somewhere else is one out from this one, that is almost always the reason.

Working days, and what this cannot know

The working-days figure counts Monday to Friday within the same run of days as the total. It deducts no public holidays, and that is a deliberate limit rather than an omission. There is no universal holiday calendar: they differ by country, by region within a country and by year, and a good many of them move with the Easter or the lunar cycle. A list shipped here would be wrong for most people reading it and would go stale within a year.

The weekend is assumed to be Saturday and Sunday, which is also not universal, much of the Middle East works a Sunday to Thursday week. If either assumption does not fit you, the total days and the weeks breakdown are true everywhere and are the figures to use.

Leap years handle themselves

Both dates are converted to a continuous day number before being subtracted, so every 29 February between them is counted without anything special happening. That also means the century rule comes out right: 1900 was not a leap year and 2000 was, so the hundred years between them are 36,524 days rather than the 36,525 an average of 365.25 would suggest.

Reading the breakdown

The years, months and days figure measures the distance between the two dates, so it does not move when you change the counting option, 1 March to 8 March is a gap of seven days however many days you decide to count. Only the totals shift.

Months in that breakdown are calendar months, not a fixed 30 days, which is why it will not divide neatly into the day count. The day count is the exact figure; everything else is a way of describing it.

Questions

How many days are between two dates?
Subtract one from the other. From 1 March to 8 March is 7 days, seven nights pass, and the 8th is the seventh day after the 1st. If you want both dates to count as days themselves, which is how holiday and hire periods are usually measured, it is 8. Switch the counting option above to get either.
Why do two date calculators give me different answers?
Almost always because one includes the end date and the other does not. It is the single most common off-by-one in date arithmetic, which is why the choice is a visible setting here rather than a silent convention. Check which one you need: a booking from the 1st to the 8th is usually 7 nights but 8 days of car hire.
What counts as a working day?
Monday to Friday, and nothing else. No public holidays are deducted, because there is no universal holiday calendar: they differ by country, by region, and by year, and several move with the Easter or lunar cycle. Any list shipped here would be wrong for most visitors. Count the holidays that apply to you and subtract them yourself.
Is the weekend always Saturday and Sunday?
No, and this tool assumes it is. Much of the Middle East runs a Friday-Saturday weekend, and some countries work a Saturday morning. The figure here is strictly weekdays, Monday to Friday. If your working week is different, use the total days and the weeks breakdown instead, which are true everywhere.
Does this handle leap years?
Yes, automatically. Both dates are converted to a continuous day number before being subtracted, so every 29 February in between is counted without anything special being done. A year containing one is 366 days here. It also gets the century rule right: 1900 was not a leap year, 2000 was.
Why does the years-and-months breakdown not change with the counting option?
Because it measures the distance between the two dates, not the size of the set of days you are counting. 1 March to 8 March is a gap of 7 days whether you decide to count 7 days or 8. Only the totals move with the setting.
What if I enter the dates the wrong way round?
They are swapped and the result says so. A negative number of days answers nothing, and people fill two date fields in whatever order the question occurred to them. The earlier date is always shown first in the results so there is no ambiguity about which way the count runs.
How do I count to a date rather than between two?
Use the countdown calculator, which counts from right now to a date and time you choose and keeps ticking. This tool is for two fixed dates, where the answer does not change while you look at it.

More tools