Week number calculator
ISO week and ordinal day for a valid Gregorian date.
Fill in the fields and the result will appear here automatically.
Find the ISO week together with its ISO year, the ordinal day within the date’s calendar year and the days remaining after that date through 31 December. An ISO week runs Monday to Sunday and belongs to the year of its Thursday. A December date can therefore already be in the next ISO year. The model applies Gregorian calendar rules consistently from 0001-01-01 through 9999-12-31; it does not reconstruct countries’ historical calendar changes.
How it works
Formula and logic
ISO week 1 contains 4 January, equivalently the year’s first Thursday. Monday is weekday 1 and Sunday weekday 7. The initial week is floor((ordinal day − ISO weekday + 10) / 7), with boundary weeks assigned to the adjacent ISO year. The ordinal starts at 1 on 1 January; remaining days equal 365 or 366 minus that ordinal. Leap years are divisible by 4, except century years unless divisible by 400. This is a date-only calculation, independent of time of day or timezone.
Example
18 August 2026 is Tuesday in ISO 2026-W34: ordinal day 230, with 135 days remaining. 31 December 2024 is Tuesday in ISO 2025-W01, but ordinal day 366 of calendar year 2024 with 0 days remaining. 1 January 2023 belongs to ISO 2022-W52. The lower boundary, 0001-01-01, is ISO 1-W01 and ordinal day 1.
Fields and units
- Date — date
How to use
- — Enter an existing calendar date in years 0001–9999.
- — Read the week number together with the ISO year, especially around New Year.
- — The ordinal and remaining days use the date’s calendar year. The selected day is excluded from the remainder.
- — Check your scheduling system if its week starts on Sunday: this result follows ISO week rules.
Method and limitations
- Calculation method
- Formula and logic
- Data or methodology source
- Python: ISO week year in the proleptic Gregorian calendar
- Limitation
- ISO weeks in the proleptic Gregorian calendar, years 0001–9999. Local historical calendars, holidays, working weeks, timezones and other week numbering systems are outside this model.
FAQ
Why can an early January date show the previous ISO year?
Its whole week belongs to the year containing that week’s Thursday. For example, Sunday 1 January 2023 belongs to 2022-W52. The calendar year of the selected date has not changed.
When does an ISO year have 53 weeks?
When 1 January is Thursday, or when a leap year starts on Wednesday. Otherwise the ISO year has 52 weeks. The calendar year still contains 365 or 366 days.
Does this number apply to a Sunday-first calendar?
A Sunday-first system can define both its first week and week year differently. This calculator always uses Monday-first ISO weeks and does not convert the result to another numbering system.
How does 29 February affect the ordinal day?
In a leap year, 29 February is day 60 and 1 March is day 61. There is no 29 February in 1900, whereas 2000 is a leap year. December 31 is day 365 or 366 regardless of the ISO week year.
Can this result represent a historical civil date or a timestamp?
It applies the Gregorian rules to every supported year. Local switches from the Julian calendar, skipped civil dates and timezone transitions are outside the model. The input is a calendar date rather than an instant.