Menu

Search toolsChangelog

to move to openDescribe the problem, not the tool

Days between two dates

Work out how far apart two dates are — in days, weeks, whole months and years — and how many of those days are actually worked once weekends and public holidays come out. The span is broken down period by period and the table downloads as a spreadsheet.

The earlier date. The order does not matter — the tool reports the distance between the two.

The later date. By default it is the finishing line rather than a day that is counted.

Turn this on for a holiday or a hire: 1 to 5 June is five days when both ends count, four when they do not.

Days between
358
Whole calendar days, so a clock change never adds or removes one.
Business days
250
Weekend days and holidays
108
Weeks
51.14
Whole months
11
In years, months and days
11 months, 24 days
Holidays skipped
6

Broken down by period

January 2026312110
February 202628208
March 202631229
April 2026302010
May 2026311912
June 202630228
July 202631238
August 2026312011
September 202630228
October 202631229
November 202630219
December 202624186

Results are provided as-is, with no warranty of accuracy. The method and its sources are published below so you can check the working.

Working days by period
Chart type for “Working days by period”
0 5 10 15 20 25 30 35 January 2026 June 2026 November 2026
0 5 10 15 20 25 30 35 January 2026 June 2026 November 2026
0 5 10 15 20 25 30 35 January 2026 June 2026 November 2026
0 5 10 15 20 25 30 35 January 2026 June 2026 November 2026
0 5 10 15 20 25 30 35 January 2026 June 2026 November 2026
0 5 10 15 20 25 30 35 January 2026 June 2026 November 2026

The span split into periods. The shorter bar is what is left once weekends and the holidays you listed are taken out.

How it works

What this works out

Two questions hide inside “how far apart are these dates”. The first is how many days there are, which sounds trivial until you notice that leap years, the century rule and two clock changes a year all sit between the answer and a naive subtraction. The second is how many of those days anybody actually works, which is the number a project plan, a notice period or a delivery estimate turns on.

This calculator answers both at once, and shows the working period by period so the total can be checked rather than trusted. The table downloads as a spreadsheet.

The method

Each date is converted into a day number — whole days counted from 1 January 1970 — with integer arithmetic and no clock. That single decision is what makes the result correct. A date on a calendar is not an instant in time, and treating it as one is where date calculators go wrong: 2026-03-29 parsed as UTC midnight and the same date parsed as local midnight are different instants, and in Europe/London the day British Summer Time begins is 23 hours long, so dividing an elapsed-millisecond difference by 86,400,000 reports 30.958 days for a span the calendar shows as 31. With no hour in the arithmetic there is no offset, and with no offset there is nothing for a transition to shift.

The span is a half-open interval. Everything on the page — the day count, the working days, the table, the years-and-months breakdown — is computed from the same [start, end), which is why turning on “count the end date as a day” moves all of them together instead of only the headline.

Working days are counted in closed form rather than by walking the range. Every whole week in a span contributes the same number of worked days, so only the leftover days at the end — at most six — need looking at individually. That matters because the formula runs on every keystroke: a span of three centuries would otherwise be 110,000 iterations per character typed.

Whole months are defined as the largest number of months that can be added to the start date without passing the end, where adding a month clamps to the end of the target month. Stating it as the inverse of the addition is what makes it agree with itself at the awkward edges — the subtract-and-borrow method calls 31 January to 28 February 28 days, while its own month arithmetic puts one month after 31 January squarely on 28 February.

Holidays are subtracted only when they fall on a day that would have been worked. A bank holiday on a Saturday costs nobody a working day, which is the reason substitute Mondays exist in the first place.

Before you read on

1 January to 25 December 2026, end date not counted, with all eight England and Wales bank holidays for 2026 in the holiday box. How many get subtracted?

  • They do. Two of them fall outside this span.

  • Yes. Christmas Day is the finishing line rather than a counted day, and Boxing Day is past it.

  • It is the end of the range, which with the end date not counted means it is not in it.

Six. The span is a half-open interval — everything on the page is computed from the same [start, end) — so 25 December is the finishing line rather than a counted day, and the 28 December substitute is past it. That is also why the switch marked 'count the end date as a day' moves the day count, the working days, the table and the years-and-months breakdown together instead of only the headline figure.

Why the working days are not counted one at a time
  1. 358 = 51 x 7 + 1

    Split the span into whole weeks and a remainder. The remainder is at most six days, whatever the span.

  2. 51 x 5 = 255

    Every whole week contributes the same five worked days, whichever days of the week it happens to start on.

  3. 255 + 1 = 256

    Only the leftover days need looking at individually. 1 January 2026 is a Thursday, so the one spare day here is a weekday.

  4. 256 - 6 = 250

    Subtract only the holidays landing on a day that would have been worked. A bank holiday on a Saturday costs nobody a working day, which is why substitute Mondays exist.

A worked example

From 1 January 2026 to 25 December 2026, end date not counted, with a Saturday and Sunday weekend and the eight England and Wales bank holidays for 2026 in the holiday box.

Days between358
Business days250
Weekend days and holidays108
Weeks51.14
Whole months11
In years, months and days11 months, 24 days
Holidays skipped6

Check it by hand. 1 January 2026 is a Thursday, and 358 days is 51 whole weeks plus one day:

358 = 51 x 7 + 1

  51 whole weeks x 5 worked days   = 255
  the leftover day is the Thursday =   1
                                     ---
  weekdays                           256
  less bank holidays inside the span -  6
                                     ---
  business days                      250

Six, not eight, because the interval stops before Christmas Day: 25 December is the finishing line rather than a counted day, and 28 December is past it. The weekend total checks the same way — 51 Saturdays and 51 Sundays is 102, plus the six holidays gives 108.

Month by month, which is the table the tool draws and downloads:

PeriodDaysBusiness daysWeekends and holidays
January 2026312110
February 202628208
March 202631229
April 2026302010
May 2026311912
June 202630228
July 202631238
August 2026312011
September 202630228
October 202631229
November 202630219
December 202624186

December is short because the range stops on the 25th. The days column sums to 358 and the business column to 250.

These are the same numbers asserted in this tool’s test file, so if the formula ever changes without this page changing with it, the build fails.

What it does not do

It does not know your holidays. The box starts with the England and Wales bank holidays for 2026 because the default has to be something, and every other country, every company shutdown and every regional holiday has to be typed or pasted in. It has no concept of half days, part-time patterns or a working week other than the four weekend options offered, and it does not know that some industries treat a public holiday as an ordinary working day. It reads dates only as YYYY-MM-DD, so 03/04/2026 is refused rather than guessed at — that date is 3 April in London and 4 March in New York, and guessing wrong would be worse than asking. Finally, the calendar is Gregorian all the way back, including before it was adopted, so a span crossing September 1752 in Britain counts the eleven days that were skipped when the country changed over.

And it produces a count, not a page. If what you actually want is something to write the days on, a printable calendar covers the same span in a form that survives a printer.

The formula

Every date becomes a day number: whole days counted from 1970-01-01
in the proleptic Gregorian calendar. No hour, no offset, no clock.

  n = daysFromCivil(year, month, day)

The span is one half-open interval, [start, end):

  days = n(end) - n(start),  plus 1 if the end date is counted

Weekday of a day number, 0 = Sunday:

  w = ((n mod 7) + 4 + 7) mod 7        1970-01-01 was a Thursday

Business days over a span of N days beginning on weekday w0, without
walking the range:

  whole   = floor(N / 7)
  left    = N - 7 x whole
  working = whole x (7 - weekendDays)
          + how many of w0, w0+1, ..., w0+left-1 (mod 7) are worked
          - listed holidays inside the span that fall on a worked day

Calendar difference, where addMonths clamps to the end of the target
month (31 January + 1 month = 28 February):

  m     = the largest k with addMonths(start, k) <= end
  days  = n(end) - n(addMonths(start, m))
  years = floor(m / 12),  months = m mod 12

What it assumes

  • Dates are treated as days on a calendar, never as instants. There is no time of day anywhere in the arithmetic, so no timezone applies and the answer is the same in Auckland as it is in Anchorage.
  • Because there is no clock, a daylight-saving change cannot affect the count. A span across the March transition in Europe/London is 23 hours short of a whole number of 24-hour days, and dividing elapsed milliseconds by 86,400,000 would report one day fewer than the calendar shows.
  • By default the end date is the finishing line rather than a counted day, so 1 June to 30 June is 29. Turning on "count the end date as a day" makes it 30, and every figure on the page moves together.
  • The order of the two dates does not matter. The tool reports the distance between them and never a negative number.
  • Whole months are counted by clamped addition, so 31 January to 28 February is one whole month and 31 January to 1 March is one month and one day. Month arithmetic defined this way is not reversible — a month forward and then a month back from 31 January lands on 28 January.
  • A holiday falling on a weekend is not subtracted, because it was not a day that would have been worked. That is exactly why the United Kingdom observes Boxing Day on a Monday when 26 December is a Saturday, and why the substitute date is what the default list carries.
  • Every line in the holiday box that has no date on it is ignored rather than refused, because throwing an error would blank the page while somebody is halfway through pasting a list. The holidays-skipped figure is the check on that, since it counts the lines that actually applied.
  • The calendar is proleptic Gregorian throughout, including for dates before it was adopted. Britain switched in September 1752 and dropped eleven days doing it, so a span crossing that month is a day count and not what a contemporary diary would have said.

Common questions

Does it count the first day, the last day, or both?

By default it counts neither end as a whole day: it measures the gap, so 1 June to 30 June is 29. That is what you want for a deadline, a notice period or interest. Turn on "count the end date as a day" for anything billed by the day — a hotel stay, a car hire, annual leave — and the same span reads 30.

Are my dates sent anywhere?

No. The arithmetic runs in this browser tab and there is no server to send anything to. The holiday list, which is the only part that could identify a country or an employer, never leaves the page either.

Does daylight saving time change the answer?

No, and that is deliberate. The tool works in whole calendar days rather than in hours, so the 23-hour day in spring and the 25-hour day in autumn never enter the arithmetic. A tool that subtracts two timestamps and divides by 24 hours gets those two weeks of the year wrong by a day.

Why is 31 January to 28 February a whole month?

Because adding one month to 31 January lands on 28 February — there is no 31 February, so the date clamps to the end of the month. Defining the gap as the inverse of that addition is what keeps the two consistent. The alternative, subtracting the day numbers and borrowing, reports 28 days and then disagrees with its own month arithmetic.

Which public holidays are in the box to start with?

The eight England and Wales bank holidays for 2026, as published by GOV.UK. Replace them with your own list — one date per line as YYYY-MM-DD — or write "none" to count every weekday. Scotland and Northern Ireland have different lists, which is why this is an editable box rather than a fixed assumption.

Why does the breakdown switch from months to years?

To keep the table readable. One row per month is right for a project or a notice period, but two dates three centuries apart would be 3,600 rows, so the rows widen to years, then decades, then centuries as the span grows. Each row still counts only the part of its period that falls inside the range, so the column always sums to the headline figure.

Sources

Method written and checked by Tessalor on Jul 30, 2026.