ForHosting KIT · Dates & time

Add days to a date

Add or subtract a number of calendar days and get the exact day it lands on: 1 March 2024 plus 10 days is 11 March 2024. Leap years and month lengths are handled for you. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Date
2024-03-01
Days
10
You get
Result
2024-03-11
Year
2,024
Month
3
Day
11

Adding a fixed number of calendar days to a date sounds trivial until leap years, month lengths, and invalid base strings enter the picture. Project managers schedule follow-ups thirty days after a kickoff, finance teams compute invoice due dates, support desks promise a reply within seven days, and data pipelines shift event timestamps by offsets stored as pure day counts. Impossible bases such as the twenty-ninth of February in a common year fail with a clear validation error instead of wrapping into March.

How calendar day addition works without a clock

Start with a base calendar date written as year, month, and day in the international ISO form with hyphens and fixed widths so every client agrees on the same three integers. Confirm that the year lies in a practical Gregorian range, that the month is between one and twelve, and that the day exists for that month under Gregorian leap rules: a year is a leap year when it is divisible by four, except that century years are leap years only when they are also divisible by four hundred.

That rule makes February twenty-nine legal in years such as two thousand twenty-four and two thousand, and illegal in two thousand twenty-three and nineteen hundred. When the triple is valid, convert it to a day-of-year ordinal by summing the lengths of complete prior months and adding the day-of-month. Add the integer offset to that ordinal.

While the running total exceeds the length of the current year, subtract that length and advance the year; while it falls below one, step the year backward and add the previous year’s length. Finally convert the stabilized ordinal back into month and day and format the result as a four-two-two ISO string.

Where add-days calculators show up in real work

Billing systems compute payment-due dates as invoice date plus net-thirty calendar days without pulling in a full scheduling library. Customer success tools set reminder dates seven or fourteen days after an onboarding event. Legal and compliance teams track notice periods measured in calendar days rather than business days.

Data engineers materialize derived columns for retention windows, trial expirations, and campaign end dates from a single ISO base plus an integer offset stored in configuration. If you later need business-day counts that skip weekends and holidays, the difference in days between two dates, age from a birth date, or day-of-year ordinals alone, treat those as separate search intents and landings rather than overloading this add-days-to-a-date page.

Invoice and subscription due dates

Add net-15 or net-30 calendar days to an invoice ISO date to produce a due date that is stable across time zones and hosts.

Reminders and follow-ups

Schedule support or sales follow-ups at seven, fourteen, or ninety days after a ticket or kickoff date with pure day arithmetic.

What does add days to a date mean?

It means taking a valid Gregorian calendar day and moving forward or backward by an integer number of calendar days, including month and year boundaries and leap days when they apply.

Does it handle leap years?

Yes. Gregorian leap rules apply: divisible by 4, except centuries must be divisible by 400. February 29 is accepted only in leap years and is crossed correctly when the offset lands on or past that day.

What date format is required?

Strict ISO YYYY-MM-DD with four-digit year and two-digit month and day. Values like 2024-3-1 or 2024/03/01 are rejected so every client agrees on the same string.

What happens with an invalid base date such as 2023-02-29?

The error message explains that the day is not valid for that year and month.

What does it cost?

The browser tool is free and runs locally.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/date/add-days

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/date/add-days \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"2024-03-01","days":10}'
{
  "date": "2024-03-01",
  "days": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "date.add_days",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What you send and what you get back

Send two required fields: date as a strict ISO calendar day such as two thousand twenty-four hyphen zero three hyphen zero one, and days as a finite integer day count such as ten, zero, or negative seven. Classic checks include adding ten days to the first of March two thousand twenty-four to reach the eleventh of March, adding one day to the twenty-eighth of February in a common year to reach the first of March, adding one day to the twenty-eighth of February in a leap year to reach the twenty-ninth, and subtracting seven days from a Monday-style ISO date to land on the prior week. Missing fields, non-string dates, strings that do not match the four-two-two digit pattern, non-integer day offsets, and bases that match the pattern but are not real calendar dates all fail with invalid_input and are not charged. On success the response echoes the normalized base date, the integer days offset that was applied, the result ISO string after addition, the numeric year, month, and day of the result, a boolean is_leap_year flag for the result year, and a short formula string that documents the leap rule. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.

Where add-days calculators show up in real work

Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.

Retention and trial windows

Derive trial end dates and retention cutoffs from a start ISO string plus a configured integer day offset for pipelines and QA fixtures.

Read the full KIT documentation →