Days Between Two Dates Calculator
Calculating the exact number of days between two dates in MM/DD/YYYY format is a daily need: counting PTO eligibility, hitting an IRS filing deadline, tracking job tenure for benefits vesting, calculating contract terms, or knowing how many days until your due date. This calculator takes a start date and end date and returns total calendar days, US business days (Monday–Friday), weeks, months, and years. It handles leap years automatically and works for past or future dates — useful when the IRS, SSA, or your HR department asks for a precise day count. Note: this tool excludes only weekends, not the 11 US federal holidays observed by the Office of Personnel Management (OPM); subtract those manually if needed.
When to use this calculator
- You signed a contract and want to know how many days until the expiration date.
- You're planning a trip and need to know how many days you'll be away.
- You need to calculate job tenure or length of service.
- You want to know how long ago an important event occurred.
- You're a lawyer or accountant counting deadlines in business days.
Example: From 01/01/2026 to 04/14/2026
- From date: 01/01/2026.
- To date: 04/14/2026.
- Calendar days:
January (31) + February (28) + March (31) + 14 days of April= 103 days. - Weeks:
103 / 7= 14.7 weeks. - Months: 3 months and 13 days.
- US business days (excluding Saturdays/Sundays only): approximately 74 business days (subtract any of the 11 federal holidays in the range — e.g., MLK Day, Presidents' Day — if your deadline excludes them).
How it works
2 min readHow Days Between Dates Are Calculated
The simplest and most accurate method:
days = (end_date - start_date) / 86,400,000 msThe difference in milliseconds between the two dates (JavaScript uses Unix timestamps) is divided by the number of milliseconds in one day (86,400,000 = 1000 ms x 60 s x 60 min x 24 h).
Types of Day Counts
Calendar Days
Counts all days, including weekends and holidays. This is the most common count and the default.
Business Days
Counts only Monday through Friday, excluding Saturdays and Sundays (and optionally public holidays). Used for administrative deadlines, banking operations, legal filings, and commercial terms.
Calendar Days in Common Periods
| Period | Calendar Days |
|---|---|
| 1 week | 7 |
| 2 weeks (fortnight) | 14 |
| 1 month | 28 to 31 |
| 1 quarter | 90 to 92 |
| 1 semester | 181 to 184 |
| 1 year | 365 or 366 |
When Are Business Days Used?
Business days are standard for:
Leap Year Rules
A year is a leap year if:
1. It's divisible by 4, AND
2. It's NOT divisible by 100, UNLESS
3. It's also divisible by 400.
Examples: 2024 is a leap year (divisible by 4, not by 100). 1900 was NOT (divisible by 100, not by 400). 2000 WAS (divisible by 400).
This calculator handles all of these automatically.
Common Applications
Contract Deadlines
If a contract says '10 business days from April 1', the deadline is approximately April 15 (accounting for 2 weekends). Always check whether the contract specifies calendar or business days.
Job Tenure
The difference between your start date and today gives total days of employment. Convert to years and months for seniority calculations.
Pregnancy
40 weeks (280 days) from the first day of the last menstrual period gives the estimated due date.
Trip Planning
Calculate total nights for hotel bookings, meal counts, and packing.
Age Calculation
Total days from birth date to today, converted to years, months, and days.
Common Mistakes
1. Counting from day 0 vs day 1: if someone says '10 days from the 1st', is that the 10th or the 11th? Convention: counting starts from the next day, so the answer is the 11th.
2. Confusing calendar days with business days: legal and financial deadlines almost always specify which type.
3. Not excluding holidays in business day counts: this calculator only excludes weekends (Saturdays and Sundays). Manually subtract public holidays if your calculation requires them.
4. Ignoring leap years: if the period includes February 29, add 1 day to your manual count. This calculator handles it automatically.
5. Time zone issues: if dates are created in UTC and you're in a different time zone, there can be a 1-day difference at midnight boundaries.
Frequently asked questions
Does the calculator include the start date in the count?
No. It counts complete days between the two dates (the start date is not counted, the end date is). If both dates are the same, the result is 0. If you need an inclusive count (e.g., vacation days), add 1 to the result.
Do business days include public holidays?
Not currently. The calculator only excludes Saturdays and Sundays. If you need a precise count for legal or financial deadlines, manually subtract any public holidays that fall within the period.
How does it handle leap years?
Automatically. The millisecond difference between two dates respects the actual Gregorian calendar. If your period includes a February 29 (years 2024, 2028, 2032...), that day is counted.
What happens if the 'from' date is after the 'to' date?
The calculator returns the absolute value of the difference. Whether you enter dates in chronological order or reverse, you get the same positive number of days.
How many business days are in a typical month?
On average 21 to 23 business days per month (depending on how weekends fall). A month with 5 Saturdays and 5 Sundays has 21 business days; one with only 4 of each has 23. Subtracting public holidays (1-3 per month on average) brings the actual business days to 19-22.
How do I calculate legal deadlines in business days?
Legal deadlines typically exclude weekends and public holidays. Some jurisdictions also exclude court vacation periods. For important legal deadlines, verify with the specific court or administrative body, as rules vary by jurisdiction.
Does the calculator account for time zones?
It uses your browser's local time zone. For normal use (same time zone for both dates), this doesn't affect the result. If you need precise cross-timezone calculations (e.g., flight departures), account for time zone differences manually.
What are common uses for weeks between dates?
In pregnancy tracking (40 weeks of gestation), training programs (4-12 week blocks), project sprints (typically 2-week sprints), biweekly payments, and recurring task scheduling. Weeks = days / 7.