ForHosting KIT · Dates & time

ISO 8601 week number

Enter a date to get its ISO 8601 week number and week-year: 25 July 2026 is in week 30, written 2026-W30, a Saturday. Weeks run Monday to Sunday and week 1 holds the year's first Thursday. 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
Week
30
Week year
2,026
Iso week
2026-W30
Weekday
6

ISO 8601 week numbering is the standard used in European reporting, payroll calendars, manufacturing schedules and many APIs. Unlike US-style weeks that often start on Sunday and never spill into another year, an ISO week always starts on Monday, and Week 1 is the week that contains the first Thursday of the Gregorian year. That rule means late December and early January can belong to a different ISO week-year than the calendar year printed on the date. This capability takes a single ISO date string, interprets it as a UTC civil day, and returns the week number (1–53), the ISO week-year, a compact YYYY-Www label, and the weekday — deterministically, with no timezone guesswork.

What an ISO week number actually means

People often say “week number” when they mean three different things: the ordinal week of the calendar year starting on January 1, the week-of-month (first through fifth week inside a month), or the ISO 8601 week defined in the international standard. Only the last one is stable across countries that follow ISO calendars. Under ISO 8601, every week has seven days from Monday through Sunday.

Week 1 of year Y is the week that includes Y’s first Thursday — equivalently, the week that contains January 4. Years can therefore have 52 or 53 ISO weeks. When a year has 53 weeks, December 29, 30 or 31 can still sit in week 53 of that ISO year, and January 1–3 of the next calendar year may still belong to week 52 or 53 of the previous ISO week-year.

Confusing the calendar year with the week-year is the most common bug in hand-rolled date helpers, dashboards and SQL reports.

Input contract and UTC-only evaluation

Send one required field, date, as an ISO-8601 string. The preferred form is YYYY-MM-DD (for example 2026-07-25). A full datetime with a time and optional zone suffix is accepted, but only the calendar day is used after the string is parsed; the computation always runs on that civil day at UTC midnight.

Missing or non-string values also fail validation and are not billed.

Weekly analytics and KPI rollups

Bucket events by ISO week and week-year so December and January boundary traffic lands in the correct reporting week instead of the wrong calendar year.

Payroll and manufacturing calendars

Label timesheets, shifts and production batches with ISO week numbers that match European and ISO-aligned planning systems.

What is the ISO 8601 week number?

It is the week index from 1 to 53 defined by ISO 8601: weeks start on Monday, and week 1 is the week containing the first Thursday of the year (or equivalently January 4).

Is the calculation in local time or UTC?

UTC only. The date is treated as a UTC civil day (YYYY-MM-DD). Optional time suffixes are ignored for the week math so results stay deterministic across timezones.

Why can early January belong to last year's week?

Because ISO weeks belong to a week-year that can differ from the calendar year. January 1–3 may still sit in week 52 or 53 of the previous ISO year, and late December can fall in week 1 of the next.

How many ISO weeks does a year have?

Either 52 or 53. Week 1 is the week that contains 4 January, so in years with 53 weeks the 29, 30 or 31 December can still sit in week 53.

Can I enter a date with a time?

Yes. A full date and time, even with a time zone, is accepted, but only the calendar day is used. The week is always worked out on that day at midnight UTC.

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/week-number

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/week-number \
  -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.week_number",
  "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 an ISO week number actually means

This endpoint isolates that rule so callers get a single, audited answer instead of divergent results from locale-dependent libraries.

Input contract and UTC-only evaluation

The response includes the normalized date, week (1–53), week_year (the ISO week-year, which can differ from the Gregorian year near boundaries), iso_week in the compact form 2026-W30, plus weekday (Monday=1 … Sunday=7) and weekday_name for readability.

Where pipelines use week numbers and how to call this

Weekly KPIs, sprint boards, fiscal reporting that follows ISO weeks, logistics slots labelled by week, and CSV enrichment jobs all need a reliable week index. Keep the UTC contract: if you need local midnights in another zone, convert to the local civil date first, then pass that YYYY-MM-DD here so the week calculation stays pure and reproducible. Call the free browser tool for one-off checks, or the prepaid API when you normalize thousands of rows: each successful item is priced at the published base of $0.002, and invalid input is free. Pair this capacity with date normalization when your source data is messy, then map each cleaned ISO day to week and week_year before grouping.

CSV and warehouse enrichment

Add week and iso_week columns to export pipelines so BI tools can group rows without reimplementing ISO rules in SQL dialects.

Why can week_year differ from the calendar year?

Near New Year, days in late December or early January can belong to the previous or next ISO week-year. The Thursday of that week decides the week-year, not the Gregorian year of the day itself.

What date formats are accepted?

YYYY-MM-DD is preferred. Full ISO datetimes are accepted if they start with a valid calendar date; impossible dates and missing values return invalid_input.

How much does the ISO week number API cost?

The browser tool is free. Successful API calls use prepaid balance at the published base price of $0.002 per item; invalid input is not charged.

Read the full KIT documentation →