Formula Guide

The Excel WEEKNUM Function
explained simply

WEEKNUM returns which numbered week of the year a date falls in — useful for weekly reporting and grouping.

ExcelPro · 3 min read · Updated June 2026
Contents
  1. What does WEEKNUM do?
  2. Syntax
  3. 3 examples
  4. FAQ

What does WEEKNUM do?

WEEKNUM returns the week number of the year that a given date falls in, where week 1 is the week containing January 1st.

It is commonly used to group daily data into weekly summaries — for example, grouping sales by week number to build a weekly trend chart.

Syntax

=WEEKNUM(date, [return_type])
ArgumentDescription
date requiredThe date to check.
return_type optionalControls which day starts the week. Default (1): weeks start Sunday.

Examples

Example 1
Week number of a date
=WEEKNUM(DATE(2026,6,22))

Returns the week of the year June 22, 2026 falls in.

Example 2
Group sales by week for a chart
=SUMIFS(C:C,B:B,WEEKNUM(A2))

Pairs WEEKNUM with SUMIFS to total sales for whichever week a given date belongs to.

Example 3
Compare two dates by week
=WEEKNUM(A2)=WEEKNUM(B2)

Checks whether two dates fall in the same week of the year.

Common mistakes

⚠️ Assuming WEEKNUM matches the ISO week standard

Excel's default WEEKNUM does not follow the international ISO 8601 week numbering. Use ISOWEEKNUM if you specifically need that standard.

FAQ

What is the difference between WEEKNUM and ISOWEEKNUM?
WEEKNUM uses Excel's own week-1-starts-with-January-1st logic. ISOWEEKNUM follows the international standard where week 1 is the week containing the first Thursday of the year.

Practise Excel with real data

ExcelPro has 700+ hands-on Excel exercises across 7 career tracks — free to start, no download needed.

Start practicing free →

Related formulas

WEEKDAY EOMONTH EDATE