Total days:
Table of Contents
* Total number of days includes both the start and end dates.
How the day count is calculated
The calculator converts both dates to Unix timestamps (seconds elapsed since 00:00:00 UTC on 1 January 1970), subtracts the start from the finish, and divides by the number of seconds in a day:
Days = (Tfinish − Tstart) ÷ 86,400
- Tstart — Unix timestamp of the start date at 00:00:00.
- Tfinish — Unix timestamp of the finish date at 00:00:00.
- 86,400 — seconds in a day (60 × 60 × 24).
The calculator then adds 1 to make the count inclusive of both endpoints. If the "Only count week days" box is ticked, it iterates day-by-day and discards any date that falls on a Saturday or Sunday.
Worked example using the calculator's default values (start = one month ago, finish = today):
- Start: 2026-05-02 → Tstart = 1777680000
- Finish: 2026-06-02 → Tfinish = 1780358400
- Difference in seconds: 2678400
- Days = difference ÷ 86,400 = 31, plus 1 inclusive endpoint = 32 days
That's the number returned in the "Total days" box above for the default range.
Calendar days vs week days vs business days
These three counts are often used interchangeably but produce different totals over the same range. The differences matter for contracts, payroll, and shipping estimates.
| Day type | Includes | Excludes | Days per year (typical, US) |
|---|---|---|---|
| Calendar days | Every day of the week | Nothing | 365 (366 in a leap year) |
| Week days | Monday to Friday | Saturday, Sunday | 260–262 |
| Business days | Monday to Friday | Weekends + public holidays | ~251 (US, after 11 federal holidays) |
This calculator returns calendar days by default, and week days when the checkbox is ticked. For a strict business-day count, subtract the public holidays in your jurisdiction:
| US federal holiday | Date |
|---|---|
| New Year's Day | 1 January |
| Martin Luther King Jr. Day | 3rd Monday in January |
| Presidents' Day | 3rd Monday in February |
| Memorial Day | Last Monday in May |
| Juneteenth | 19 June |
| Independence Day | 4 July |
| Labor Day | 1st Monday in September |
| Columbus Day | 2nd Monday in October |
| Veterans Day | 11 November |
| Thanksgiving Day | 4th Thursday in November |
| Christmas Day | 25 December |
When a federal holiday falls on a Saturday it is typically observed on the preceding Friday; on a Sunday, the following Monday. The Federal Reserve and most US employers follow this rule.
Inclusive vs exclusive counting
The single most common source of off-by-one errors with date arithmetic is whether the endpoints are counted. The answer depends on the context:
- Inclusive (this calculator's default). Both the start and end dates are counted. Monday to Wednesday = 3 days. Standard for deadlines, notice periods, hotel-night stays counted as nights-plus-one, and most legal contracts.
- Exclusive. Only the elapsed gap is counted. Monday to Wednesday = 2 days. Standard for billing periods stated as "net 30", age calculations, and pure elapsed-time questions.
- Half-open ([start, end)). Includes the start, excludes the end. Common in programming when iterating across date ranges; produces the same total as exclusive counting.
If your context requires the exclusive count, subtract 1 from the result. If you need half-open, the calculator's pre-inclusive-adjustment value already gives you that — subtract 1 from the displayed total.
Limitations and edge cases
- Daylight saving time. In the US, "spring forward" produces a 23-hour day and "fall back" a 25-hour day. The day-level arithmetic above is unaffected because it operates on calendar dates rather than absolute durations — but if you need exact elapsed hours across a DST transition, use the hours calculator.
- Leap years. The calculator handles 29 February correctly because it uses real timestamps. A range crossing 29 February in a leap year contains one extra day compared to the same calendar range in a non-leap year.
- Time zones. Both dates are treated at 00:00:00 in your local time zone (as interpreted by the browser/server). Ranges that span time zone changes or are entered from different zones may shift by a day at the boundaries.
- Negative ranges. If the finish date is earlier than the start date, the calculator returns a negative or absolute value depending on input order. Always enter the earlier date in the start field.
- Public holidays. The "Only count week days" option excludes weekends but not holidays. For a strict business-day count, subtract holidays manually using the table above.
Sources & references
- ISO 8601 — the international standard for date and time representation. The YYYY-MM-DD format used in the inputs follows this standard.
- US Federal Reserve — Federal Holidays — the source for the 11-holiday list used to derive business-day counts.
- IANA Time Zone Database — canonical source for time zone definitions and DST transition rules used by virtually all modern operating systems and programming languages.
- NIST Time and Frequency Division — US authoritative source for civil time, including the official time servers used to synchronise computer clocks.
FAQs
Enter your start date and finish date using the date pickers, then click Calculate. The calculator converts both dates to Unix timestamps (seconds since 1 January 1970 UTC), subtracts the start from the finish, and divides by 86,400 — the number of seconds in a day. The result is inclusive of both endpoints by default.
Yes — this is an inclusive count. Monday to Wednesday returns 3 days, not 2. Most deadlines, lease terms, and notice periods are counted inclusively. If you need the exclusive count (the elapsed gap between the two dates), subtract 1 from the result.
Tick the "Only count week days" checkbox before clicking Calculate. The calculator excludes Saturdays and Sundays from the total, returning the count of Monday-to-Friday days in the range. Public holidays are not excluded automatically — subtract any federal or local holidays manually for a strict business-day count.
Calendar days count every day (7 days a week). Week days count Monday to Friday only (5 days a week). Business days are week days minus public holidays — for example, the US Federal Reserve recognises 11 federal holidays a year, so a US business year is roughly 251 days. The checkbox above gives you week days; further holiday subtraction is manual.
A standard Gregorian year has 365 days. A leap year has 366, adding 29 February. Leap years occur every 4 years, except century years not divisible by 400 — so 2000 was a leap year, but 1900 was not. The Gregorian average is 365.2425 days per year, which is why the calculator uses real calendar dates rather than a fixed 365-day approximation.
The calculator works on whole-day units, so DST transitions don't affect the final day count. Internally, a single calendar day in a DST-observing region can be 23 or 25 hours long when the clock shifts, but day-level arithmetic ignores this. If you need exact elapsed time across a DST transition, use the hours calculator instead.