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.
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
start— The earlier date (or the base date in Add/Subtract mode).end— The later date.days— Whole number of days to add (positive) or subtract (negative).
Step-by-step calculation
- Take the difference in milliseconds between end and start dates.
- Divide by 86,400,000 (ms in a day) to get total days.
- If "Include end date" is on, add one day.
- For business days, walk from start to end and count Monday–Friday only.
- 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
- Pick Days between or Add/Subtract mode.
- Enter the dates (and toggle Include end date if you want inclusive counting).
- 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
- Age CalculatorExact age in years, months and days.
- Time Duration CalculatorElapsed time between two date-times.
- Hours CalculatorWork hours between start and end, minus breaks.
- Chronological Age CalculatorRecords-style age between birth and reference date.
- Tip CalculatorCalculate gratuity, total, and per-person share.
- Standard Deviation CalculatorMean, variance, and standard deviation with steps.