Quick Answer

WEEKNUM Function

Returns the week-of-year number for a date.

✓ Excel✓ Google SheetsExcel All versions

Syntax

WEEKNUM
(serial_number, [return_type])

Parameters

ParameterDescriptionRequired
serial_numberThe date serial to evaluate.Required
return_typeOptional. Controls the week-start day: 1 (default) = week starts Sunday; 2 = week starts Monday; 11-17 select a specific start day; 21 = ISO 8601 (week starts Monday, week 1 is the one containing the first Thursday).Optional

Basic Example

Week number of New Year 2024

=WEEKNUM(DATE(2024, 1, 1), 2)
Result1

2024-01-01 is a Monday. With return_type 2 (Monday start), the week containing Jan 1 is week 1.

Advanced Examples

Example 1: ISO 8601 week for a late-December date spill

A date that belongs to the previous ISO year

return_type 21 follows the ISO rule

=WEEKNUM(DATE(2021, 1, 1), 21)
Result: 53
2021-01-01 is a Friday that falls in the last ISO week of 2020, so it returns 53.

Example 2: US week starting Sunday

Comparing numbering systems

return_type 1 starts the week on Sunday

=WEEKNUM(DATE(2021, 1, 1), 1)
Result: 1
With return_type 1, the week containing Jan 1 is always week 1, so 2021-01-01 returns 1.

How WEEKNUM Works

WEEKNUM determines which week a date falls in based on the chosen week-start day. Week 1 always contains January 1. The ISO mode (21) defines week 1 as the week with the first Thursday (equivalently the week containing Jan 4), which can place early January dates in week 52 or 53 of the prior year.

1
Enter the date
Provide a date serial or a DATE(...) expression.
2
Choose return_type
Use 1/2 for US-style, or 21 for ISO 8601 weeks.
3
Read the week number
The function returns an integer 1-53.

Important Notes & Limitations

  • Week 1 always contains Jan 1, so early or late dates can return 52 or 53 under the ISO system.

  • For strict ISO weeks in Excel 2013 and later, the dedicated ISOWEEKNUM function is an alternative.

  • return_type must be 1, 2, 11-17, or 21; other values return #NUM!.

Common Errors & Fixes

#NUM!An invalid return_type value was supplied.

Fix: Use 1, 2, 11-17, or 21.

Week number seems off by oneMixing Sunday-start and Monday-start systems, or expecting ISO behavior.

Fix: Use return_type 21 for ISO 8601 weeks.

Download Practice File

Practice WEEKNUM with Real Data

Download a sample CSV file with pre-populated data and practice exercises for the WEEKNUM function. Works in both Excel and Google Sheets.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Frequently Asked Questions

How do I get ISO 8601 week numbers?
Use return_type 21, e.g. =WEEKNUM(date, 21).
Why is Jan 1 sometimes week 53?
Under ISO (21), if Jan 1 falls in the last week of the previous year, it returns 52 or 53.
What is the difference between return_type 1 and 2?
1 starts the week on Sunday, 2 starts it on Monday.