Contact

WEEKNUM Function in Google Sheets: Syntax, Examples & Compatibility

Date & Time Beginner Google Sheets

Learn how to calculate a calendar week number for reports without confusing it with ISO week numbering in Google Sheets. Includes syntax, two verified-by-reasoning results, troubleshooting and portability notes.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: WEEKNUM(date,[type]) returns a week number under a chosen convention. Type 2 starts weeks on Monday but uses the January-1 system; type 21 uses the ISO first-Thursday system. They differ around some year boundaries.

Availability and version history

  • Introduced: Introduction version not established by the official history reviewed.
  • Availability: Documented in the rolling Google Sheets service; examples use the web spreadsheet workflow.
  • Checked: October 14, 2026; official WEEKNUM reference. Documentation check, not a new native test; existing example-verification notes retain their scope.

Syntax and the two week systems

=WEEKNUM(date, [type])

Use DATE expressions or validated date cells; Google warns that text inputs can cause errors. Type is optional and defaults to 1.

Type Week starts Numbering system
1 or omitted, 17 Sunday 1: week containing January 1 is week 1
2, 11 Monday 1
12 Tuesday 1
13 Wednesday 1
14 Thursday 1
15 Friday 1
16 Saturday 1
21 Monday 2: week containing the year’s first Thursday is week 1

Google identifies system 2 with ISO 8601. Merely choosing a Monday start does not switch system 1 to ISO. Display the result as a number, and record the selected convention beside any exported week label.

Two original worked controls

=WEEKNUM(DATE(2026,1,1),2)
=WEEKNUM(DATE(2026,1,5),2)

Expected results are 1 and 2. January 1 falls in week 1 under the chosen system-1 type. Monday January 5 begins the next week.

The statement “January 1 is always week 1” applies to system 1, not every WEEKNUM type. The ISO counterexamples below are why the qualification matters.

Advanced example: expose the default-week boundary

=WEEKNUM(DATE(2026,1,4))
=WEEKNUM(DATE(2026,1,4),2)

Expected outputs are 2 and 1. Sunday January 4 starts another Sunday-first week, but it is still in the opening Monday-first week.

Do not remove an explicit type argument while simplifying a report. The formula can remain valid and return a plausible integer while its grouping boundaries have changed.

Advanced example: compare system 1 with ISO

Enter the following DATE-generated values in A2:A4:

Date =WEEKNUM(date,2) =WEEKNUM(date,21) ISO week-year
2021-01-01 1 53 2020
2021-01-04 2 1 2021
2024-12-30 53 1 2025

The columns are independently calculated calendar expectations. The ISO year can differ from YEAR(date), in both early January and late December.

For A2 containing January 1, 2021, concatenating YEAR(A2) with ISO week 53 would label it 2021-W53 incorrectly. The matching ISO week belongs to 2020.

Advanced example: construct a complete ISO week key

With a date-only value in A2:

=YEAR(A2-WEEKDAY(A2,2)+4)&"-W"&TEXT(WEEKNUM(A2,21),"00")

The expression shifts the date to its week’s Thursday to obtain the ISO year, then combines it with a two-digit ISO week. The three dates above produce 2020-W53, 2021-W01 and 2025-W01.

This is a reporting construction derived from the documented first-Thursday definition, not an additional built-in function. WEEKDAY must retain type 2 in the construction.

Advanced example: prevent splitting one ISO week by calendar year

Create seven daily rows from December 28, 2020 through January 3, 2021, with amounts 10, 20, 30, 40, 50, 60 and 70 in B2:B8. Fill the ISO-key formula down C2:C8.

Every row has key 2020-W53. Then:

=SUMIF(C2:C8,"2020-W53",B2:B8)

Expected total: 280. Grouping those same dates only by calendar YEAR would split the values into 100 for 2020 and 180 for 2021, even though they share one ISO week.

Neither grouping is universally wrong; they answer different reporting questions. A weekly report should specify its week system and matching year label before totals are compared.

Advanced check: use a date anchor when a label is unnecessary

=A2-WEEKDAY(A2,2)+1

For each of the seven dates above, the expected Monday anchor is December 28, 2020. A date-valued grouping key can be easier to sort than a text label and does not discard the year.

Do not compare just the week integers from two distant dates to conclude they belong to the same week. Those integers recur every year.

Errors and portability limits

These examples use English function names, comma separators and valid date-only inputs. Exact invalid-type error codes, malformed text conversions and historical serial boundaries remain unverified in Sheets. A function with the same name in an imported file must preserve both its mode and its numbering policy; a matching output for one midyear date is insufficient evidence.

WEEKDAY in Google Sheets · WEEKDAY in Microsoft Excel · YEAR in Google Sheets · YEAR in Microsoft Excel · Compare WEEKNUM in Microsoft Excel

A guide for another spreadsheet is a separate product reference. It does not establish identical date parsing, serial boundaries or error displays after a file import.

The complete guide and original examples were reviewed on October 14, 2026 against direct Google documentation. Calendar, interval and numeric expectations were independently calculated; no native Google Sheets execution, mobile-client certification or complete input-conversion test was performed.