Days between two dates, with a working-day option
Put in two dates and get the gap in days, weeks, and calendar years, months and days. Tick the working-days box to exclude Saturdays and Sundays — useful for notice periods, project plans and payment terms. You can also choose whether the end date itself is counted, which is the source of most disagreements about date maths.
How to use the Date Difference Calculator
- Enter the start and end dates as YYYY-MM-DD.
- Decide whether both endpoints should count — leave it off for a plain subtraction.
- Leave the working-days box ticked to see the Monday-to-Friday count as well.
- Press Calculate difference.
Two ways to count, and why they differ
Subtracting dates gives the number of nights between them. Counting both endpoints gives the number of days involved. From 1 March to 5 March is 4 by subtraction and 5 if you count both days. Neither is wrong — a hotel bills 4 nights, a payroll department counting days of absence would say 5. Pick the one your contract or timesheet means, and say which you used.
Calendar difference vs total days
The totals in days and weeks are pure arithmetic. The years-months-days figure is calendar arithmetic: whole months are added to the start date and clamped to the end of a shorter month, so from 31 January to 1 March is "1 month and 1 day" in a non-leap year and "1 month and 1 day" in a leap year too, even though the day totals differ (29 vs 30). If you need an unambiguous number, use days.
Working days
The working-day count treats Monday to Friday as working days and excludes Saturday and Sunday. It is computed exactly rather than by looping: whole weeks contribute five days each, and the leftover days are checked one by one against the weekday the run starts on. Public holidays are not deducted — they differ by country, by nation within the UK, and by year, and getting them wrong is worse than leaving them out. Subtract your own bank holidays from the figure shown.
Worked example: 1 June 2026 (a Monday) to 30 June 2026, counting both endpoints, is 30 days. That is 4 whole weeks (20 working days) plus 2 leftover days starting on a Monday — both weekdays — giving 22 working days and 8 weekend days.
Typical uses
| Task | Setting |
|---|---|
| Notice period in calendar days | Both endpoints off, read total days |
| Days of annual leave used | Both endpoints on, read working days |
| Payment terms (net 30) | Both endpoints off, total days from invoice date |
| Days until a deadline | Start = today, both endpoints off |
Time zones and daylight saving
All the arithmetic is done in UTC on whole dates, so the clocks going forward or back never adds or removes a day. A difference of 90 days is 90 days whether or not a daylight-saving change falls inside the range. If you need durations in hours and minutes instead, use the time duration calculator.
Frequently asked questions
Does it exclude bank holidays?
No. Only Saturdays and Sundays are excluded from the working-day count. Public holidays vary by country and year, so subtract your own from the figure shown.
Why does the month count look odd?
Months are not a fixed length. The calendar difference borrows the real length of the preceding month, so a gap that spans February gives different day totals from one that spans March.
Should I count both the first and last day?
It depends what you are counting. Nights, notice periods and payment terms usually use plain subtraction; days of attendance or leave usually count both ends.
Can the end date be before the start date?
Yes. The result is reported as a negative span, with the same totals, so you can measure backwards from a deadline.
Privacy
This tool runs entirely inside your browser using WebAssembly and the Canvas/File APIs. Your files are never uploaded to ToolFlint or any third party; you can verify this in your browser's network tab or by switching to airplane mode after the page loads. Read how we process files.
Last updated 2026-09-23.