Date Difference Calculator
Calculate exact duration between dates, exclude customizable weekends, or add/subtract time offsets timezone-neutrally.
About the Date Difference Calculator
A date difference calculator determines the precise calendar duration between two dates, providing breakdowns in total days, weeks, months, and years, alongside working (business) days, or computes a target date by adding or subtracting calendar units (years, months, weeks, days) to a starting date.
Mathematical Formula & Logic
Step-by-Step Example
Calculate the date difference between January 1, 2026 and December 31, 2026, and add 1 month and 15 days to January 15, 2026: 1. Date difference (excluding end day): Jan 1 to Dec 31 is exactly 364 days, which breaks down to 11 months and 30 days, or 52 weeks and 260 business days (assuming standard Sat/Sun weekend). 2. Date difference (including end day): Jan 1 to Dec 31 including the end day is 365 days, which breaks down to 12 months (or 1 year), 52.14 weeks, and 261 business days. 3. Add 1 month and 15 days to January 15, 2026: - Step 1a: Add 1 month to Jan 15 -> Feb 15, 2026. - Step 1b: Add 15 days to Feb 15. Since Feb 2026 has 28 days: Feb 15 + 13 days = Feb 28. Feb 28 + 2 days = March 2, 2026. The target date is Monday, March 2, 2026. Adding months is not reversible This is the trap that catches contract dates and subscription renewals. Take January 31, 2026 and add one month. February 2026 has 28 days, so the result clamps to February 28. Now subtract one month from that answer and you land on January 28 — three days adrift of where you started. The operation is not an error, it is a consequence of months having unequal lengths, and every date library behaves this way. The practical rule is that month arithmetic loses information whenever the source day exceeds the length of the target month, so a chain of month offsets should always be applied to the original date rather than to each intermediate result. Day arithmetic has no such problem. Adding 31 days and then subtracting 31 days always returns you to the starting date, because a day is a fixed quantity and a month is not. The leap year rule is not simply every four years A year is a leap year if it is divisible by 4, except that century years are not, unless they are divisible by 400. So 2024 was a leap year, 2100 will not be, and 2000 was — which is the case that trips most implementations, since a naive divisible-by-4 test and a naive divisible-by-100 test both get it wrong. The correction exists because the solar year is close to 365.2425 days rather than 365.25. Dropping three leap days every four centuries removes the accumulated error. Business days per year vary between 260 and 262 There is no fixed answer, because it depends on which weekday the year begins on and whether it is a leap year. Counting Monday to Friday and ignoring public holidays entirely: 2024 had 262, 2025 had 261, 2026 has 261, 2027 has 261, and 2028 has 260. The 260 figure often quoted as standard is simply 52 weeks times 5 days, and it is correct only in years that happen to land that way. Public holidays then subtract a further 8 to 15 depending on the country, which is why payroll and project schedules cannot use a single universal number. Inclusive or exclusive counting January 1 to December 31, 2026 is 364 days if you count the gap between the dates, and 365 if you count both endpoints as days. Neither is more correct — a hotel charges for nights, so it uses the gap, while a leave request counts both the first and last day off. Deciding which one you mean before reading the answer avoids the off-by-one error that follows.
Reference Data & Values
| start | end | include end | weekend | total days | workdays |
|---|---|---|---|---|---|
| 2026-01-01 | 2026-01-15 | No | Sat & Sun | 14 days | 10 days |
| 2026-01-01 | 2026-01-15 | Yes | Sat & Sun | 15 days | 11 days |
| 2026-01-01 | 2026-01-08 | No | Sun Only | 7 days | 6 days |
| 2026-01-31 | +1 Month | - | - | - | 2026-02-28 |