Date Calculator
Add or subtract days from a date to find the resulting calendar date and day of the week.
How It's Calculated
Formula
\text{result} = \text{UTC}(\text{start}) + \text{offsetDays} \times 86{,}400{,}000\ \text{ms}The start date is normalized to a UTC calendar-day value, then the day offset is added as whole days of milliseconds (86,400,000 ms per day) to get the resulting UTC calendar-day value. Because the arithmetic happens entirely in UTC, which has no daylight saving time transitions, the result is always exactly the offset number of calendar days away from the start date — never off by an hour or a day due to a DST change in the local timezone. A positive offset moves forward in time; a negative offset moves backward. The offset must be a whole number of days: fractional offsets are rejected rather than silently rounded or truncated. The resulting date's day of the week is derived from the same UTC-normalized value.
Worked Examples
Add 30 days: Jan 1, 2026 plus 30 days
- Normalize Jan 1, 2026 to its UTC calendar-day value.
- Add 30 days (30 x 86,400,000 ms).
- Result: Jan 31, 2026, a Saturday.
Subtract across a leap day: Feb 29, 2028 minus 2 days
- 2028 is a leap year, so Feb 29, 2028 is a valid start date.
- Normalize to its UTC calendar-day value and subtract 2 days.
- Result: Feb 27, 2028, a Sunday.
Frequently Asked Questions
Can I subtract days instead of adding them?
Yes. Enter a negative number in the offset field to move the start date backward instead of forward.
What happens if I enter an offset of 0?
The resulting date is identical to the start date, and its day of the week is reported as normal.
Why is the calculation done in UTC instead of my local timezone?
Normalizing the start date to UTC before adding or subtracting days removes any dependency on the local timezone or daylight saving time, so the day count is always exact regardless of where the calculator is used.
Can I enter a fractional number of days, like 1.5?
No. The offset must be a whole number of days; a fractional offset is rejected as invalid rather than rounded.
Does this calculator handle leap years correctly?
Yes. Calendar dates are validated against the real Gregorian calendar, and date arithmetic correctly accounts for Feb 29 in leap years.