Worked example: Date Calculator
Legacy January clamp. This fixed reference example shows one complete scenario; the interactive results above use your current inputs.
View the example inputs
- Calculate
- Add or subtract calendar units
- Starting date
- 2026-01-31
- Years to add (negative subtracts)
- 0 years
- Months to add
- 1 months
- Weeks to add
- 0 weeks
- Days to add
- 0 days
- Month-end rule
- Years first, then months
| Calculated quantity | Example result |
|---|---|
| Result date | 2026-02-28 |
| Calendar-day change | 28 days |
| Result/end weekday | Saturday |
| Elapsed days between dates | 28 days |
| Whole counted weeks | 4 weeks |
| Days after whole weeks | 0 days |
Date calculator: calendar dates, elapsed days and business-day planning
What can I calculate with the Date Calculator?
Use Add or subtract calendar units to move a starting date by signed years, months, weeks and days. Use Days between two dates to measure an interval with an explicit end-date inclusion rule. Use Add or subtract business days when weekends or entered holidays should not count toward an offset. These operations answer different questions.
The default example is January 31, 2026 plus one calendar month, giving February 28, 2026. Defaults are reproducible examples, rather than a live clock. Replace the starting date with today’s date in your browser’s date picker when asking “What date is 30 days from today?” A copied link preserves the dates and settings you entered.
A calendar day, a business day and a month are different units. Weeks contain seven calendar days in calendar mode; the business-day mode uses its own eligible-date counter. Choosing the correct mode is more important than matching a bare number from another date calculator.
How do I add or subtract days, weeks, months and years from a date?
Enter positive whole offsets to move forward and negative offsets to move backward. By default, the calendar calculation applies years first, then months, then seven days per week plus the day offset. Mixed signs are allowed. Starting on January 1, 2026, adding two weeks and subtracting one day gives January 14, 2026.
For pure day arithmetic, the offset is a count of whole calendar dates. January 1, 2026 plus 90 days is April 1, 2026. This does not exclude weekends or holidays. A request for 90 business days needs the business-day mode and a specified work calendar.
The working table shows the starting date, date after years, date after months and final date. Its order matters near leap days and month ends. The calendar-date change in the results is signed: a date before the start has a negative change, even though whole weeks and remaining-day counts describe the interval’s magnitude.
Why is adding one month different from adding 30 days?
Calendar months have different lengths. January 31, 2026 plus one month is February 28 under this calculator’s clamping rule. Adding 30 calendar days instead gives March 2, 2026. Neither calculation treats a month as a fixed 30-day duration.
Clamping replaces a missing day with the destination month’s final day. January 31 to February 28 loses the original day number 31, so subtracting one month from February 28 gives January 28. It is not a perfect inverse. Likewise, adding one month twice can differ from adding two months once, because the first step can shorten the day.
The default sequential year/month rule means: February 29, 2020 plus one year first becomes February 28, 2021, then one month becomes March 28, 2021. Selecting Combine years and months instead applies thirteen months from the original date and returns March 29. That difference reflects an arithmetic convention, not necessarily an invalid leap-year calculation.
How many days are between two dates? Should I include the end date?
The default difference includes the start date and excludes the end date, written [start, end). January 1 to January 31, 2026 therefore contains 30 counted dates. Selecting Include the end date counts both endpoints and produces 31. The same date gives zero by default and one when the end is included.
The counted-date total is divided into whole seven-day weeks and remaining days. The calendar span is a separate representation: it finds the largest direct clamped month anniversary within the counted duration, splits those months into years and months, then counts the remaining days. These representations should not be added together.
From January 31 to February 28, 2026, there are 28 elapsed days, or four weeks. The direct clamped calendar span is one month and zero days. Another calculator may favor the week representation or use a different month-end convention. Compare the exact day total and endpoint rule before treating the calendar wording as a mathematical discrepancy.
The end date must be on or after the start. This tool prompts you to swap reversed endpoints instead of silently reordering them. Including the end extends the counted duration by one date; the calendar graphic still identifies the actual selected endpoints.
How do I add business days without counting weekends?
In Return a counted workday mode, the original starting date is excluded. Move in the chosen direction and count only eligible dates until the requested number is reached. With Saturday/Sunday excluded and no holidays, Friday July 3, 2026 plus one business day is Monday July 6. Monday July 6 minus one business day is Friday July 3.
The alternative Return the interval boundary convention counts from the start for positive offsets and returns the next excluded calendar boundary. Friday July 3 plus one business day then returns Saturday July 4: the counted date is Friday, and the returned Saturday is excluded. This interval-style convention counts eligible dates before an excluded boundary; it does not present Saturday as a counted workday.
Backward offsets count from the result up to, but excluding, the original start under both options. A zero offset retains the start unchanged, including a weekend or holiday. Select the convention deliberately when comparing tools: a label such as “one business day after” does not by itself establish which endpoint was counted.
Choose Saturday/Sunday, Friday/Saturday or no weekend exclusions in the settings. A business day is an eligible date after those exclusions and any chosen holidays. This is a planning model, not a determination of a statutory deadline, leave entitlement, court filing rule or securities settlement date.
How do holidays and custom closures change a date calculation?
No national holidays are assumed by default. Enter a full date such as 2026-07-03 for a one-time closure, or 07-03 for a closure that repeats each year. Add an optional name after a comma, for example “2026-07-03, Office closed”. Each line represents one rule; up to 100 lines are supported.
Repeated dates count once even when multiple names or rules identify them. A holiday on a selected weekend is already excluded and is not subtracted again. The partition is counted calendar dates = weekend dates + other excluded holidays + business days. The holiday table identifies weekend overlaps so the counts can be checked.
An annual 02-29 closure occurs only in leap years. It is skipped in other years rather than shifted to March 1 or February 28. Full dated closures never repeat automatically. For an employer or region not represented by a preset, enter the actual closures relevant to your scenario.
The optional U.S. federal preset supports actual dates or standard Monday–Friday observed dates under the stated 2021–2100 rule set. Future years are projections of those rules, not promises that no schedule will change. It does not include one-off closures, Inauguration Day or every state, school, market and private-employer holiday.
Why can the actual holiday date differ from the observed day off?
An actual holiday date and an observed closure can be different. Independence Day in 2026 falls on Saturday July 4; the published standard federal schedule observes it on Friday July 3. For Monday–Friday date planning, excluding July 4 alone does not remove that Friday from the business-day count.
The reference tables below show actual and observed dates side by side for 2026 and 2027. The preset’s observed convention moves Saturday fixed holidays to Friday and Sunday fixed holidays to Monday. Floating weekday holidays already fall on their specified weekdays.
The observed preset retains that standard Monday–Friday federal convention even if you select another weekend pattern. It does not infer different in-lieu days for an alternative employee schedule. Select actual dates or enter the closures that actually apply when the preset does not fit.
How does the Date Calculator handle leap years and February 29?
Gregorian leap years are divisible by four, except century years that are not divisible by 400. Thus 1900 and 2100 are common years, while 2000 and 2400 are leap years. February has 29 days only in a leap year; impossible dates such as February 29, 1900 are rejected.
February 28 to March 1 spans one elapsed day in 1900 and two in 2000. A 400-year Gregorian cycle contains 97 leap years and 146097 days, so dividing an arbitrary day interval by 365 does not give an exact calendar-year decomposition.
The supported calendar is proleptic Gregorian: it extends the same mathematical rule throughout years 0001–9999. It does not reproduce every country’s historical adoption date, a Julian calendar or local calendar cutovers. Early years are parsed explicitly rather than being mistaken for 1901 or another twentieth-century date.
Are date-only days the same as elapsed hours across daylight-saving changes?
This Date Calculator works with calendar dates, not time-zone-aware instants. UTC date-only arithmetic keeps a local daylight-saving change from turning a whole-date difference into a fractional day. It does not convert a selected date to your local midnight or model a birth time, meeting time or clock transition.
Date-only equivalent hours multiply the counted dates by 24. That is a unit conversion of this calendar count, not proof that the real interval between local timestamps contained that many hours. Use the Time Zone Calculator when an actual instant and daylight-saving rule matter, or the Time Duration Calculator for its stated civil date/time model.
The browser may display its date controls in day/month/year or month/day/year order. Shared links, API values, tables and explicit result dates use YYYY-MM-DD, so 2026-07-03 unambiguously means July 3, 2026.
Why use a date calculator for schedules, projects and personal planning?
A date calculator makes the counting rule reproducible. It can help compare a calendar-day notice period with a business-day task estimate, check an anniversary under a stated month-end rule, measure a trip interval or plan an internal project milestone. Keep the start, end or offset, weekend pattern, holiday list and endpoint convention together.
For example, an internal task starting Thursday July 2, 2026 and taking one later eligible workday lands on Friday July 3 with weekend-only counting. Entering a July 3 office closure moves the same scenario to Monday July 6. Neither result establishes a legal due date; they apply different explicitly entered work calendars.
The calendar view outlines selected endpoints and marks listed closures. The step table explains calendar shifts. Month-by-month counts, or annual counts for longer ranges, reconcile the interval; day-by-day classification is available for complete intervals up to 366 dates. Table CSV downloads include all rows, and printing includes all rows of the selected breakdown.
Use Age for birth-date anniversaries and the next birthday; use this Date Calculator for the supported shifts and interval choices. A rule projection is only as suitable as the dates and assumptions supplied.
Date counting conventions at a glance
Business examples assume Saturday/Sunday weekends and no holidays. Different conventions can produce different dates without an arithmetic error.
| Question | Convention | Example |
|---|---|---|
| Default calendar shift | Years, then months with sequential clamping, then weeks × 7 plus days. | 2026-01-31 + 1 month = 2026-02-28. |
| Elapsed date difference | Start included; end excluded. | 2026-01-01 to 2026-01-31 = 30 dates. |
| Inclusive count | Both endpoints included. | The same January endpoints = 31 dates. |
| Return a counted workday | Exclude the original start; return the last counted eligible date. | Friday + 1 business day = Monday with weekend-only counting. |
| Forward interval boundary | Count from the start; exclude the returned boundary. | Friday + 1 business day = Saturday boundary; Friday was counted. |
| Holiday overlap | Weekend classification takes precedence; do not subtract twice. | An actual Saturday holiday is already an excluded weekend. |
| Default calendar shift | Years, then months with sequential clamping, then weeks × 7 plus days. | 2026-01-31 + 1 month = 2026-02-28. |
| Elapsed date difference | Start included; end excluded. | 2026-01-01 to 2026-01-31 = 30 dates. |
| Inclusive count | Both endpoints included. | The same January endpoints = 31 dates. |
| Return a counted workday | Exclude the original start; return the last counted eligible date. | Friday + 1 business day = Monday with weekend-only counting. |
| Forward interval boundary | Count from the start; exclude the returned boundary. | Friday + 1 business day = Saturday boundary; Friday was counted. |
| Holiday overlap | Weekend classification takes precedence; do not subtract twice. | An actual Saturday holiday is already an excluded weekend. |
Calendar month lengths and leap-year checks
Gregorian rule: divisible by 4, except centuries not divisible by 400. Common years have 365 days, leap years 366.
| Month | Common-year days | Leap-year days |
|---|---|---|
| January | 31 | 31 |
| February | 28 | 29 |
| March | 31 | 31 |
| April | 30 | 30 |
| May | 31 | 31 |
| June | 30 | 30 |
| July | 31 | 31 |
| August | 31 | 31 |
| September | 30 | 30 |
| October | 31 | 31 |
| November | 30 | 30 |
| December | 31 | 31 |
| January | 31 | 31 |
| February | 28 | 29 |
| March | 31 | 31 |
| April | 30 | 30 |
| May | 31 | 31 |
| June | 30 | 30 |
| July | 31 | 31 |
| August | 31 | 31 |
| September | 30 | 30 |
| October | 31 | 31 |
| November | 30 | 30 |
| December | 31 | 31 |
2026 U.S. federal holidays: actual and observed dates
Actual holiday dates alongside the standard Monday–Friday observed schedule. Checked against OPM’s published schedule; not a universal employer or local holiday calendar.
| Holiday | Actual date | Observed date | Observed weekday |
|---|---|---|---|
| New Year’s Day | 2026-01-01 | 2026-01-01 | Thursday |
| Martin Luther King Jr. Day | 2026-01-19 | 2026-01-19 | Monday |
| Washington’s Birthday | 2026-02-16 | 2026-02-16 | Monday |
| Memorial Day | 2026-05-25 | 2026-05-25 | Monday |
| Juneteenth | 2026-06-19 | 2026-06-19 | Friday |
| Independence Day | 2026-07-04 | 2026-07-03 | Friday |
| Labor Day | 2026-09-07 | 2026-09-07 | Monday |
| Columbus Day | 2026-10-12 | 2026-10-12 | Monday |
| Veterans Day | 2026-11-11 | 2026-11-11 | Wednesday |
| Thanksgiving | 2026-11-26 | 2026-11-26 | Thursday |
| Christmas | 2026-12-25 | 2026-12-25 | Friday |
| New Year’s Day | 2026-01-01 | 2026-01-01 | Thursday |
| Martin Luther King Jr. Day | 2026-01-19 | 2026-01-19 | Monday |
| Washington’s Birthday | 2026-02-16 | 2026-02-16 | Monday |
| Memorial Day | 2026-05-25 | 2026-05-25 | Monday |
| Juneteenth | 2026-06-19 | 2026-06-19 | Friday |
| Independence Day | 2026-07-04 | 2026-07-03 | Friday |
| Labor Day | 2026-09-07 | 2026-09-07 | Monday |
| Columbus Day | 2026-10-12 | 2026-10-12 | Monday |
| Veterans Day | 2026-11-11 | 2026-11-11 | Wednesday |
| Thanksgiving | 2026-11-26 | 2026-11-26 | Thursday |
| Christmas | 2026-12-25 | 2026-12-25 | Friday |
2027 U.S. federal holidays: actual and observed dates
Actual holiday dates alongside the standard Monday–Friday observed schedule. Checked against OPM’s published schedule; not a universal employer or local holiday calendar.
| Holiday | Actual date | Observed date | Observed weekday |
|---|---|---|---|
| New Year’s Day | 2027-01-01 | 2027-01-01 | Friday |
| Martin Luther King Jr. Day | 2027-01-18 | 2027-01-18 | Monday |
| Washington’s Birthday | 2027-02-15 | 2027-02-15 | Monday |
| Memorial Day | 2027-05-31 | 2027-05-31 | Monday |
| Juneteenth | 2027-06-19 | 2027-06-18 | Friday |
| Independence Day | 2027-07-04 | 2027-07-05 | Monday |
| Labor Day | 2027-09-06 | 2027-09-06 | Monday |
| Columbus Day | 2027-10-11 | 2027-10-11 | Monday |
| Veterans Day | 2027-11-11 | 2027-11-11 | Thursday |
| Thanksgiving | 2027-11-25 | 2027-11-25 | Thursday |
| Christmas | 2027-12-25 | 2027-12-24 | Friday |
| New Year’s Day | 2027-01-01 | 2027-01-01 | Friday |
| Martin Luther King Jr. Day | 2027-01-18 | 2027-01-18 | Monday |
| Washington’s Birthday | 2027-02-15 | 2027-02-15 | Monday |
| Memorial Day | 2027-05-31 | 2027-05-31 | Monday |
| Juneteenth | 2027-06-19 | 2027-06-18 | Friday |
| Independence Day | 2027-07-04 | 2027-07-05 | Monday |
| Labor Day | 2027-09-06 | 2027-09-06 | Monday |
| Columbus Day | 2027-10-11 | 2027-10-11 | Monday |
| Veterans Day | 2027-11-11 | 2027-11-11 | Thursday |
| Thanksgiving | 2027-11-25 | 2027-11-25 | Thursday |
| Christmas | 2027-12-25 | 2027-12-24 | Friday |
Formula and calculation method
Dates use the proleptic Gregorian calendar and UTC date-only arithmetic; local daylight-saving shifts and historical country-specific calendar cutovers are not applied. Input/output dates use YYYY-MM-DD.
By default, calendar shifts apply signed years first, then signed months with clamping at each step, then seven days per week plus signed days. The optional combined rule applies 12×years + months from the original date and clamps once. The default example is 2026-01-31 + one month = 2026-02-28.
Difference defaults to [start,end): the start is counted and the end is excluded. Including the end counts both. Calendar components use the largest direct clamped month anniversary within the counted interval, then remaining days. A calendar month is not a fixed number of days.
Business workday mode excludes the original start and returns the last eligible date. Forward boundary mode counts from the start and returns the excluded next calendar boundary. Backward offsets count [result,start). Zero offsets retain the start.
Business days = counted calendar dates − excluded weekends − non-weekend holidays. Duplicate holiday dates and weekend/holiday overlaps are not subtracted twice. Custom recurring February 29 occurs only in leap years.
The optional U.S. federal preset models the listed current rules for 2021–2100. Actual holiday dates differ from standard Monday–Friday observed dates. It excludes special one-off closures, Inauguration Day, local/private calendars and legal deadline rules.
Scope and Limitations
- Supported dates/results: 0001–9999. Calendar offsets retain ±200 years, ±2400 months and ±100000 days, plus ±10000 weeks. Business offsets support ±10000 eligible dates. Inputs, intermediate dates and output must stay within the supported range.
- U.S. preset calculations are limited to 2021–2100; future dates are rule projections. Recurring-holiday difference intervals support at most 200 calendar years. Up to 100 custom holiday lines are supported.
- Calendar components are convention-dependent near month ends. Date-only hours are counted days times 24, not real elapsed timestamps across time-zone/DST changes. This does not determine a statutory deadline, employer leave entitlement or market settlement date.
Reference Sources
- US Naval Observatory: Gregorian leap-year rule
- OPM: U.S. federal holiday schedules and observed dates
Frequently asked questions
What date will it be a number of days or weeks from today?
Choose calendar mode, enter today’s date and use signed whole offsets. Each week is seven calendar days. Defaults are fixed examples; shared links preserve entered dates.
Does the date difference include the end date?
By default it includes the start and excludes the end. Include the end date adds one counted date. The same date therefore gives zero by default and one when inclusion is selected.
Why does adding one month to January 31 give February 28?
The destination February has no day 31, so the calculator clamps to its last day. A month is not a fixed thirty-day duration, and reversing a clamped shift cannot recover the original day automatically.
Why can a business-day result fall on a weekend?
Return a counted workday mode returns an eligible date for a nonzero offset. Return the interval boundary can instead return a weekend because that returned boundary is excluded from the forward count. Zero offsets leave the starting date unchanged.
Are public holidays excluded automatically?
No. Choose an optional U.S. preset or enter custom dates and closures. Weekend and holiday overlaps are subtracted once. The preset does not establish every local, employer or legal deadline rule.
Can I enter recurring holidays or a different weekend?
Yes. Enter MM-DD for an annual closure or YYYY-MM-DD for a one-time date, optionally followed by a comma and name. Weekend options are Saturday/Sunday, Friday/Saturday or none. Recurring February 29 is skipped in non-leap years.
Are historical dates and leap years supported?
Dates from 0001–9999 use the proleptic Gregorian rule: divisible by four, except centuries not divisible by 400. Historical country-specific calendar cutovers and Julian-calendar dates are not reconstructed.
Do date-only hours account for daylight saving time?
No. They convert counted calendar dates at 24 hours per day. Real elapsed time between local timestamps needs a timezone-aware interpretation.