Days Between Two Dates Calculator
Calculate the exact number of days, business days, weeks, months, and years between any two dates. Handles leap years automatically. Free, instant.
- Data verified · June 2026
- Edited by Martín Rodríguez
- Formula verified by automated tests
- Private — runs on your device
See step-by-step calculation
See this calculation step by step
See period-by-period detail
How to use this calculator
Follow this tool’s steps, then review its formula, assumptions, and limits below.
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.
11 US Federal Holidays 2026 — subtract from business day counts (OPM)
| Holiday | 2026 Date | Day of week |
|---|---|---|
| New Year's Day | January 1 | Thursday |
| Martin Luther King Jr. Day | January 19 | Monday |
| Presidents' Day (Washington's Birthday) | February 16 | Monday |
| Memorial Day | May 25 | Monday |
| Juneteenth National Independence Day | June 19 | Friday |
| Independence Day | July 4 | Saturday (observed Jul 3, Fri) |
| Labor Day | September 7 | Monday |
| Columbus Day | October 12 | Monday |
| Veterans Day | November 11 | Wednesday |
| Thanksgiving Day | November 26 | Thursday |
| Christmas Day | December 25 | Friday |
Source: US Office of Personnel Management (OPM) — Federal Holidays 2026 (opm.gov). These 11 holidays are excluded from federal business-day counts. Private employers may follow a different holiday schedule.
How it works
How 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.
Example: From 01/01/2026 to 04/14/2026
January (31) + February (28) + March (31) + 14 days of April = 103 days.103 / 7 = 14.7 weeks.Frequently asked questions
Does the calculator include the start date in the count?
Do business days include public holidays?
How does it handle leap years?
What happens if the 'from' date is after the 'to' date?
How many business days are in a typical month?
How do I calculate legal deadlines in business days?
Does the calculator account for time zones?
What are common uses for weeks between dates?
Sources & references
Methodology & trust
Daily Life calculator with its formula verified automatically against US Office of Personnel Management (OPM) — Federal Holidays, per our editorial policy and methodology.
Updated: June 2026. Parameters are verified periodically against the cited sources.
Calculations run 100% in your browser. We do not store or transmit your data.
Indicative results. For critical decisions, consult a professional.
Rodríguez, M. (2026). Days Between Two Dates Calculator. Hacé Cuentas. https://hacecuentas.com/en/date-difference-calculator
Content licensed under CC-BY 4.0 — reuse it citing the source with a link to Hacé Cuentas.