ISOWEEKNUM Function (LibreOffice Calc)
The ISOWEEKNUM function returns the ISO‑8601 week number for a given date. ISO weeks start on Monday, and Week 1 is the week containing the first Thursday of the year.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✔ |
| Libreoffice | ✔ |
| Numbers | ✔ |
| Onlyoffice | ✔ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the ISOWEEKNUM Function Does ▾
- Returns the ISO‑8601 week number (1–53)
- Uses Monday as the first day of the week
- Ensures Week 1 contains January’s first Thursday
- Works with real dates, serial numbers, and DATEVALUE
It is designed to be consistent, international, and standards‑compliant.
Syntax ▾
ISOWEEKNUM(date)
Arguments
- date:
A valid date or serial number.
Basic Examples ▾
ISO week number of a date
=ISOWEEKNUM("2024-01-01")
Returns 1.
Using a cell reference
=ISOWEEKNUM(A1)
ISO week number of today
=ISOWEEKNUM(TODAY())
ISO week number of a datetime
=ISOWEEKNUM("2024-03-15 08:45")
Time is ignored.
Advanced Examples ▾
ISO week number from text using DATEVALUE
=ISOWEEKNUM(DATEVALUE(A1))
ISO week number from imported CSV timestamp
=ISOWEEKNUM(DATEVALUE(LEFT(A1;10)))
ISO week number from Excel serial date stored as text
=ISOWEEKNUM(DATE(1899;12;30)+VALUE(A1))
Determine if two dates fall in the same ISO week
=ISOWEEKNUM(A1)=ISOWEEKNUM(B1)
Determine ISO year (not always the same as calendar year)
=YEAR(A1 - WEEKDAY(A1;2) + 4)
Build an ISO week label (e.g., “2024-W05”)
=YEAR(A1 - WEEKDAY(A1;2) + 4) & "-W" & TEXT(ISOWEEKNUM(A1);"00")
First day of the ISO week
=A1 - WEEKDAY(A1;2) + 1
Last day of the ISO week
=A1 - WEEKDAY(A1;2) + 7
ISO‑8601 Rules Summary ▾
- Weeks start on Monday
- Week 1 is the week containing January 4 (or the first Thursday)
- ISO years may differ from calendar years
- Some years have 53 weeks
Example:
2020 had ISO Week 53.
Edge Cases and Behavior Details ▾
ISOWEEKNUM returns an integer (1–53)
Accepts:
- Real dates
- Serial numbers
- DATEVALUE outputs
- ISO date strings
Invalid text → Err:502
Time components are ignored
ISO year may differ from calendar year
Example:
2021-01-01 is ISO Week 53 of 2020.
ISOWEEKNUM of an error → error propagates
Common Errors and Fixes ▾
Err:502 — Invalid argument
Cause:
- Text not recognized as a date
- Non-numeric values
Fix:
- Wrap with DATEVALUE
- Clean text with TRIM or SUBSTITUTE
Wrong week due to locale confusion
Fix:
- Use ISOWEEKNUM instead of WEEKNUM for international consistency
Unexpected ISO year
Cause:
- ISO weeks can belong to previous/next year
Fix:
- Use ISO year formula: YEAR(date - WEEKDAY(date;2) + 4)
Best Practices ▾
- Use ISOWEEKNUM for international reporting
- Use WEEKNUM only when local conventions require it
- Normalize text dates with DATEVALUE
- Use ISO year formula for accurate labeling
- Use ISOWEEKNUM with TEXT() to build week labels
ISOWEEKNUM is your standards‑compliant week‑number engine — perfect for analytics, dashboards, scheduling, and international reporting.
Related Patterns and Alternatives ▾
- Use WEEKNUM for locale‑specific week numbering
- Use WEEKDAY for day‑of‑week logic
- Use DATE for constructing comparison dates
- Use DATEDIF and DAYS for interval calculations
By mastering ISOWEEKNUM and its companion functions, you can build powerful, reliable, and internationally consistent date‑based workflows in LibreOffice Calc.