ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dates
  3. How to Get the Week Number From a Date in Excel

How to Get the Week Number From a Date in Excel

By ExcelReady Team·Updated November 2, 2026·7 min read

The short answer

Use =WEEKNUM(A2) to get the week number of the date in A2, with weeks starting on Sunday. Use =WEEKNUM(A2,2) for weeks that start on Monday. For ISO week numbers, the standard in much of Europe, use =ISOWEEKNUM(A2). The two systems can give different numbers in early January and late December.

Key takeaways

  • =WEEKNUM(A2) starts weeks on Sunday; =WEEKNUM(A2,2) starts them on Monday.
  • With WEEKNUM, week 1 is always the week that contains 1 January, even if it has only one day.
  • ISOWEEKNUM follows the ISO standard: Monday weeks, and week 1 contains the first Thursday of the year.
  • TEXT has no week-number code, but ="W"&TEXT(WEEKNUM(A2,2),"00") turns the number into a label like W03.
  • Week numbers restart every year, so add the year when your data covers more than one.
On this page+
  1. How to get the week number in Excel with WEEKNUM
  2. How to get ISO week numbers with ISOWEEKNUM
  3. Why WEEKNUM and ISOWEEKNUM give different week numbers
  4. How to show the week number with TEXT, like W03 or 2026-W03
  5. How to get the start date of the week instead
  6. How WEEKNUM works without WEEKNUM
  7. Common week number problems
  8. Practise it

To get the week number from a date in Excel, use WEEKNUM: =WEEKNUM(A2) counts weeks that start on Sunday, and =WEEKNUM(A2,2) counts weeks that start on Monday. If your company or country uses ISO week numbers, use ISOWEEKNUM instead. This guide is for anyone grouping sales, shifts or deliveries by week, and it shows where the two systems disagree so your weekly totals don't split in the wrong place.

How to get the week number in Excel with WEEKNUM#

WEEKNUM takes a date and returns a number from 1 to 54. The syntax is:

Excel formula
=WEEKNUM(serial_number, [return_type])

The serial_number is the date. The optional return_type sets the day each week starts on:

return_typeWeek starts on
1 or left outSunday
2 or 11Monday
12 to 16Tuesday to Saturday
17Sunday
21Monday, ISO system (same as ISOWEEKNUM)

With WEEKNUM, week 1 is always the week that contains 1 January. Here are a few 2026 dates (1 January 2026 is a Thursday):

DateDay=WEEKNUM(A2)=WEEKNUM(A2,2)
1 Jan 2026Thu11
4 Jan 2026Sun21
5 Jan 2026Mon22
15 Mar 2026Sun1211
2 Nov 2026Mon4545

Look at 4 January: with Sunday weeks it starts week 2, but with Monday weeks it is still the last day of week 1. Pick the return type that matches how your team defines a week, and use the same one everywhere.

How to get ISO week numbers with ISOWEEKNUM#

ISO week numbers follow the international standard ISO 8601, which is common in Europe. The rules are: weeks start on Monday, and week 1 is the week that contains the first Thursday of the year. Use:

Excel formula
=ISOWEEKNUM(A2)

ISOWEEKNUM is available in Excel 2013 and later. =WEEKNUM(A2,21) gives the same result and is useful if a colleague needs a single function for both systems.

Why WEEKNUM and ISOWEEKNUM give different week numbers#

The two systems agree for most of the year but often disagree around New Year. WEEKNUM always starts a new week 1 on 1 January. ISO weeks belong to the year that holds their Thursday, so a week can cross into the next year:

DateDay=WEEKNUM(A2,2)=ISOWEEKNUM(A2)
29 Dec 2025Mon531 (of 2026)
31 Dec 2026Thu5353
1 Jan 2027Fri153 (of 2026)
3 Jan 2027Sun153 (of 2026)

So 29 December 2025 counts as ISO week 1 of 2026, and the first three days of 2027 still count as ISO week 53 of 2026. WEEKNUM can also create a very short week 1: in 2027, week 1 is only 1 to 3 January when weeks start on Monday. If a report treats every week as seven days, ISO weeks are the safer choice.

How to show the week number with TEXT, like W03 or 2026-W03#

TEXT can't produce a week number on its own: its format codes cover days, months and years, but not weeks. What it can do is pad the number so labels sort correctly. Combine it with WEEKNUM:

Excel formula
="W"&TEXT(WEEKNUM(A2,2),"00")

For 15 January 2026 this returns W03. Without the "00", week 3 would show as W3 and sort after W10. To add the year:

Excel formula
=YEAR(A2)&"-W"&TEXT(ISOWEEKNUM(A2),"00")

This gives 2026-W03 for 15 January 2026. There is one trap: for ISO weeks, the year in the label must be the ISO year. 29 December 2025 would show 2025-W01, which is wrong. Use the year of that week's Thursday instead:

Excel formula
=YEAR(A2-WEEKDAY(A2,2)+4)&"-W"&TEXT(ISOWEEKNUM(A2),"00")

Now 29 December 2025 shows 2026-W01 and 1 January 2027 shows 2026-W53. See the TEXT function guide for more format codes, and how to get the month name from a date or the quarter from a date for other period labels.

How to get the start date of the week instead#

Sometimes a date is clearer than a number. This formula returns the Monday of the week for the date in A2:

Excel formula
=A2-WEEKDAY(A2,2)+1

WEEKDAY(A2,2) gives 1 for Monday up to 7 for Sunday, so subtracting it and adding 1 always lands on Monday. For 15 March 2026, a Sunday, the result is 9 March 2026. If you see a number like 46090, format the cell as a date (Ctrl+1 on Windows, ⌘1 on Mac). Week-start dates don't repeat across years, so they are great for grouping. The guide to summing values by week uses them with SUMIFS, and the WEEKDAY function article explains the return types.

How WEEKNUM works without WEEKNUM#

The rule behind =WEEKNUM(A2) is simple enough to rebuild with basic date functions:

Excel formula
=ROUNDUP((A2-DATE(YEAR(A2),1,1)+WEEKDAY(DATE(YEAR(A2),1,1)))/7,0)
  1. A2-DATE(YEAR(A2),1,1) counts the days since 1 January. For 15 March 2026 that is 73.
  2. WEEKDAY(DATE(YEAR(A2),1,1)) is the weekday of 1 January, with Sunday as 1. In 2026 it's a Thursday, so 5.
  3. (73+5)/7 is about 11.1, and ROUNDUP makes it 12, the same as =WEEKNUM(A2).

This works because Excel stores every date as a number of days, so you can subtract dates like any numbers. It's a good way to check you really understand how dates work, and it's the formula in the exercise on this page.

Common week number problems#

Most week number errors come from the data, not the formula:

  • #VALUE! error. The date is text, not a real date. Convert it first with DATEVALUE; see how to convert text to a date.
  • The result looks like a date. The cell kept a date format. Change it to General.
  • Weeks from two years mixed together. Week 10 of 2025 and week 10 of 2026 both show 10. Add the year, or group by the week-start date.
  • A fiscal year that doesn't start in January. Week numbers count from 1 January. For a fiscal week, subtract the fiscal year start date instead; see how to get the fiscal year from a date.

Practise it#

Week numbers are easy once dates feel like numbers to you. Practise how Excel stores dates with DATE, YEAR, MONTH and DAY, then practise WEEKDAY, EDATE and EOMONTH in a live spreadsheet: you type each formula and it is checked instantly. Start with the exercise on this page and see if you get week 12.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Work out the week number of the ship date in B2 without WEEKNUM, using the same rule WEEKNUM uses (Sunday weeks, week 1 contains 1 January). In C2, type =ROUNDUP((B2-DATE(YEAR(B2),1,1)+WEEKDAY(DATE(YEAR(B2),1,1)))/7,0) and press Enter.

fx
ABCD
1
Order
Ship Date
Week
2
SO-2201
46096
3
SO-2202
46026
4
SO-2203
46328
5
SO-2204
46387
6
7
8

Tip: B2 minus 1 January gives the days so far. Adding WEEKDAY of 1 January shifts the count to start on a Sunday. Divide by 7 and round up. The answer for 15 March 2026 is 12.

Practise this in a lesson

LessonRenewals and month-ends: EDATE, EOMONTH, WEEKDAYShift dates by whole months with EDATE, jump to month-end with EOMONTH, and find the day of the week with WEEKDAY.LessonHow Excel stores dates: DATE, YEAR, MONTH, DAYLearn why every date is secretly a number, then build dates with DATE and take them apart with YEAR, MONTH and DAY.Function guideTEXTFormat dates, prices and percentages inside labels with Excel's TEXT function. Format codes, common mistakes and a live practice exercise.

Frequently asked questions

What is the formula for week number in Excel?

+

Use =WEEKNUM(A2) for weeks that start on Sunday or =WEEKNUM(A2,2) for weeks that start on Monday. For ISO week numbers, use =ISOWEEKNUM(A2).

What is the difference between WEEKNUM and ISOWEEKNUM?

+

WEEKNUM counts the week containing 1 January as week 1. ISOWEEKNUM uses the ISO standard, where week 1 is the week with the first Thursday of the year, so a date in early January can belong to week 52 or 53 of the year before.

Why does Excel say there are 53 weeks in a year?

+

A year has 52 weeks and one or two extra days, so the last few days of December often fall in a 53rd week. Both WEEKNUM and ISOWEEKNUM can return 53.

How do I show the week number with the year, like 2026-W03?

+

Join the year and a padded week number: =YEAR(A2)&"-W"&TEXT(WEEKNUM(A2,2),"00"). For ISO weeks, use the ISO year from =YEAR(A2-WEEKDAY(A2,2)+4) instead of YEAR(A2).

Can the TEXT function show a week number?

+

No. TEXT has codes for days, months and years but not for weeks. Get the number with WEEKNUM or ISOWEEKNUM, then use TEXT only to pad it, as in TEXT(WEEKNUM(A2),"00").

Sources

  • WEEKDAY function - Microsoft Support
  • TEXT function - Microsoft Support
  • DATE function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How to get the week number in Excel with WEEKNUM
  2. How to get ISO week numbers with ISOWEEKNUM
  3. Why WEEKNUM and ISOWEEKNUM give different week numbers
  4. How to show the week number with TEXT, like W03 or 2026-W03
  5. How to get the start date of the week instead
  6. How WEEKNUM works without WEEKNUM
  7. Common week number problems
  8. Practise it

Keep reading

Dates· 6 min read

WEEKDAY in Excel: Find Weekends and Day Names

The Excel WEEKDAY function returns the day of the week as a number: =WEEKDAY(date) gives 1 for Sunday through 7 for Saturday. Add a return type of 2, as in =WEEKDAY(date,2), to make Monday 1 and Sunday 7. Then =WEEKDAY(date,2)>5 is TRUE only for Saturdays and Sundays.

Conditional math· 6 min read

How to Sum by Week in Excel

List the first day of each week, then use SUMIFS with two date conditions: =SUMIFS(B:B,A:A,">="&D2,A:A,"<"&D2+7). It adds every amount dated on or after the week start in D2 and before the next week starts. To find the Monday of any date, use =A2-WEEKDAY(A2,2)+1. A pivot table grouped by 7 days also works.

Dates· 7 min read

Get the Quarter From a Date in Excel

Excel has no QUARTER function, so you calculate the quarter from a date's month: =ROUNDUP(MONTH(A2)/3,0) returns 1 to 4. Add a label with ="Q"&ROUNDUP(MONTH(A2)/3,0), or include the year with &" "&YEAR(A2). For a fiscal year starting in another month, shift the date first with EDATE.

More on dates

  • Calculate Working Hours Between Two Dates in Excel
  • YEAR, MONTH and DAY in Excel: Split a Date Into Parts
  • Year-to-Date Totals in Excel
  • YEARFRAC in Excel: Part of a Year Between Two Dates
  • Add Days, Months or Years to a Date in Excel
  • How to Add Hours and Minutes to a Time in Excel
All dates articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free