User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Category Time & Date
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Date arithmetic errors cascade. A lease ending one day late triggers penalty clauses. A medication schedule shifted by 1 day compounds across 30 doses. This calculator performs exact day addition and subtraction on any calendar date, correctly handling leap years (where February has 29 days when the year is divisible by 4, except centuries not divisible by 400), month-boundary rollovers, and Daylight Saving Time transitions. It does not approximate. It computes using the proleptic Gregorian calendar as implemented by the ECMAScript Date specification (ECMA-262 ยง21.4).

The business days mode excludes Saturdays and Sundays from the count, which matters for contractual deadlines governed by statutes like the UCC or FIDIC. Note: this tool does not account for public holidays, which vary by jurisdiction. Pro Tip: for legal deadlines, always confirm your local holiday calendar separately and add a 1-day buffer for filing systems that close early.

add days to date date calculator subtract days business days calculator future date calculator date arithmetic

Formulas

The result date Dresult is computed by direct calendar day offset from a start date Dstart:

Dresult = Dstart + n

where n is the signed number of calendar days (n > 0 for future, n < 0 for past). The engine internally calls Date.setDate(Date.getDate() + n), which handles month and year rollovers natively.

For business days mode, the algorithm iterates day-by-day, incrementing a counter k only when the current day-of-week w satisfies:

w โˆ‰ {0, 6}

where 0 = Sunday and 6 = Saturday (ECMAScript convention). The loop terminates when k = |n|.

The leap year predicate L(y) used internally:

{
TRUE if y mod 400 = 0FALSE if y mod 100 = 0TRUE if y mod 4 = 0FALSE otherwise

The duration breakdown converts the absolute difference ฮ”t in milliseconds to weeks and remaining days:

W = floor(ฮ”t604800000), R = ฮ”t mod 60480000086400000

where 604800000 = 7 ร— 86400000 ms (one week) and 86400000 ms = 24 ร— 60 ร— 60 ร— 1000 (one day).

Reference Data

MonthDaysCumulative (Non-Leap)Cumulative (Leap)Notes
January313131Start of Q1
February28 / 295960Leap day: Feb 29
March319091Start of Q2 (some fiscal)
April30120121Start of Q2
May31151152 -
June30181182Mid-year
July31212213Start of Q3
August31243244 -
September30273274Start of Q4 (some fiscal)
October31304305Start of Q4
November30334335 -
December31365366End of year
Leap Year Reference
Year 2024366 days (leap)Divisible by 4
Year 2025365 daysNot divisible by 4
Year 2100365 daysCentury, not รท 400
Year 2000366 days (leap)Century, รท 400
Common Periods
Fortnight14 days2 weeks
Quarter90 - 92 daysVaries by months
Semester182 - 183 daysHalf-year
Fiscal Year (US)365 / 366 daysOct 1 - Sep 30

Frequently Asked Questions

The calculator uses the native ECMAScript Date engine which correctly implements the Gregorian leap year rule: a year is a leap year if divisible by 4, except for century years which must also be divisible by 400. So adding 365 days from January 1, 2024 (a leap year) yields December 31, 2024 - not January 1, 2025 - because 2024 has 366 days. The rollover is handled automatically.
No. Business days mode excludes only Saturdays and Sundays (ISO weekday indices 6 and 0). Public holidays vary by country, state, and even municipality. For legal or contractual deadlines, cross-reference the result with your jurisdiction's official holiday calendar and add the corresponding number of additional days manually.
DST shifts cause certain calendar days to have 23 or 25 hours. The calculator adds calendar days, not fixed 24-hour periods. Adding 1 day to March 9, 2025 at midnight in US Eastern time yields March 10, 2025 at midnight, even though only 23 hours have elapsed. This is the correct behavior for date arithmetic as opposed to duration arithmetic.
Yes. Enter a negative number in the days field or use the Subtract toggle. The same algorithm runs in reverse: the Date engine correctly rolls back across month and year boundaries. For example, subtracting 60 days from March 1, 2025 yields December 31, 2024.
The calculator accepts up to ยฑ999,999 days (approximately ยฑ2,739 years). The ECMAScript Date object supports dates from April 20, 271821 BCE to September 13, 275760 CE (ยฑ8.64 ร— 10ยนโต milliseconds from epoch). Values producing dates outside this range will display an error.
The breakdown decomposes the absolute day count into complete weeks (groups of 7) plus remaining days. If you add fewer than 7 days, the weeks component is 0. For example, adding 10 days shows 1 week and 3 days.