Skip to content
Utility

Date Difference Calculator

Calculate the exact number of days, weeks, months, and years between two dates including business days.

Difference

0y 0mo 0d

Pick two dates above.

Total days

0

Total weeks

0

Total months

0

Hours

0

Minutes

0

Business days

0

Method

How this calculator works

The difference between two dates is the elapsed time between them. We display it as a calendar breakdown plus several total-unit views.

difference = endDate − startDate

# Calendar breakdown
years   = end.year - start.year
months  = end.month - start.month
days    = end.day - start.day
# borrow if days/months are negative

# Totals derive from the millisecond difference
totalDays    = floor(|ms| / 86,400,000)
totalWeeks   = floor(totalDays / 7)
totalHours   = floor(|ms| / 3,600,000)
totalMinutes = floor(|ms| / 60,000)
  1. Pick a start date and an end date — either order, the calculator shows the absolute gap.
  2. It computes the raw millisecond difference and divides by the right constants to produce days, weeks, hours, and minutes.
  3. A separate calendar arithmetic pass produces the human-friendly Y/M/D breakdown.
  4. Business days are counted by stepping through each day and skipping Saturdays and Sundays.

Examples

Worked examples

Real numbers, end-to-end results.

Jan 1, 2025 → Jun 5, 2026

1 yr, 5 mo, 4 days · 521 days · 372 business days

Total months: 17.

Mar 12, 2000 → Jun 5, 2026

26 yrs, 2 mo, 24 days · 9,581 days

About 1,369 weeks.

Use cases

When to use it

  • Plan project timelines — how many business days are left until launch?
  • Calculate the precise age of a relationship, anniversary, or pet.
  • Verify employment-tenure milestones (e.g. five-year vesting cliffs).
  • Schedule reminders for events that are exactly N days, weeks, or months away.

FAQ

Frequently asked questions

How is the difference calculated?
We compute the millisecond difference between the two dates and convert it to days, weeks, hours, and minutes. The calendar Y/M/D breakdown uses the standard borrow-from-previous-month algorithm.
Does it account for leap years and DST?
Yes. JavaScript’s Date object respects both, so totals reflect actual elapsed time. The Y/M/D breakdown handles February 29 correctly.
What counts as a "business day"?
Monday through Friday. Public holidays are not removed — that varies by country, so a generic calculator can’t handle every region’s holiday calendar accurately.
Why does swapping dates not change anything?
The calculator always shows the absolute difference between the two dates. Whether June is "before" or "after" December, the gap is six months either way.
Methodology, assumptions & limitations

How we calculate: This calculator uses standard, peer-reviewed mathematical formulas implemented in TypeScript. All calculations run entirely in your browser — no data is sent to any server.

Assumptions: Unless stated otherwise, calculations assume constant rates over the specified period, no taxes or fees beyond those explicitly input, and standard compounding conventions for the formula type.

Limitations: Results are estimates for planning purposes. Real-world outcomes may differ due to variable rates, regulatory changes, taxes, fees, inflation, or other factors not modeled. This tool does not constitute professional advice.

When NOT to use this: Do not rely solely on this calculator for critical decisions where exact precision is required beyond the decimal places shown.

Feedback: Found an error or have a suggestion? Contact us — we review and correct reported issues within 48 hours.

Deep Dive Guide

How to Calculate Days Between Two Dates (and Why It's Harder Than You Think)

The math behind date difference calculation. Covers calendar arithmetic, business days, leap years, and when you'd actually need an exact date gap.

Read Full Guide

Related calculators

All Utility →