Days Between Dates Calculator

How many days between any two dates?

Calculate the exact number of days between any two dates with precision. Essential for project planning, vacation scheduling, contract deadlines, and personal milestones.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Time moves in discrete chunks, but measuring it precisely requires accounting for the irregularities humans built into our calendar system. A year isn't exactly 365 days — it's 365.24219 days, which is why we need leap years every four years (with exceptions every 100 and 400 years). This calculator handles all these complications automatically, giving you the exact count between any two dates.

The calculation works by converting both dates to milliseconds since January 1, 1970 (called Unix time), finding the difference, then converting back to days. This method ensures accuracy across centuries and automatically accounts for leap years, different month lengths, and timezone considerations.

Work day calculations require walking through each date individually to check if it falls on a weekend. This is why very large date ranges might take a moment to calculate — the system is literally counting every single day to determine which ones fall on weekdays versus weekends.

When To Use This
Right tool, right situation

Use this calculator for precise deadline planning, legal document dating, project scheduling, vacation planning, and personal milestone tracking. It's essential when exact day counts matter — like calculating interest periods, determining contract expiration dates, or planning events where timing is critical.

Avoid relying solely on this calculator for financial calculations that depend on business day conventions, which vary by industry and jurisdiction. Banking, securities trading, and international business often use modified business day rules that exclude holidays and may adjust weekend dates forward or backward.

The tool is perfect for personal use cases: counting down to vacations, calculating relationship anniversaries, determining age in days, or planning exercise routines. It's also valuable for students calculating study periods or professionals managing project timelines where every day counts toward success or failure.

Common Mistakes
Why results sometimes look wrong

The most common mistake is confusion about inclusive versus exclusive counting. If you're planning an event from Friday to Monday, most people think 'four days' but the actual span is three days (Friday-Saturday-Sunday-Monday has three overnight periods). Always clarify whether you need the span between dates or the count including both endpoints.

Another frequent error is forgetting about leap years when calculating future dates. February has 29 days every four years, which can shift important deadlines by a day. This becomes critical for legal contracts, financial calculations, or any commitment spanning multiple years.

Work day calculations often ignore company-specific holidays, which can reduce available working time by 8-12 days per year. The calculator shows Monday-Friday as work days, but your actual project timeline must account for holidays, vacation schedules, and company shutdowns that further reduce available working time.

The Math
Worked examples and deeper derivation

Date arithmetic involves converting calendar dates into a standardized numerical format, performing the calculation, then converting back. Modern computers store dates as the number of milliseconds since January 1, 1970, at midnight UTC. This system eliminates ambiguity about leap years, time zones, and calendar reforms.

To find days between dates: (End Date Milliseconds - Start Date Milliseconds) ÷ 86,400,000 milliseconds per day = Days. The absolute value ensures the result is always positive regardless of which date comes first. Rounding up with Math.ceil() ensures partial days count as full days.

Week calculations use modular arithmetic: Total Days ÷ 7 = Weeks (rounded down), with Total Days % 7 = Remaining Days. For work days, the calculator checks each date's day-of-week value (0=Sunday through 6=Saturday) and excludes 0 and 6 from the count.

Project Deadline Planning
Start date: March 1, 2024, End date: April 15, 2024
45 days total with 32 work days available. This gives you 6 weeks and 3 days to complete your project, accounting for weekends when most teams don't work.
Vacation Day Calculation
Start date: June 1, 2024, End date: June 14, 2024
13 days total with 10 work days needed. Your two-week vacation actually requires only 10 vacation days since weekends don't count against your PTO balance.
Age in Days Calculation
Start date: January 1, 1990, End date: January 1, 2024
12,418 days total, equivalent to exactly 34 years. This precise count includes 8 leap days that occurred during this period, showing how leap years accumulate over decades.
Expert Unlock
The thing most explanations skip

Professional schedulers know that date calculations become complex when crossing fiscal years, accounting periods, or international boundaries. Different countries observe different holidays, and some cultures use lunar calendars alongside the Gregorian system. Financial markets also have settlement periods that don't align with simple calendar math, requiring specialized business day calculations that account for market closures and currency-specific conventions.

How do I calculate days between dates accurately?

Does this calculator include both start and end dates?
The calculator counts the absolute difference between dates, treating them as points in time rather than full days. If you need to include both the start and end dates as full days, add 1 to the result.
How are leap years handled in the calculation?
Leap years are automatically accounted for in the calculation. February 29th is included when it occurs between your selected dates, ensuring accurate results across any date range.
Why might work days differ from business days?
Work days shown exclude only weekends (Saturday and Sunday). Business days would also exclude holidays, which vary by location and industry. Most companies have 8-12 holidays per year that would reduce the actual working days.

Need something this doesn't cover?

Suggest a tool — we'll build it →