Days Between Dates Calculator

Count days, weeks, business days, and months between two dates — or add/subtract days to find a future or past date.

Duration
164 days
Weeks23 weeks, 3 days
Y / M / D0y 5m 13d
Results update as you type

What this calculator does

This calculator returns the duration between two dates as total days, total weeks (and leftover days), business days (Mon–Fri only), and a year/month/day breakdown. A second mode adds or subtracts a number of days from any start date to find a target date.

Formula

days = (end − start) ÷ 86,400,000 ms

Business days: iterate from start to end, counting each Mon–Fri.

Add/Subtract: result = new Date(start.time + days × 86,400,000)

Variable definitions

  • startThe earlier date (or the base date in Add/Subtract mode).
  • endThe later date.
  • daysWhole number of days to add (positive) or subtract (negative).

Step-by-step calculation

  1. Take the difference in milliseconds between end and start dates.
  2. Divide by 86,400,000 (ms in a day) to get total days.
  3. If "Include end date" is on, add one day.
  4. For business days, walk from start to end and count Monday–Friday only.
  5. For the year/month/day breakdown, subtract day, then month, then year with borrowing.

Worked example

Start: January 10, 2026. End: June 22, 2026.

  • Total days: 163
  • Weeks: 163 ÷ 7 = 23 weeks, 2 days
  • Business days: 117 (skipping ~46 weekend days)
  • Breakdown: 5 months, 12 days

How to use this calculator

  1. Pick Days between or Add/Subtract mode.
  2. Enter the dates (and toggle Include end date if you want inclusive counting).
  3. Switch on Business days only to skip weekends.

Common mistakes

  • Inclusive vs exclusive: default counting excludes the end date. Toggle Include end date for inclusive intervals.
  • Approximating with 30-day months: always use calendar arithmetic for accuracy.

Frequently asked questions

How do I count days between two dates?

Subtract the earlier date from the later date in milliseconds and divide by 86,400,000. The calculator does this and also shows the count in weeks, months, and a year/month/day breakdown.

Are the start and end dates both counted?

By default the count excludes the end date (it's an exclusive interval). Toggle 'Include end date' to add one extra day.

How are months counted between two dates?

Whole calendar months from the start date are counted, with leftover days reported separately. January 10 → March 20 is 2 months and 10 days.

Does the calculator handle leap years?

Yes. Days in February are counted correctly in both leap and common years.

How many weeks are between two dates?

Divide the total days by 7. The calculator shows full weeks and leftover days.

How do I count only business days?

Switch on Business days. The calculator counts Mon–Fri only and skips Saturdays and Sundays.

How do I add or subtract days from a date?

Switch to Add/Subtract mode, enter a start date and the number of days, and the calculator returns the resulting date.

Related calculators

Last updated: June 22, 2026 · Checked against standard formulas and sample test cases. Business days exclude Saturday and Sunday only — federal or local holidays are not auto-excluded.