HomeCalculatorsEverydayDate Difference Calculator

Date Difference Calculator

Everyday

Calculate 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

July 5th, 2026
August 4th, 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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Check Working Days and Weekend Days, these two figures always add up to the total calendar days.
  6. 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

It finds the precise gap between any two dates and breaks it down into years, months, days, total calendar days, total weeks, working days, and weekend days. It's useful anytime you need an exact count rather than a rough estimate, notice periods, project timelines, loan terms, or any deadline where an off-by-one error matters. This tool shows all seven figures from a single pair of date inputs.
Set a Start Date and End Date and the total days appear instantly. Doing it by hand, count from the start date up to but not including the end date, the standard interval convention used in banking, contracts, and legal notices. From January 1 to March 31 is 89 days, not 90, because the end date itself isn't counted.
Total days = End Date − Start Date, in whole days. In practice that's the difference between the two dates' Unix timestamps divided by 86,400,000 (milliseconds per day), rounded down. The years/months/days breakdown works component by component, days first, borrowing from months if the result goes negative, then months borrowing from years, the same way you'd do subtraction by hand.
Monday through Friday. Saturday and Sunday are treated as weekend days and excluded from the working-day count. This tool doesn't subtract public holidays for any specific country or region, for a legally precise notice-period or SLA calculation, subtract your applicable holidays from the working-day total manually.
Rather than looping through every day, the calculator splits the total days into full 7-day weeks (each contributing 5 working days) plus a remainder, then checks each remaining day's day-of-week individually. That gives the right answer instantly, no matter how long the date range is. Weekend days is simply total days minus working days.
Calendar days count every day in the interval, weekends included. Working days count only Monday through Friday. Over a 30-calendar-day span, working days typically land between 20 and 23 depending on where the weekends fall. That gap matters in employment (notice periods are often specified in working days), banking (clearing times), and project scheduling (sprint lengths).
No. It treats Monday through Friday as working days and Saturday/Sunday as weekend days, but it doesn't subtract national or regional holidays, which vary widely by country and even by state or province. For a compliant notice-period or SLA calculation, take the working-day figure from this tool and subtract the specific holidays that apply to your situation.
Yes. Enter your resignation date as the Start Date and the date after your notice period as the End Date to see exactly how many calendar and working days fall in between. Most employment contracts specify notice periods in calendar days, so the total-days output is usually the relevant figure, if your contract specifies working days instead, use that output and adjust manually for any holidays.
Add the days remaining in the start month, then the full days in each intervening month, then the days elapsed in the end month, excluding the end date itself. From March 15 to June 20: 16 days left in March, 30 in April, 31 in May, and 19 days in June up to but not including the 20th, 96 days total. For working days, additionally count the Saturday-Sunday pairs across the interval, subtracting 2 for every full week.
A calendar month usually contains 20 to 23 working days, depending on how many weekends fall inside it and where the month boundaries land. February, being the shortest month, tends to have the fewest, usually 20. A 31-day month starting on a Monday can reach 23. None of this accounts for public holidays, which can trim another 1–3 days per month depending on where you are.
An age calculator is a specific version of this idea, it always measures from a date of birth to a reference date (usually today) and focuses on completed years of life. A date difference calculator is general-purpose: it measures the gap between any two arbitrary dates and returns a richer set of outputs, including working days and total weeks. Use the [Age Calculator](/age-calculator/) when you specifically need someone's age; use this tool for any other date interval.
Yes. Both fields accept any valid calendar date, past, present, or future. Setting both dates in the future is useful for planning ahead: finding how many working days remain before a deadline, a contract renewal, or a project milestone. The same formula applies regardless of whether the dates fall before or after today.
Also known as
days between datesdate gap calculatordate durationhow many days between