WebzTools
Menu

Date Calculator

Find the number of days between two dates, count working days with your own weekend and holiday rules, or add and subtract calendar units from a date. Results update as you type, and reversed dates are explained instead of being shown as an unexplained negative number.

The calculation uses calendar dates only, not local timestamps. That keeps the answer stable across time zones and daylight saving changes. Month and year arithmetic clamps to the final valid day when a target month is shorter, so 31 January 2025 plus one month is 28 February 2025.

Runs in your browser. Date Calculator processes your input on your own device. Nothing you enter or upload is sent to a server.

Did this tool help you? ☕

WebzTools is free to use. If this tool saved you some time, you can support the project with a coffee and help us keep improving the tools.

Buy Me a Coffee (opens in a new tab)

How to use the Date Calculator

  1. Choose Days Between Dates or Add or Subtract Dates.
  2. For a difference, enter the start and end dates. The ordinary count excludes the earlier date and includes the later date. Switch on Include both dates when both endpoints should count.
  3. Switch to business days when you need working dates only. Choose a Saturday and Sunday weekend, a Friday and Saturday weekend, or your own non-working weekdays.
  4. Add optional holidays as ISO dates, one YYYY-MM-DD date per line. Public holidays are not included automatically.
  5. For date arithmetic, choose Add or Subtract and enter nonnegative whole numbers. Calendar mode applies years, months, weeks and days in that order; business-day mode uses one business-day count instead.
  6. Use Today, Swap Dates, Copy Result or Reset as needed. Reset uses today's browser-local calendar date and restores the default seven-day example.

Supported formats: Dates use YYYY-MM-DD and must fall from 1900-01-01 through 2100-12-31. Calendar and business-day amounts are nonnegative whole numbers. Business-day offsets are limited to 10000, and up to 100 distinct holiday dates may be supplied.

How the Date Calculator works

Days Between Dates compares two complete Gregorian calendar dates. Add or Subtract Dates starts with one date and applies the units you enter. Both workflows use the same date-only engine, weekend choice and optional holiday list.

All calculations run in your browser. The dates and holidays you enter are not sent to a server.

How to calculate days between two dates

The ordinary difference measures elapsed calendar days: it excludes the earlier date and includes the later one. From 1 October to 8 October is therefore 7 days. If the entered end date is earlier, the calculator uses chronological order for the magnitude and states the direction separately.

Ordinary difference

Input

1 October 2026 to 8 October 2026

Output

7 elapsed days, or 1 week and 0 remaining days

Year boundary

Input

31 December 2023 to 1 January 2024

Output

1 elapsed day

Counting both start and end dates

Include both dates changes an endpoint count, not the distance between the dates. It adds the earlier endpoint to the dates considered. The same date counts as 0 elapsed days ordinarily and as 1 calendar date when inclusive counting is on.

Inclusive count

Input

1 October 2026 through 8 October 2026, including both dates

Output

8 counted calendar dates

Calendar years, months and remaining days

The calendar breakdown starts at the earlier date, advances by the greatest number of full calendar years without passing the later date, then does the same for full months, then counts the remaining days. Each year or month step clamps to the last valid day when needed. Applying the displayed units sequentially reconstructs the later date.

This is calendar arithmetic, not a conversion based on an average month length. Inclusive counting affects the counted-day total but not this elapsed calendar breakdown.

How to add or subtract days, weeks, months and years

Calendar mode applies years first, then months, then weeks, then days. Each step uses the result of the previous one. Subtract uses the same order with each amount moving backward.

Two months added in one operation can differ from adding one month twice. From 31 January 2025, adding two months gives 31 March; adding one month gives 28 February, and adding another month to that result gives 28 March.

What happens at the end of a month

When the target month does not contain the starting day number, the result is clamped to that month's final day. This rule applies to year and month additions and to the calendar years, months and days breakdown.

Ordinary February

Input

31 January 2025 plus 1 month

Output

28 February 2025

Leap-year February

Input

31 January 2024 plus 1 month

Output

29 February 2024

Leap day plus one year

Input

29 February 2024 plus 1 year

Output

28 February 2025

Subtract a month

Input

31 March 2025 minus 1 month

Output

28 February 2025

How to calculate business days

By default, business-day differences exclude the earlier date, include the later date and count only working days. Include both dates makes either endpoint count only when it is a working day. A holiday on an excluded weekend is not removed twice.

For an offset, zero business days returns the starting date. A positive amount begins with the next or previous calendar date and stops after that many working, non-holiday dates.

Skip a weekend

Input

Friday 23 October 2026 plus 1 business day, Saturday and Sunday weekend

Output

Monday 26 October 2026

Skip a holiday

Input

The same calculation with 26 October listed as a holiday

Output

Tuesday 27 October 2026

Saturday and Sunday versus Friday and Saturday weekends

A working week is not universal. The default excludes Saturday and Sunday, while the second preset excludes Friday and Saturday. Custom lets you mark any weekdays as non-working, but at least one weekday must remain available for work.

Friday and Saturday weekend

Input

Thursday 22 October 2026 plus 1 business day

Output

Sunday 25 October 2026

How to exclude your own holidays

Enter one date per line in YYYY-MM-DD format. Duplicate dates are removed, dates outside the interval do not affect a difference, and an invalid line blocks the result until it is corrected.

Public holidays are not included automatically. Add the dates you want to exclude. This tool does not look up national calendars and is not an official bank-holiday, payroll or legal-deadline calculator.

Leap years and date calculation

A Gregorian leap year is divisible by 4, except century years must also be divisible by 400. The year 2000 was a leap year; 1900 and 2100 were not. That is why 28 February to 1 March spans 2 days in 2024 but 1 day in 2025.

Verified date-calculation examples
CalculationResult
28 February 2024 to 1 March 20242 elapsed days
28 February 2025 to 1 March 20251 elapsed day
1 October 2026 through 8 October 2026, inclusive8 counted dates
31 January 2024 plus 1 month29 February 2024
23 October 2026 plus 1 business day26 October 2026 with a Saturday and Sunday weekend

Why daylight saving time does not change the answer

A local day can contain 23 or 25 hours when clocks change. Dividing timestamp milliseconds by 24 hours can therefore miscount calendar dates. This calculator converts validated year, month and day components to integer civil-day ordinals, so the same dates give the same answer in every time zone.

Things worth knowing

  • Supported dates run from 1900-01-01 through 2100-12-31. A calculation that would leave that range is rejected.
  • Business-day offsets are limited to 10000, and the holiday list accepts up to 100 distinct valid dates.
  • Public holidays are not included automatically. Weekend rules and holidays differ by place and organization, so enter the rules that apply to you.
  • The result is general calendar arithmetic, not an authoritative legal, payroll, banking, tax or employer deadline.
  • Calendar units are applied years, months, weeks and days in that order. Repeating a clamped month operation can produce a different date from adding several months at once.

Frequently asked questions

How many days are between two dates?

Enter both dates in Days Between Dates. The ordinary result excludes the earlier date and includes the later date. Turn on Include both dates when both endpoints should count.

Does the Date Calculator count the start date?

Not by default. The ordinary difference excludes the chronological earlier date. Include both dates adds it; in business mode it counts only if it is a working day and not a supplied holiday.

What if the end date is before the start date?

The calculator shows the nonnegative magnitude using chronological order and separately says that the entered end date is earlier. It does not show an unexplained negative number.

How are months added to dates such as January 31?

The day is clamped to the final valid day of the target month. For example, 31 January 2025 plus one month is 28 February 2025, while the same calculation in leap year 2024 is 29 February.

Which days count as business days?

Any weekday not marked as non-working and not present in your holiday list. Choose Saturday and Sunday, Friday and Saturday, or a custom set of non-working weekdays.

Are public holidays included automatically?

No. Public holidays are not included automatically. Add the dates you want to exclude, one YYYY-MM-DD date per line. No national holiday calendar is downloaded or inferred.

Does daylight saving time affect the result?

No. The engine works with validated calendar components and integer day ordinals, not elapsed local-time milliseconds, so daylight saving transitions do not change a date-only answer.

Are my dates or holidays uploaded?

No. All calculations run locally in your browser, and the dates and holidays you enter are not sent to a server.

Browse all utilities