Date Difference Calculator
EverydayCalculate the exact difference between any two dates — get years, months, days, total weeks, and a split of calendar days vs working days (excluding weekends).
Reviewed by the thecalcu.com team · Last updated July 21, 2026
Date Difference
Select a start and end date above
What is a Date Diff?
A date difference calculator finds the precise interval between any two calendar dates and expresses it in several useful units at once: total calendar days, total weeks, working days (Monday through Friday), weekend days (Saturday and Sunday), and a compound breakdown of years, months, and days. A quick mental subtraction gets you an approximate number of months at best, this tool gives you every figure you're likely to need for planning, compliance, or a contract, in a single calculation.
Date intervals come up constantly in everyday professional life. Employment contracts specify notice periods in days. Fixed-term deposits and loans mature after a precise day count. Filing deadlines fall on specific dates. Interest on loans and deposits often accrues daily. In each of these situations, getting the day count exactly right matters, an off-by-one error can mean a missed deadline or a miscalculated interest figure.
The working-day split is particularly useful. Plenty of legal and HR contexts draw a sharp line between calendar days and working days. A 90-day notice period usually means 90 calendar days, but a "30 working days" SLA in a vendor agreement stretches to roughly six calendar weeks. Seeing both counts side by side saves you from manually subtracting weekends.
If you need someone's exact age rather than a general date interval, the Age Calculator is the more focused tool, it measures from a date of birth to a reference date and reports years, months, and days lived.
Formula & Methodology
Total calendar days: Total days = ⌊ (End Date − Start Date) ÷ 86,400,000 ⌋ where dates are Unix timestamps in milliseconds and ⌊ ⌋ denotes the floor function. Years / months / days breakdown, the same borrowing algorithm used by the Age Calculator: 1. days = End.day − Start.day → if negative: months − 1, days + daysInPrevMonth(End) 2. months = End.month − Start.month − borrow → if negative: years − 1, months + 12 3. years = End.year − Start.year − borrow Working days (constant-time algorithm): fullWeeks = ⌊ totalDays ÷ 7 ⌋ workingDays = fullWeeks × 5 + Σ (for i = 0 to remaining − 1: 1 if (startDayOfWeek + i) mod 7 ∉ {0, 6}) where startDayOfWeek is 0 for Sunday through 6 for Saturday, and remaining = totalDays mod 7. weekendDays = totalDays − workingDays Worked example: Start Date: January 1, 2026 (Thursday) End Date: June 12, 2026 (Friday) 1. Total days = ⌊ (Jun 12 − Jan 1) ÷ 86,400,000 ⌋ = 162 days 2. Duration breakdown = 0 years, 5 months, 11 days 3. Full weeks = ⌊ 162 ÷ 7 ⌋ = 23 weeks; remaining = 1 4. Working days in 23 full weeks = 115 5. Remaining day (Thursday) is a weekday → +1 6. Working days = 116 | Weekend days = 162 − 116 = 46 7. Total weeks = 23 Assumptions and limitations: - The interval runs from the Start Date inclusive to the End Date exclusive, the standard convention. If you need both dates included, add 1 to the total-days result. - Working days are Monday through Friday only; no regional public holidays are deducted. - Dates are processed in the user's local timezone to avoid off-by-one errors near midnight.
How to use this Date Diff calculator
- Set the Start Date, pick the earlier of the two dates. For a notice period, this is your resignation date; for a project timeline, it's the kickoff date.
- Set the End Date, pick the later date. For a notice period, this is your last working day; for a deadline, it's the due date. The End Date must fall after the Start Date.
- Use the swap button if needed, if you entered the dates in reverse order, one click on the ⇅ button between the two fields corrects the sequence without retyping anything.
- Read the primary result, the large number in the result card shows total calendar days, with the compact duration line below it showing years/months/days and full weeks.
- Check Working Days and Weekend Days, these two figures always add up to the total calendar days.
- Scroll to the step breakdown, the full calculation is shown step by step, useful for sharing with a colleague or documenting how a figure was derived.
Why Use a Date Difference Calculator?
Manual date arithmetic is deceptively error-prone. Counting across months of different lengths, accounting for leap years, and correctly handling whether the end date is included or excluded are all easy places to slip up, a single miscounted day can invalidate a legal notice or blow a compliance deadline.
This tool removes that risk instantly, and it handles two situations that are genuinely tedious by hand:
Working-day counts for SLAs and contracts. Tallying weekdays across a long interval by hand means checking each week individually, for a 90-day span, that's a dozen weeks to count manually. This calculator does it in milliseconds with an algorithm that doesn't slow down regardless of range length.
Multi-unit breakdowns for planning. Knowing a deadline is "162 days away" is less useful than knowing it's 23 weeks and 1 day away, or that it falls after 116 working days. Having every unit available at once makes it easier to translate a gap into sprints, billing periods, or milestones.
What Insights Does the Date Diff Calculator Give You?
Total Days is the primary output, the full count of calendar days from Start Date (inclusive) to End Date (exclusive). This is the figure that matters for most financial and legal contexts: loan terms, deposit maturities, and notice periods typically measure in calendar days.
Working Days counts only Monday-to-Friday days in the interval, the relevant figure for HR notice periods specified in working days, vendor SLAs, and any process that pauses on weekends.
Weekend Days is the complement: total days minus working days, showing exactly how many Saturdays and Sundays fall in the range.
Years, Months, Days gives the human-readable compound breakdown, "5 months, 11 days," for example, useful when describing a duration in a report or in correspondence rather than citing a raw day count.
Total Weeks shows the complete number of 7-day weeks in the interval, dropping any fractional remainder, useful for billing cycles, sprint counts, and subscription renewals.
Quick Reference
| Interval type | What it excludes | Typical use |
|---|---|---|
| Total calendar days | Nothing | Loan terms, deposit maturity, legal notice periods |
| Working days | Weekends | HR notice periods, vendor SLAs |
| Total weeks | Fractional remainder | Billing cycles, sprint counts |
For a purpose-built version of this same calculation, see the Age Calculator for age specifically, or the Time Duration Calculator when you need the gap expressed down to hours and minutes rather than days. If your planning involves tracking progress toward a target rather than just the raw gap, the Percentage Change Calculator can turn elapsed days into a completion percentage.
Frequently Asked Questions