ForHosting KIT · Dates & time

Days left in the year

On 25 July 2026, 159 full days remain until 31 December: the date is day 206 of 365. Enter any calendar date to get the days left in its year, its day number and the leap-year check. 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
2026-07-25
You get
Year
2,026
Month
7
Day
25
Day of year
206

A days-left-in-the-year calculator answers a planning question people ask every week: from a given calendar day, how many full days remain until the year ends? Paste an ISO date in year-month-day form, and this tool returns the remaining day count until thirty-one December of that same year, the day-of-year ordinal, whether the year is a Gregorian leap year, and the year-end ISO string.

What “days remaining until year end” means on the Gregorian calendar

An ISO calendar date is written as four digits for the year, a hyphen, two digits for the month, another hyphen, and two digits for the day of the month—for example twenty twenty-six dash zero seven dash twenty-five. That form is unambiguous across locales that write month-first or day-first in everyday prose, which is why APIs and databases prefer it. Underneath, the Gregorian calendar still rules month lengths: thirty or thirty-one days for most months, February with twenty-eight days in a common year and twenty-nine only in a leap year.

A leap year is every year divisible by four, except century years that are not divisible by four hundred. The day-of-year is the ordinal position of the date inside that year: the first of January is day one, and the thirty-first of December is day three hundred sixty-five or three hundred sixty-six.

Days remaining until the end of the year are defined as the length of the year minus that day-of-year, so the last calendar day reports zero remaining full days and the first of January reports three hundred sixty-four in a common year or three hundred sixty-five in a leap year. That definition matches everyday language for countdowns and year-end planning without inventing a next-year horizon or counting business days only.

Practical tips, limits, and related searches

Always send a full calendar date, not a datetime with a time component or a trailing Z; this tool deliberately refuses extended ISO timestamps so callers cannot accidentally encode timezone-dependent midnights. When teaching or testing, keep a small known set: a mid-year weekday date, the first of January in both a common and a leap year, the thirty-first of December for a zero-remaining case, a valid twenty-ninth of February success case, and a deliberate failure such as twenty twenty-three dash zero two dash twenty-nine.

Year bounds stop at nine thousand nine hundred ninety-nine to keep four-digit ISO strings well defined for this product surface. This landing targets people searching for days left in the year, remaining days until the end of the year, or a year-end countdown from an ISO date; it is not a business-day counter, not a locale-aware date formatter, and not a multi-year interval calculator.

Prefer this capability when you already have one ISO date and only need the year-end remainder; if you need working days excluding weekends and holidays, use a business-days capability instead.

Year-end project and leave planning

Managers enter a target ISO date and see how many full calendar days remain until December 31 for leave buffers, freeze windows, and delivery cutoffs.

Homework checks for day-of-year arithmetic

Students compare hand-written day-of-year and remaining-days counts against a deterministic result that includes leap-year February rules.

How are days remaining until the end of the year counted?

1 January in a common year has 364 days remaining; 31 December has 0. The count is full calendar days left after the given date within the same year.

Does a leap year change the answer?

Yes. Leap years have 366 days, so day-of-year after February and the remaining count both account for 29 February when the year is divisible by 4 (with the usual century exceptions).

Is the days-left-in-the-year calculator free?

The browser tool is free and runs locally.

What day of the year is a given date?

The result shows it next to the countdown. 1 January is day 1, so 25 July 2026 is day 206 of 365, and 31 December is day 365, or 366 in a leap year.

Does it count only working days?

No. Every calendar day counts, weekends and holidays included. The result is simply the length of the year minus the day number of your date, with no business-day rules applied.

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/days-remaining-year

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/days-remaining-year \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"2026-07-25"}'
{
  "date": "2026-07-25"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "date.days_remaining_year",
  "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.

year_min1
year_max9999
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.

Invalid strings—wrong shape, impossible months, or a twenty-ninth of February outside a leap year—are rejected with a clear invalid_input error instead of a silent wrong answer.

How to call the API and what comes back

The value must match the exact pattern of four digits, hyphen, two digits, hyphen, two digits, and must represent a real Gregorian day in the inclusive year range from one through nine thousand nine hundred ninety-nine. Send a JSON body with one required string field named date, which may also be supplied under the aliases iso_date, value, or day. On success the response echoes the canonical date string, year, month, and day as numbers, sets day_of_year to the one-based ordinal, days_in_year to three hundred sixty-five or three hundred sixty-six, days_remaining and days_left to the same non-negative integer count of full days until thirty-one December, days_elapsed to the same ordinal as day_of_year for callers that think in elapsed days, leap_year to a boolean, year_end to the ISO string for thirty-one December of that year, and includes a short message plus an ordered steps array that restates the parse and subtraction. Failed validation—missing field, non-string type, bad shape, out-of-range year, impossible month or day, or a non-leap twenty-ninth of February—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.

Practical tips, limits, and related searches

Prefer the primary field name date when you control the client; aliases exist for compatibility with forms that label the control iso_date or value. Round-trip checks are easy: recompute day-of-year from month lengths by hand and confirm that days_in_year minus that ordinal equals days_remaining. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately send bad dates.

Countdown fixtures for apps and tests

Developers generate known-good remaining-day values for unit tests and UI countdown widgets without depending on the host clock or timezone.

What happens on 31 December?

The tool returns days_remaining = 0 and reports that the input is the last day of the year. It does not roll into the next year.

What if the date is invalid?

Missing fields, non-YYYY-MM-DD strings, impossible months or days, and non-leap 29 February return invalid_input and are never charged.

Read the full KIT documentation →