Contact

ISOWEEKNUM Function (LibreOffice Calc)

Date & Time Intermediate LibreOffice Calc LibreOffice 5.1

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.

Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked

Availability and version history

  • Introduced: LibreOffice 5.1.
  • Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
  • Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
  • Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
The **ISOWEEKNUM** function returns the **ISO‑8601 week number** for a given date. ISO weeks always start on **Monday**, and **Week 1** is defined as the week containing the **first Thursday** of the year. This makes ISOWEEKNUM essential for international reporting, analytics, scheduling, and any workflow requiring standardized week numbering.

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.
  • 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.