Finds the ISO 8601 week number. Weeks start on Monday and belong to the year containing their Thursday, so around New Year the week year can differ from the calendar year.
This tool gives the ISO 8601 week number of a date, the sense in which a schedule refers to week 31 rather than to a range of days.
Weeks begin on Monday, and each week belongs to the year that contains its Thursday. Everything else follows from those two rules.
Put another way, week 1 is the week containing 4 January. When 1 January falls on a Friday, Saturday or Sunday, that day belongs to the last week of the previous year. When 29 December or later falls on a Monday, Tuesday or Wednesday, it already belongs to week 1 of the next year.
Here is the day number of the Thursday in that week, the day number of 1 January in the year the week belongs to, and the week number.
27 July 2026 falls in week 31 of 2026, on weekday 1, a Monday.
1 January 2027 is a Friday, so the Thursday of its week is 31 December 2026. The week therefore belongs to 2026 and is numbered 53. By the calendar the date is in 2027; by the week numbering it is in the final week of 2026.
A year holds either 52 or 53 weeks. Around New Year the calendar year and the week-numbering year part company, which is what the second output is for.
Spreadsheet software often numbers weeks by a different rule, such as starting the week on Sunday. A mismatch there is usually a difference of convention rather than an error.