Date Difference Calculator
Count the days between two dates — both conventions labeled, inclusive and exclusive — with weekday-only counts and a calendar breakdown, entirely on this device.
From Thursday 2026-01-01 to Friday 2026-08-07
- Weeks + days
- 31 weeks 1 day
- Calendar breakdown
- 7 months 6 days
- Whole calendar months are advanced first (clamped to month-end), then the leftover days are added.
- Weekdays (Mon–Fri, both ends included)
- 157
- Holidays are not subtracted — for working-day rules use the Business Days Calculator.
Exact multiples of the day count.
Press ? for shortcuts
Do it offline:$ datediff 2026-01-01 2026-08-07
How to use it
- Enter the first date — type 2026-01-01 or 1 Jan 2026, use the paired picker, or press Today.
- Enter the second date the same way; either order works, and the card states the direction it read.
- Read the two labeled day counts first, then the weeks, calendar, weekday and totals rows beneath them.
- Press Copy summary for a text block of every row, or save it with ⌘/Ctrl + S.
Type or pick two dates and read the answer both ways, always labeled: days between with the end date not counted, and the count including both ends. Below the headline pair sit whole weeks plus leftover days, a years-months-days breakdown, the Monday-to-Friday weekday total, and exact hour and minute equivalents. Field order never matters. Both dates stay on this device — nothing is uploaded.
How it works
Every calendar date maps to a serial day number — Howard Hinnant's civil-date algorithms on the proleptic Gregorian calendar, with 1970-01-01 as day 0. The pre-filled pair lands on 20,454 for 2026-01-01 and 20,672 for 2026-08-07, and the headline figure is plain subtraction: 218. Leap days need no special case, because the serial numbering already gives every 29 February an integer of its own.
Subtraction answers only one of two reasonable questions. From Friday 2026-08-07 to Monday 2026-08-10 the difference is 3 — the nights a hotel would bill, the days a reply has been overdue. Count the calendar squares you touch instead, Friday through Monday, and the answer is 4. Neither is wrong; a tool that prints one unlabeled number has silently picked a side. This page prints both and names each convention on the card.
The years-months-days row needs a stated policy, because months are not one fixed length. The breakdown advances the earlier date by whole calendar months while the result still fits before the later one — an anchor day like the 31st passing through a shorter month clamps to that month's last day — then counts the leftover days. So 2026-01-31 to 2026-03-01 reads 1 month 1 day, not 0 months 29 days, and re-adding the printed parts to the earlier date always reconstructs the later one exactly.
Examples
2026-01-01 → 2026-08-07218 days between · 219 including both endsThe pre-filled sample, a Thursday to a Friday: 31 weeks 1 day, or 7 months 6 days on the calendar row, with 157 of the 219 days falling on weekdays. The totals row multiplies out to 5,232 hours, 313,920 minutes and 31.14 weeks — exact multiples of the 218.
2026-08-07 → 2026-08-103 days between · 4 including both endsFriday to Monday, the fencepost pair: subtract and you get 3; count every day you touch and you get 4. Elapsed-time questions want the first number, how-many-days-am-I-booked questions the second.
2024-02-28 → 2024-03-012 days between · 3 including both ends2024 is a leap year, so 29 February sits inside this span and the subtraction crosses it: 2 days. The same two calendar dates in 2023 sit 1 day apart — the leap day is the whole difference.
2026-08-07 → 2026-01-01218 days between · 219 including both endsThe sample pair reversed: every magnitude is identical, and a chip states the direction — “The second date is earlier than the first — showing the 218 days between 2026-01-01 and 2026-08-07.”
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
Same day, adjacent days
Identical dates read 0 days between and 1 including both ends, with the chip “Both dates are the same day — 0 days between, 1 including both ends.” Consecutive dates read 1 and 2 — the smallest case where the two labels already disagree.
Leap days count like any other day
A span crossing 29 February is simply one day longer; nothing is skipped or doubled. Typing 2026-02-29 refuses with “2026-02-29 is not a real date — February 2026 has 28 days.” Century years follow the 400 rule: 1900 was not a leap year, 2000 was.
Weekdays means Monday through Friday, both ends in
The weekday row counts every Monday-to-Friday date in the inclusive range: the sample pair holds 157, and Friday to Monday counts 2 — that Friday and that Monday. Holidays are never subtracted on this page; working-day rules belong to the Business Days Calculator.
Why 03/04/2026 is refused
Two small numbers around a slash read differently across regions, so the engine refuses to guess: "03/04/2026" could be 3 April or 4 March — type the month name (4 Mar 2026) or use YYYY-MM-DD. The refusal holds even for 04/25/2026, where only one reading exists, and for any two-digit year.
Years 1 through 9999
The whole supported domain computes exactly: 0001-01-01 to 9999-12-31 is 3,652,058 days. Outside it the field refuses and names the range instead of clamping, and each field takes at most 64 characters.
No time zones, on purpose
Each field holds a civil calendar date with no zone attached. Pasting 2026-08-07Z refuses with “A civil date carries no time zone — remove "Z" and keep 2026-08-07.”, and a date-plus-time paste asks for just the date.
Common errors
"03/04/2026" could be 3 April or 4 March — type the month name (4 Mar 2026) or use YYYY-MM-DD.- Digit-only day/month order depends on locale, so it is never guessed; the hint names both readings and the two unambiguous fixes.
2026-02-30 is not a real date — February 2026 has 28 days.- Impossible component values name the month's real length instead of a bare invalid-date shrug.
Not a recognizable date — try 2026-08-07 or 7 Aug 2026.- Free-text phrases such as next Friday are out of scope; the hint shows the two accepted spellings.
Year 10000 is outside the supported range — years 0001–9999.- Beyond the four-digit year domain the tool refuses outright — no silent clamping to the nearest supported date.
FAQ
Do I count the end date?
That depends on the question you are answering, which is why both numbers stay on screen with labels. Elapsed time — how long something took, how late it is — wants the end date left out. Coverage counting — daily doses, calendar squares to cross off — wants both ends in. From a Friday to the following Monday those answers are 3 and 4.
Why do day-counter sites disagree by one?
They pick different fencepost conventions and rarely label them: one counts elapsed days, another counts calendar days touched, and the results differ by exactly one. Command-line practice leans exclusive — dateutils' datediff (packaged as dateutils.ddiff on Debian) prints 218 for this page's sample pair. Two tools one apart are usually both right about different questions; the labels here say which.
How many weekdays between two dates?
The weekday row answers that directly: every Monday, Tuesday, Wednesday, Thursday and Friday from the earlier date through the later one, both ends included. For 2026-01-01 through 2026-08-07 that is 157 of the 219 calendar days. The figure comes from arithmetic over serial day numbers, not a day-by-day walk.
Does it handle leap years?
Yes, by construction — day counts come from serial-day subtraction, so a span containing 29 February is one day longer with no special case. 2024-02-28 to 2024-03-01 is 2 days; the identical February-to-March pair in 2023 is 1. Invalid leap dates refuse with the real bound: February 2026 has 28 days, and the error says so.
What date formats can I type?
Strict YYYY-MM-DD parses silently. Three tolerated variants parse with a chip naming the normalized form: year-first slashes (2026/03/04), unpadded year-first digits (2026-3-4), and English month names in either order — 4 Mar 2026 or Mar 4, 2026, full names and Sept included. Day-first or month-first digit strings and two-digit years refuse with a teaching hint, and each field also has a native picker.
Do time zones change the count?
No. Both fields hold civil calendar dates with no zone or clock attached, so the span between them is the same fixed integer everywhere. Anything instant-shaped — a trailing Z, a UTC offset, a time of day — is refused with a hint to keep just the date.
Keyboard shortcuts
- ⌘/Ctrl + Enter
- Run the comparison again by hand — results already follow every valid edit.
- ⌘/Ctrl + C
- Copy the summary block when no text is selected; a focused date field keeps its normal copy behavior.
- ⌘/Ctrl + Shift + C
- Force-copy the summary even over an active selection.
- ⌘/Ctrl + S
- Download the summary as a timestamped days-between-dates .txt file instead of the browser's save-page dialog.
- t
- Switch the theme (inactive while a field has focus).
- ? or ⌘/Ctrl + /
- Show the keyboard reference for this tool.
- Esc
- Close the topmost dialog; both date fields keep their drafts.