Gregorian Date & Duration Suite

Date Difference Calculator – Days Between Two Dates

Calculate exact elapsed days and calendar duration between dates, count days until or since milestones, tally business days with custom weekends, and add or subtract calendar offsets.

Need time-of-day math, hours, or international clock comparisons? Try our Time Calculator or Time Zone Converter.

Date Difference Calculator

Calculate calendar elapsed days, years, months, and full weeks between two dates.

Format: YYYY-MM-DD (1600-01-01 to 9999-12-31)

Format: YYYY-MM-DD (1600-01-01 to 9999-12-31)

How to Use This Date Difference Calculator

This tool provides five specialized calendar arithmetic modes to answer different scheduling, project management, and life planning questions. All calculations run client-side using deterministic Gregorian Rata Die ordinals from 1600-01-01 to 9999-12-31 without server round-trips:

Date Difference

Find the exact calendar days, full weeks, and anniversary years/months/days between any two dates with optional endpoint-inclusive counting.

Days Until

Check the number of calendar days remaining until an upcoming deadline, anniversary, holiday, or personal goal relative to your local Today.

Days Since

Count how many calendar days have elapsed since a historical event, birthdate, project launch, or habit milestone.

Business Days

Tally working days between dates excluding weekends. Supports standard Sat/Sun, Fri/Sat, Sun-only, or fully customized non-working days.

Add / Subtract Dates

Shift a starting date forward or backward by years, months, weeks, and days with strict month-end clamping and weekday detection.

How to Calculate Days Between Dates (Elapsed vs. Inclusive)

When measuring time between two dates, it is critical to determine whether the count represents elapsed calendar day transitions or endpoint-inclusive calendar dates:

Standard Elapsed Count

June 1, 2026 to June 15, 2026 = 14 Days

This represents the exact mathematical difference (day 15 − day 1 = 14 days). It answers: “How many 24-hour day transitions occur between these two dates?”

Endpoint-Inclusive Count

June 1, 2026 through June 15, 2026 = 15 Dates

When you include both the start date and the end date (for hotel reservations, rental periods, or attendance logs), the total is 14 elapsed days + 1 = 15 distinct calendar dates.

Calculating Years, Months, and Days (Handling Variable Month Lengths)

Gregorian months vary between 28, 29, 30, and 31 days. Because of this irregularity, dividing total days by 30 or 30.4375 produces rounding distortions. This calculator instead uses the calendar-anniversary convention with month-end clamping:

Example: January 31, 2024 to March 1, 2024

Between January 31, 2024 and March 1, 2024, there are 30 elapsed calendar days. Adding 1 whole calendar month to January 31 in the leap year 2024 lands on February 29 (clamped to February's last valid day). Advancing 1 additional day reaches March 1. The result is expressed as 1 month and 1 day (30 elapsed days).

This convention ensures that anniversary dates align with human calendar intuition rather than artificial 30-day assumptions.

Days Until and Days Since (Visitor-Local Today & Calendar Counts)

The Days Until and Days Since modes compute the number of calendar days between your current local date and an event date:

  • Browser-Local Today: The reference date is initialized from your device's local midnight rather than UTC, ensuring you never see yesterday or tomorrow when opening the tool late in the evening.
  • Calendar Days, Not Seconds: These tools calculate whole calendar-day boundaries. For instance, tomorrow is always 1 calendar day away regardless of the current hour.
  • Automatic Midnight Refresh: If you leave the page open across local midnight, the reference date automatically updates and prompts you to recalculate stale figures.
  • Same-Date Events: Selecting today's date displays 0 calendar days remaining or elapsed.

Counting Business Days and Working Days (Custom Weekend Configurations)

Workplace timelines, payroll cycles, and contractual delivery terms often require counting only working days while excluding weekends. The Business Days mode features an $O(1)$ constant-time algorithm supporting:

Weekend Presets

Choose standard Saturday & Sunday off, Friday & Saturday off (standard in parts of the Middle East), Sunday only off, or configure custom non-working days.

Public Holiday Notice

National, religious, and company holidays vary dramatically by country, state, and organization. Therefore, public bank holidays are not automatically removed and should be deducted manually as needed.

For example, Monday November 2, 2026 through Friday November 6, 2026 has 4 elapsed business days when excluding the starting day, or 5 inclusive business days when counting both start and end days.

Adding and Subtracting Calendar Dates (Strict Month-End Clamping)

When adding or subtracting offsets (years, months, weeks, days), our engine applies a predictable, mathematically ordered sequence:

  1. Combined Calendar-Month Shift: Years and months are combined (years × 12 + months) and evaluated first. The original day is clamped to the destination month's length if the target month is shorter.
  2. Fixed-Day Shift: Weeks and days are combined (weeks × 7 + days) and applied to the intermediate date by exact day ordinals.

Why Clamped Month Addition Is Not Reversible:

Adding 1 month to January 31, 2025 lands on February 28, 2025 because February has only 28 days. Subtracting 1 month from February 28 lands on January 28, not January 31. Because different dates map to the same clamped month end, calendar-month math is inherently non-reversible after clamping.

Frequently Asked Questions

How do I calculate the number of days between two dates?▾

Select the “Date Difference” tab, enter your Start Date and End Date in YYYY-MM-DD format (or use the date picker), and click “Calculate Difference”. The tool displays total elapsed calendar days, full weeks, and a breakdown in years, months, and days.

Does the calculator include the start and end dates?▾

By default, the tool calculates elapsed days (excluding the starting day boundary, equivalent to end date − start date). Check “Include both start and end dates in calculation” to include both boundary dates (elapsed days + 1).

How do I calculate years, months and days between dates?▾

The Date Difference mode automatically evaluates whole calendar years and whole calendar months using the calendar-anniversary convention with month-end clamping, counting the remaining exact days from that anchor date to the end date.

How can I calculate days until an upcoming event?▾

Switch to the “Days Until” tab, enter your target event date, and optionally enter an event title. The tool measures the remaining calendar days between your browser's local Today and the target date.

How do I find out how many days have passed since a date?▾

Switch to the “Days Since” tab, enter the historical date or milestone, and click “Calculate Days Since”. It displays the exact number of calendar days, weeks, and duration that have passed since that date.

Can I calculate business days without weekends?▾

Yes. The “Business Days” mode counts only working days between your dates. You can select Saturday/Sunday, Friday/Saturday, Sunday-only, or select custom weekdays to accommodate unique work shifts.

Are public holidays excluded from business days?▾

No. Statutory and public holidays vary significantly by country, region, and industry, so they are not automatically excluded. You can deduct your region's specific holidays from the calculated working days total.

What happens when I add one month to January 31?▾

In the “Add / Subtract Dates” mode, adding 1 month to January 31 advances to February. Because February does not have 31 days, the day is clamped to February's final valid day: February 29 in a leap year, or February 28 in a common year.

Does daylight saving time affect calendar-day calculations?▾

No. Date calculations operate strictly on calendar-day ordinals in the Gregorian calendar, completely independent of 23-hour or 25-hour daylight saving clock shifts. For hourly time conversions with DST, use our Time Zone Converter.