Date Difference Calculator
This date difference calculator finds the exact gap between two dates in years, months, days, weeks, hours, and minutes. Add or subtract days too.
Find the exact number of days, weeks, months, and years between any two dates, or add and subtract days from a starting date. The calculator handles leap years, varying month lengths, and the Gregorian calendar century rule. It also offers a business-day mode that excludes weekends and your choice of US federal holidays or UK bank holidays.
About Date Difference Calculator
How Date Differences Are Calculated
Calendar date arithmetic walks one date forward to the other, borrowing days from the previous month when needed and carrying months into years. Months have different lengths (28-31 days) and February gains a day in leap years, so simple subtraction of day numbers is not enough.
The calculator produces two parallel results:
- Broken down: X years, Y months, Z days - the most human-readable form
- Total units: total days, total weeks, total hours, total minutes
Worked example: from 1 January 2024 to 15 March 2026. The full years are 2024-01-01 to 2026-01-01 (2 years). Add January and February 2026 (2 more months). Then 1 March to 15 March is 14 days. Result: 2 years, 2 months, 14 days. In raw milliseconds that is 804 calendar days, 114 weeks and 6 days, 19,296 hours, or 1,157,760 minutes. The leap day of 29 February 2024 is included automatically.
Business Days vs Calendar Days
Calendar days count every date from start to end, including Saturdays, Sundays, and public holidays. Business days exclude weekends and, if you tick the box, public holidays. The difference is large over a long span - a full year of 365 calendar days contains about 250-253 working days once weekends and holidays are removed.
According to the US Office of Personnel Management, 2026 has 365 total days, 104 weekend days, 261 weekdays, and 11 federal holidays that fall on weekdays, leaving roughly 250 business days. For England and Wales, GOV.UK lists 8 bank holidays in 2026 (Scotland has 9, Northern Ireland has 10). The business-days mode in this tool counts the exact number by walking the date range one day at a time, so it handles short windows correctly rather than applying an average.
When a US federal holiday falls on a Saturday, the observance shifts to the preceding Friday; when it falls on a Sunday it shifts to the following Monday (5 U.S.C. 6103). UK bank holiday substitution works similarly - if Christmas Day or Boxing Day fall on a weekend, a substitute bank holiday is granted the following Monday or Tuesday. For step-by-step working-day planning with custom holiday lists, use the work days calculator.
Common Date Durations
| Duration | Days | Common Use |
|---|---|---|
| 1 week | 7 | Weekly deadlines, sprints |
| 2 weeks | 14 | Fortnightly pay periods, UK statutory notice (1-2 years service) |
| 1 month | 28-31 | Monthly billing, rent, subscriptions |
| 90 days | 90 | Quarterly reports, US B-2 visa validity, return policies |
| 6 months | 182-183 | Half-year reviews, insurance renewal windows |
| 1 year | 365 (366 leap) | Annual contracts, tax years |
| 18 months | 548-549 | Common phone contract length |
| 2 years | 730-731 | EU consumer warranty minimum, fixed-rate mortgage terms |
| 5 years | 1,826-1,827 | UK child passport validity |
| 10 years | 3,652-3,653 | UK adult passport validity, long mortgage fixes |
How Leap Years Work
A year is a leap year only if it satisfies all three Gregorian rules: divisible by 4, not divisible by 100, unless it is also divisible by 400. So 2024 is a leap year (divisible by 4, not by 100). 2100 is NOT a leap year (divisible by 100 but not 400). 2000 WAS a leap year (divisible by 400). The next non-leap century year is 2100.
In a full 400-year cycle there are 97 leap years, not 100. That gives an average year length of 365.2425 days, which matches the solar year to within about 26 seconds - accurate to roughly one day in 3,236 years. The rule was introduced by the papal bull Inter gravissimas in 1582 to correct the drift of the Julian calendar, which had assumed 365.25 days and overshot by about 11 minutes per year.
What Is the 1752 UK Calendar Gap?
Britain and its colonies switched from the Julian to the Gregorian calendar in September 1752, skipping eleven days: 2 September 1752 was followed directly by 14 September 1752. Dates in that window simply do not exist in British historical records. The UK tax year still starts on 6 April as a legacy of this change - under the old calendar the year began on Lady Day, 25 March, and the 11-day adjustment (plus a later 1-day correction) pushed the accounting year start to 6 April, where it remains today per HMRC rules.
Russia switched in 1918 (skipping 14 days), Greece in 1923 (skipping 13 days). This is why the Russian "October Revolution" actually happened in November by the Gregorian calendar. When calculating historical date differences that cross these boundaries, expect off-by-several-days discrepancies between sources.
Key Dates and Durations People Search For
- Human pregnancy: about 280 days (40 weeks) from the last menstrual period, per ACOG. See the pregnancy due date calculator for precise estimates.
- UK tax year: 6 April to 5 April (365 or 366 days). HMRC dates back to the 1752 Gregorian transition.
- US tax year: 1 January to 31 December for individuals (IRS Form 1040).
- Academic year: typically September to June, about 273 days or 39 weeks.
- EU "cooling-off" period: 14 days for online purchases under the Consumer Rights Directive 2011/83/EU.
- UK statutory redundancy notice: 1 week per year worked, capped at 12 weeks.
- 1,000 days: about 2 years and 9 months. Used as a milestone for sobriety, habit tracking, or long-term goals.
- 10,000 days: about 27 years and 4 months - roughly the age at which many people settle into their first career.
Days Between Two Specific Dates - Quick Reference
Some commonly searched date-difference calculations, verified with this tool:
| From | To | Calendar Days | Notes |
|---|---|---|---|
| 1 Jan 2000 | 1 Jan 2026 | 9,497 | 26 years inc. 7 leap days |
| 1 Jan 2020 | 31 Dec 2025 | 2,191 | Full 6-year span |
| 1 Jan 2026 | 1 Jan 2027 | 365 | 2026 is not a leap year |
| 1 Jan 2028 | 1 Jan 2029 | 366 | 2028 is a leap year |
| 6 Apr 2026 | 5 Apr 2027 | 364 | UK tax year 2026/27 |
| 1 Jan 2026 | 31 Dec 2026 | 364 | US tax year 2026 (exclusive) |
Note that "one year" is 365 or 366 days depending on the leap year rule, but exclusive counting (from 1 January to 31 December) returns one fewer. This is why year-long contracts usually specify "365 days from start" rather than "until this date next year" to avoid the leap-year ambiguity.
Why the Results Sometimes Disagree Across Tools
Different date calculators can give slightly different answers for the same two dates. Three common reasons:
- Inclusive vs exclusive endpoints: some tools count both the start and end day (giving N+1), others count the interval (giving N). This tool reports the interval - the number of full days that pass between the two dates.
- Month rollover convention: "one month after 31 March" could be 30 April or 1 May depending on whether the library clamps to the last valid day or rolls over. This tool clamps, matching JavaScript's native
Datebehaviour with manual adjustment. - Time-of-day handling: if the underlying dates carry timestamps, differences measured in days can round differently. This tool uses midnight UTC for both endpoints to keep the day count integer.
For financial contracts, insurance policies, and legal deadlines, always read the wording carefully. "Within 30 days" usually means 30 calendar days starting the day after the trigger event, but some jurisdictions count from the trigger date itself. When in doubt, use this calculator with both interpretations and pick the earlier deadline to be safe.
Date Picker Input Format
The inputs use the native HTML <input type="date"> element, which stores values internally in ISO 8601 format (YYYY-MM-DD) regardless of your locale. The display format follows your browser and OS settings - a US machine shows MM/DD/YYYY, a UK machine shows DD/MM/YYYY, and an ISO-locale machine shows YYYY-MM-DD. This avoids the common trap where 03/04/2026 could mean 3 April (UK) or 4 March (US). If you need to convert between Unix epoch seconds and readable dates, use the Unix timestamp converter.
Common Mistakes When Counting Days
- Inclusive vs exclusive: "between Monday and Friday" could mean 4 days (Mon to Fri as endpoints) or 5 days (Mon, Tue, Wed, Thu, Fri). This calculator uses exclusive counting (5 - 1 = 4). For contracts specifying "within X days", check whether the start day counts.
- Ignoring leap days: 365 days from 1 March 2023 lands on 29 February 2024 - a day that does not exist in non-leap years. Spreadsheet formulas that add a fixed 365 can silently skip or duplicate dates.
- DST transitions: the raw time difference in hours between two dates changes by one hour around daylight saving transitions. This calculator uses calendar dates without time, so DST does not affect the result, but watch for it in tools that use full timestamps.
- Mixing calendar and business days: a "30-day return window" usually means calendar days; a "within 10 working days" deadline means business days. Always check which one the contract specifies.
- Month arithmetic: one month after 31 January is not always 28 February - it depends on the library's rounding rule. This tool uses the "roll back to last valid day" convention, matching how humans usually think about monthly dates.
If you need someone's exact age to the day, the age calculator is built specifically for that. All date calculations run locally in your browser - no dates are sent to any server.
Sources
Frequently Asked Questions
How does the calculator handle months with different lengths?
The calculator accounts for varying month lengths (28, 29, 30, and 31 days) and leap years when computing differences. It uses actual calendar math rather than simple averages, so the years, months, and days breakdown is always accurate.
Can I calculate business days or weekdays only?
This calculator computes total calendar days between two dates, including weekends and holidays. For the total days result, you can estimate business days by multiplying weeks by 5 and adding remaining weekdays, but the primary output includes all days.
How does the add/subtract days feature work?
Enter any starting date and a number of days to add or subtract. The calculator returns the resulting date, correctly handling month boundaries, year boundaries, and leap years. This is useful for computing deadlines, due dates, and project timelines.
Does the calculator account for leap years?
Yes. February 29 is correctly handled in all calculations. Date differences that span a leap year and day additions across February in a leap year both produce accurate results.
Related Tools
Link to this tool
Copy this HTML to link to this tool from your website or blog.
<a href="https://toolboxkit.io/tools/date-difference-calculator/" title="Date Difference Calculator - Free Online Tool">Try Date Difference Calculator on ToolboxKit.io</a>