WEEKNUM Function

WEEKNUM Function

WEEKNUM Function

Returns the week number for a date.

ExcelClash Team
PUBLISHED

Summary

The Excel WEEKNUM function returns the week number of a date within the year.

WEEKNUM is useful for weekly reporting, scheduling, production cycles, sprint planning, and any workbook that groups records by week instead of by day or month.

Purpose

Return a week-of-year number

Converts a date into a week number for annual reporting and grouping.

Return Value

A whole number

Returns the week number for the supplied date based on the selected system.

Syntax

=WEEKNUM(serial_number, [return_type])

serial_number is the date you want to evaluate. The optional return_type changes the week system and the starting day of the week.

Arguments

  • serial_number - A valid Excel date.
  • return_type - [optional] A number that determines how weeks are counted.

WEEKNUM Systems

Microsoft documents two main systems for this function.

System Week 1 Rule Typical Return Type Best Use
System 1 The week containing January 1 is week 1 1 or 2 Standard non-ISO week numbering
System 2 The week containing the first Thursday is week 1 21 ISO 8601 week numbering

If you need strict ISO week numbering, WEEKNUM(date,21) follows the same ISO-based system documented by Microsoft. If you want a simpler Sunday-start or Monday-start week number, use the standard return types instead.

Using WEEKNUM

WEEKNUM is most useful when your reporting is organized by week. For example, a sales log, manufacturing log, or sprint tracker can use a helper column with WEEKNUM so records can be grouped and filtered more easily.

Return type 2 is often preferred in business models because it starts the week on Monday. Return type 21 is for ISO week numbering, where week 1 is defined by the first Thursday of the year rather than simply by January 1.

Because week systems differ, the same date can return different week numbers depending on the return type. That is the most important detail to keep in mind when using WEEKNUM in shared reports.

Example 1 - Return the Current Week Number

This is the most basic use of WEEKNUM: return the week number for today.

=WEEKNUM(TODAY())

This is helpful for live dashboards, weekly summaries, and current-week reporting.

Check Answer
Challenge #1
Target: Sheet1!F1
Current Week

In cell F1, return the current week number with =WEEKNUM(TODAY()).

Example 2 - Use Monday as the Week Start

Return type 2 starts the week on Monday instead of Sunday.

=WEEKNUM(B2,2)

This is often easier to align with business calendars, especially when teams treat Monday as the first workday of the week.

Check Answer
Challenge #2
Target: Sheet1!F2
Monday Week

In cell F2, return the week number for B2 using return type 2.

Example 3 - Use ISO Week Numbering

Return type 21 switches the function to the ISO 8601 system.

=WEEKNUM("2026-01-01",21)

This is useful when your reports need to match international or ISO-based week numbering rules.

Check Answer
Challenge #3
Target: Sheet1!F3
January Start

In cell F3, calculate the week number for January 1, 2026.

Example 4 - Build a Week Label

You can combine WEEKNUM with text to create display labels.

="Week " & WEEKNUM(B2)

This pattern works well for chart labels, sprint names, and weekly headings in reports.

Check Answer
Challenge #4
Target: Sheet1!F4
Week Label

In cell F4, create a label like "Week 3" from the date in B2.

Conclusion Recap

  • Summary: WEEKNUM returns the week number for a date.
  • Default behavior: Standard week numbering uses the week containing January 1 as week 1.
  • Business option: Return type 2 starts weeks on Monday.
  • ISO option: Return type 21 uses the ISO 8601 system.
  • Common uses: Weekly grouping, sprint planning, and recurring reports.
  • Important detail: The same date can return different week numbers under different systems.
Tactical Arena
Select Scenario:
Share WEEKNUM Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.