Date Calculator

Days between two dates, or add/subtract days, weeks, months, years from a starting date.

Calculator Numbers & Math Updated Apr 19, 2026
How to Use
  1. Choose a mode: 'Difference between dates' or 'Add duration to a date'.
  2. For Difference: enter the start and end dates. The calculator returns total days, weeks, business days, and a years/months/days breakdown.
  3. For Add: enter a start date and the duration (days, weeks, months, years). Toggle "Subtract instead" to go backward.
  4. The result is calendar-aware — months are not all 30 days, and leap years are accounted for.
  5. Day-of-week is shown for both input and output dates.
  6. Everything updates live as you type.
Mode
Result

How It Calculates

Total days
⌊(end − start) / 86400000⌋
Millisecond difference / day length.
Y / M / D breakdown
Calendar borrow
Cascades through month and year boundaries.
Business days
Mon–Fri only
Excludes weekends; not holidays.
Weeks
Total days / 7
As a decimal.
Add duration
Y → M → D in that order
Months clamp to last valid day.
Day of week
Date.getDay()
0 = Sun, 6 = Sat.

A Brief History of the Modern Calendar

The Gregorian calendar — the one we use today — was introduced by Pope Gregory XIII in 1582 to fix small errors that had accumulated in the older Julian calendar over 1,600 years. The new rules: the year averages 365.2425 days (vs 365.25 for Julian), achieved by removing three leap days every 400 years (skipping leap years on century boundaries unless divisible by 400). To realign with the seasons, Catholic countries skipped 10 days in October 1582. Britain and its American colonies didn't adopt the Gregorian calendar until 1752, by which point they had to skip 11 days. Russia held out until 1918, dropping 13 days; that's why the "October Revolution" actually happened in November on the Gregorian calendar.

The week of seven days is far older — appearing independently in ancient Babylonian, Hebrew, and Roman traditions. The day-of-the-week algorithm (Zeller's congruence, 1882) gives the day for any Gregorian date in constant time without needing a calendar lookup. The "five-day work week" with weekends off is mostly a 20th-century innovation that spread alongside industrial labor reform; before then, Saturday was typically a half-day.

Today's date arithmetic is mostly a matter of defining what "month" and "year" mean when applied to specific dates — the answers vary by domain and convention. The math underneath is fixed (Gregorian rules, 7-day weeks, leap-year rules); the conventions on top of it (business days, holidays, fiscal years) are where most of the real-world complexity lives.

About This Calculator

This calculator handles the two most common date-arithmetic operations: difference between two dates and adding a duration to a date. Both modes use Gregorian calendar rules with proper leap-year handling. Business-day counts include Monday through Friday only, and do not subtract holidays — for holiday-aware counting, layer your jurisdiction's calendar on top of the result.

Everything runs entirely in your browser; no dates are transmitted or stored. Date inputs use your browser's native date picker, which respects your locale's date display conventions. The internal calculation is always done in absolute milliseconds since epoch, then converted to the calendar-aware breakdowns the human display needs.

Frequently Asked Questions

How do you count days between two dates — including or excluding the endpoints?

This calculator returns the difference (end − start), so the start date isn't counted. April 1 to April 5 is 4 days. If you need 'days inclusive of both endpoints' (e.g., for billing or rental period counts), add one. Different industries use different conventions, so always verify against the rule in your domain.

What are 'business days' and how are they counted?

Business days exclude Saturday and Sunday. The calculator counts Monday–Friday days in the interval. It does <em>not</em> account for federal holidays, regional holidays, or company-specific closures — those vary too widely to handle generically. For payroll or strict legal deadlines, verify against the relevant holiday calendar.

How does adding months handle different month lengths?

JavaScript's Date object uses a sensible convention: January 31 + 1 month = February 28 (or 29 in a leap year), then March 28 if you add another month. The calculator clamps to the last day of the target month rather than rolling forward. This is the most common interpretation but not the only one — some accounting systems prefer to roll over to the next month.

Why is February 29 special?

Leap day. The Gregorian calendar adds it to February in years divisible by 4, except century years not divisible by 400. So 2000 had a leap day, 1900 did not, 2024 did. Births on February 29 ("leaplings") historically observed birthdays on either February 28 or March 1 in non-leap years; legal age crossings typically default to March 1.

Can I calculate dates before 1970 or after 2100?

Yes — JavaScript's Date object supports any year from −271,821 to +275,760. The Gregorian calendar rules apply consistently. Historical date calculations before 1582 (when the Gregorian calendar was introduced) are technically wrong relative to whatever calendar was actually in use; they're only meaningful for projecting modern conventions backward.

What's the difference between this and the Age Calculator?

Age Calculator focuses on the human-readable years/months/days breakdown from a birth date to today (or any reference date). Date Calculator is more general — any two dates, with options to add/subtract durations and break out business days. There's overlap in 'difference' mode; pick whichever fits your task.

Common Use Cases

Project deadlines

Find the date that's 90 calendar days or 60 business days from a kickoff date.

Lease and contract terms

Compute the end date of a 24-month lease starting on a specific day, accounting for month-length variation.

Anniversary planning

Find what day of the week your 25th anniversary falls on five years from now.

Insurance policy periods

Calculate the exact number of days a policy was in force for prorated billing.

Travel itineraries

Compute the return date of a 14-day trip starting on a specific departure date.

Historical research

Find how many days separate two historical events, or what the day of the week was for a specific date in the past.

Last updated: