Date Difference Calculator
Count calendar days between two Gregorian dates, optionally including both endpoints. View the direction, week breakdown and Monday–Friday versus weekend counts.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Validate both dates using the Gregorian leap-year rules, then map them to integer calendar-day indexes. Subtract the indexes. Inclusive counting adds one day to the magnitude. Count weekday names over the chronological interval independently of direction.
day difference = end day index − start day index; inclusive magnitude = |difference| + 1
Worked example
From 2026-01-01 to 2026-12-31 the date difference is 364 days, exactly 52 weeks. Counting both endpoint dates gives 365 days. From 2024-02-28 to 2024-03-01 the difference is 2 days because 2024 is a leap year.
Assumptions and input details
Use the Gregorian calendar for all dates, including before its historical adoption (proleptic Gregorian), with years 0001–9999. The difference mode counts the earlier endpoint and excludes the later one; inclusive mode counts both. Reversing the dates makes the main total negative, while weekday counts remain non-negative over the normalized chronological interval. Equal dates give 0 days in difference mode or 1 day inclusive. Monday–Friday and Saturday–Sunday are explicitly named groups, not a local business calendar; holidays are not subtracted. This counts dates without time zones, daylight saving or elapsed-hour assumptions.
References: US Naval Observatory: leap years · US Naval Observatory: calendars
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Add or subtract up to 100 durations. Use signed clock durations or decimal hours, minutes or seconds, then compare the exact total and running sums.
Calculate how long two constant-rate workers, machines or pipes take together. Include an opposing drain and an already-completed fraction, with a progress graph.
Find pace, elapsed time or distance from the other two. Compare minutes per kilometer and mile, inspect split times and estimate constant-pace finish times.
Reserved advertising space.