Skip to content
DATETOOLS

Days Between Two Dates

Enter two dates to get the exact number of days, weeks and months between them, with the option to count working days only and to include or exclude the start date.

Days between dates

days between the dates

146

Counting the end date but not the start date. Dates only, no timezone.

146 days from Friday 7 August 2026 to Thursday 31 December 2026.

Days146
Weeks20 w 6 d
Months and days4 m 24 d
Hours3,504
Minutes210,240
Seconds12,614,400
Show the working
Start date2026-08-07
End date2026-12-31
Day numbers20,818 − 20,672
Raw difference146
Counting rule0, the start date does not count
Weekend days42
Midpoint2026-10-19
Week numbersW32 to W53

Counted in UTC (GMT), not counting today.

Counting

Change either and every figure above updates. Most date tools pick a zone and a counting rule silently, which is why two sites can answer the same question with different numbers.

Include the start date, or not

This is the single most common source of doubt in date arithmetic, and it is worth two minutes.

By default this calculator counts the end date and not the start date. From Monday to Friday is four days. That matches how most people say it, how most software subtracts dates, and how "in four days" is normally understood.

Tick "include the start date" and Monday to Friday becomes five days. That matches how a stay is counted, how many legal periods are written, and how visa rules work, where the day you arrive and the day you leave are both counted as whole days.

Neither is right in general. They answer different questions. The gap between two dates is not the same as the number of days involved, and a lot of arguments about deadlines are really this distinction going unspoken.

The result always tells you which rule produced it. If the number matters, check that line first.

Working days, and whose holidays

Switch on "weekdays only" and the count skips Saturdays and Sundays.

It does not skip public holidays, and that is a deliberate limit rather than an oversight. A working-day count is only as reliable as its holiday list, and a list you cannot see is a list you cannot check. Until this page can show you every holiday it excluded, by name and date, it does not claim to exclude any.

The distinction matters more than it looks. England, Scotland and Northern Ireland have different bank holidays. United States federal holidays are not state holidays. If your deadline depends on a regional observance, a national list would have been wrong for you anyway, so check your own calendar for those days and subtract them yourself.

Do it yourself: Excel, Sheets, SQL, Python, JavaScript

If you need this inside a spreadsheet or a script rather than on a page, here is each one.

The same calculation in the places people actually need it.
Where Formula Note
Excel =B1-A1 format the cell as a number, not a date
Excel =DATEDIF(A1,B1,"d") also "m" for months, "y" for years
Excel, working days =NETWORKDAYS(A1,B1,holidays) NETWORKDAYS.INTL for a non standard weekend
Google Sheets =DAYS(B1,A1) note the argument order flips
Google Sheets, working days =NETWORKDAYS(A1,B1,holidays) same as Excel
PostgreSQL SELECT DATE '2026-12-31' - DATE '2026-08-07'; returns an integer
MySQL SELECT DATEDIFF('2026-12-31','2026-08-07'); later date first
SQL Server SELECT DATEDIFF(day, '2026-08-07', '2026-12-31'); earlier date first
Python (date(2026,12,31) - date(2026,8,7)).days from datetime import date
Python, working days numpy.busday_count('2026-08-07','2026-12-31') excludes the end date
JavaScript Temporal.PlainDate.from('2026-08-07').until('2026-12-31').days Temporal is not in every browser yet

Two warnings about the do-it-yourself versions.

Every one of these excludes the start date. They give you the gap, not the count of days involved. If you need the inclusive number, add one.

Do not do this arithmetic on JavaScript Date objects with timestamps. Subtracting two timestamps and dividing by 86,400,000 gives the wrong answer across a daylight saving change, because one of those days is 23 or 25 hours long. Compare calendar dates rather than instants.

Why two calculators can give different answers

If you have checked the same pair of dates in two places and got different numbers, it is almost always one of four things.

Inclusive or exclusive. One counts the start date and the other does not. This is a difference of exactly one day and it is by far the most common cause.

Times, not just dates. If either tool is working with times as well as dates, a difference of a few hours becomes a difference of a whole day once it is rounded.

Timezones. If the two dates are being treated as moments rather than as calendar dates, the answer depends on which zone they are read in. This calculator treats them as plain calendar dates with no timezone at all, which is what you want for counting days.

Different holiday lists. In working-day mode, two tools using different holiday sets will disagree, and neither is wrong, they are just answering for different countries. This one uses no holiday set at all and says so, which is why its working-day figure is always the weekends-only one.

We state our rule on every result for exactly this reason. A number without its rule cannot be checked against anything.

Frequently asked questions

How to count days in between two dates?

Subtract the earlier date from the later one. That gives the gap, which excludes the start date. If you want the number of days involved, including both ends, add one. This calculator does both and tells you which rule it used.

How do you find the middle day between two dates?

Add half the difference to the earlier date. If the gap is an odd number of days there are two middle days rather than one. This calculator gives the midpoint under "show the working".

What is the gap between dates?

The gap is the number of days you pass through going from one date to the other, counting the end date but not the start. It is one less than the number of days involved.

How do I count business days between two dates?

Switch on "weekdays only". The calculator skips Saturdays and Sundays. Public holidays are not excluded, because the list differs by country and by region, so check your own calendar for those.

Does the start date count?

Not by default. There is a toggle to include it, which adds one to the total. Legal, contractual and visa periods usually do count the start date, so check the wording of whatever gave you the deadline.

What is a D day calculator?

It is a countdown to or from a fixed reference date, with that date treated as day zero, so a date three days later is D+3 and three days earlier is D minus 3. The term comes from military planning.

The link copies with the answer, so it opens on the same result.