# WEEKNUM function in Excel

> WEEKNUM returns the week number of a date in its year, 1 to 54.

Source: https://spreadsheetpractice.com/functions/weeknum · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on October 30, 2026

## Quick answer

- **What it does:** WEEKNUM returns the week number of a date in its year, 1 to 54.
- **Syntax:** `=WEEKNUM(serial_number, [return_type])`
- **Most common use:** `=WEEKNUM(A2)` returns 1 (January 1 is always week 1 in the default system)
- **Available in:** Every current version
- **Category:** [Date functions](https://spreadsheetpractice.com/functions/category/date)
- **Returns:** A whole number from 1 to 54.
- **Google Sheets:** Works the same in Google Sheets.

## What it does

WEEKNUM returns the week number of a date in its year, 1 to 54. By default weeks start on Sunday and the week with January 1 is week 1; return_type 2 starts weeks on Monday, and 21 gives ISO week numbers. Use it to group dates by week in reports, summaries and charts.

## Syntax

`=WEEKNUM(serial_number, [return_type])`

| Argument | Required? | What it is |
|---|---|---|
| `serial_number` | Required | The date. |
| `return_type` | Optional | Optional: 1 or omitted, weeks start Sunday; 2 or 11, Monday; 12–17, Tuesday to Sunday; 21, ISO weeks. |

## Examples

Each result was calculated by running the formula on the sample sheet.

| Cell | Formula | Result | What it shows |
|---|---|---|---|
| B2 | `=WEEKNUM(A2)` | 1 | January 1 is always week 1 in the default system |
| B3 | `=WEEKNUM(A3,2)` | 11 | Weeks starting Monday: March 9 is in week 11 |
| B4 | `=WEEKNUM(A4,21)` | 53 | ISO week of December 31, 2026: 53 |

### The sample sheet

Every formula above runs on this data:

|  | A | B |
|---|---|---|
| 1 | Date | Result |
| 2 | 1/1/2026 | 1 |
| 3 | 3/9/2026 | 11 |
| 4 | 12/31/2026 | 53 |

## Common mistakes

| What you see | Why, and how to fix it |
|---|---|
| Week numbers don't match the calendar at work | Your company may use ISO weeks. Use return_type 21, or ISOWEEKNUM. |
| #NUM! | return_type isn't one of 1, 2, 11–17 or 21. |
| Week 53 or 54 | In the default system the last days of December can fall in week 53, or 54 in a leap year that starts on a Saturday. |

## Tips

- For weekly totals, add a WEEKNUM column and use it in SUMIFS or a pivot table.

## Related functions

- [ISOWEEKNUM](https://spreadsheetpractice.com/functions/isoweeknum): ISOWEEKNUM returns the ISO 8601 week number of a date: weeks start on Monday, and week 1 is the week that contains the year's first Thursday.
- [WEEKDAY](https://spreadsheetpractice.com/functions/weekday): WEEKDAY returns the day of the week for a date as a number.
- [TEXT](https://spreadsheetpractice.com/functions/text): TEXT turns a number or date into text in the format you choose, such as "$1,250.00" or "March 2026".

## Questions

### How do I get the week number of a date in Excel?

=WEEKNUM(A2) for weeks starting Sunday, =WEEKNUM(A2,2) for weeks starting Monday, or =ISOWEEKNUM(A2) for ISO weeks.

### What is the difference between WEEKNUM and ISOWEEKNUM?

WEEKNUM's week 1 is the week that contains January 1. ISO week 1 is the week with the year's first Thursday, so early January can be week 52 or 53 of the year before.

## Practice

A graded WEEKNUM exercise ("Week of each order") is on [the WEEKNUM page](https://spreadsheetpractice.com/functions/weeknum). It is checked instantly, then re-checked on changed data.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
