Excel guide · 6 min read
How to get the week number from a date in Excel
=ISOWEEKNUM(A2) for ISO 8601 weeks (Monday start, used across Europe), or =WEEKNUM(A2) for US-style weeks that start on Sunday with week 1 containing 1 January. =WEEKNUM(A2,2) also counts from 1 January but starts weeks on Monday. Near New Year the systems disagree, so pick one and label it.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Date | ISO year | ISO week | Week label | |
| 2 | Dec 29, 2025 | 2026 | 53 | 2026-W53 | |
| 3 | Jan 1, 2026 | 2027 | 1 | ||
| 4 | Jan 4, 2026 | ||||
| 5 | Nov 4, 2026 | ||||
| 6 | Dec 31, 2026 | ||||
| 7 | Jan 1, 2027 | ||||
| 8 | Jan 3, 2027 | ||||
| 9 | Jan 4, 2027 | ||||
| 10 | Dec 31, 2028 |
Download this sheet as an Excel practice file (.xlsx)
WEEKNUM and its return types
WEEKNUM(date) uses "week 1 is the week with 1 January in it", and weeks start on Sunday. The second argument only changes the start day: 1 or 17 is Sunday, 2 or 11 is Monday, and 12 to 16 are Tuesday to Saturday. The one exception is 21, which switches to ISO weeks and gives the same results as ISOWEEKNUM. Types 11 to 21 need Excel 2010 or later.
Because week 1 starts on 1 January whatever day that is, it is often a short week. 1 January 2026 is a Thursday, so with WEEKNUM(A3) week 1 is only Thursday to Saturday, and Sunday 4 January is already week 2. With WEEKNUM(A4,2), weeks start on Monday, so Sunday the 4th is still week 1. Same date, two answers.
Most of the year all the systems agree: Wednesday 4 November 2026 is week 45 in every one of them. The differences sit in the first and last few days of the year, which is exactly where weekly reports go wrong.
Result: 2 vs 1
2 vs 1: Sunday 4 January 2026 is week 2 with Sunday-start weeks, week 1 with Monday-start weeks.
ISOWEEKNUM and the ISO year
ISO weeks always run Monday to Sunday, and week 1 is the week that contains the first Thursday of the year (the same thing as the week with 4 January in it). There are no short weeks: every ISO week has 7 days, and a year has 52 or 53 of them. ISOWEEKNUM is in Excel 2013 and later; in older versions use WEEKNUM(A2,21).
The catch is that the days around New Year can belong to the other year's weeks. 2026 starts on a Thursday, so it has 53 ISO weeks, and Friday 1 January 2027 is in week 53 of 2026, not week 1 of 2027. It also works the other way: Monday 29 December 2025 is week 1 of 2026.
So a label like YEAR(A7)&"-W"&ISOWEEKNUM(A7) produces "2027-W53", a week that does not exist (2027 has 52). The ISO year is the year of that week's Thursday: A7-WEEKDAY(A7,2)+4 jumps to the Thursday, and YEAR of that is the right year. TEXT(...,"00") pads single digits so labels like 2026-W05 sort correctly as text.
Result: 2026-W53
2026-W53: Friday 1 January 2027 belongs to the last ISO week of 2026. The same formula gives 2026-W01 for Monday 29 December 2025.
Week number back to a date
Planning sheets and supplier files often give you "week 53" and nothing else. To get the Monday of ISO week n in year y, start from 4 January, which is always in week 1, step back to its Monday, then add whole weeks: =DATE(y,1,4)-WEEKDAY(DATE(y,1,4),3)+(n-1)*7. WEEKDAY with return type 3 counts Monday as 0 and Sunday as 6, so it is exactly the number of days to step back.
With the year in C2 and the week in D2, week 53 of 2026 starts on Monday 28 December 2026. Add 6 for the Sunday it ends on, 3 January 2027. Week 1 of 2027 starts on Monday 4 January. If the label sits in one cell like "2026-W53", feed LEFT(E2,4) and RIGHT(E2,2) into the same formula.
The shortcut DATE(y,1,1)+(n-1)*7 looks right but is not: for week 53 of 2026 it gives Thursday 31 December, the wrong day of the week. To check how many ISO weeks a year has, use =ISOWEEKNUM(DATE(y,12,28)); 28 December is always in the last week. It returns 53 for 2020, 2026 and 2032 and 52 for 2027.
Result: Mon 28 Dec 2026
Mon 28 Dec 2026: the first day of ISO week 53 of 2026.
Week commencing and week ending dates
For reports, a date usually beats a number. "w/c 2 Nov" never repeats across years and tells the reader which week it is. =A2-WEEKDAY(A2,2)+1 takes any date back to its Monday (sum-by-week-in-excel builds weekly totals on this). For Sunday-start weeks use =A2-WEEKDAY(A2)+1.
Payroll and timesheets often want the week ending date instead, usually a Friday or Sunday. =A2+MOD(6-WEEKDAY(A2),7) moves forward to the next Friday, or stays put if the date already is one; 6 is Friday in WEEKDAY's default numbering. Wednesday 4 November 2026 becomes Friday 6 November, and Sunday 3 January 2027 becomes Friday 8 January. For a Sunday end, use =A2+MOD(1-WEEKDAY(A2),7).
Result: Fri 6 Nov 2026
Fri 6 Nov 2026: the week ending date for Wednesday 4 November.
Week of the month
"Week of the month" has two meanings, and they give different answers. Days 1 to 7 as week 1, 8 to 14 as week 2 and so on is =INT((DAY(A2)-1)/7)+1. That is the "which Tuesday is it" count used for rotas like "2nd and 4th week".
Calendar rows are the other meaning: the row of a wall calendar the date sits on. Take the week number of the date minus the week number of the 1st of its month, plus 1: =WEEKNUM(A5,2)-WEEKNUM(DATE(YEAR(A5),MONTH(A5),1),2)+1. November 2026 starts on a Sunday, so with Monday-start weeks Sunday the 1st is a row on its own, Wednesday 4 November is in row 2, and Monday 30 November is row 6. The days-1-to-7 count says 4 November is week 1. Agree which one the report means before you build it.
Result: 2
2: on a Monday-start calendar, 4 November 2026 is in the second row of the month. =INT((DAY(A5)-1)/7)+1 gives 1.
Which week number should you use?
Use ISOWEEKNUM with the ISO year label if you work with European colleagues, retail or manufacturing calendars, or any system that prints "W53": the weeks are always whole and the numbering is a published standard. Use WEEKNUM (Sunday start) when you need to match US calendars or an existing US report. WEEKNUM(date,2) matches neither standard's full rules, so only use it when a report has always been built that way.
Watch the edge cases with WEEKNUM. It can return 53, and in a leap year that starts on a Saturday it even returns 54: 2028 starts on a Saturday, so Sunday 31 December 2028 is WEEKNUM 54 while ISOWEEKNUM gives 52. A chart or lookup table sized for 52 weeks will silently drop those days.
To count or sum the rows in one week, filter on the dates rather than the number. =COUNTIFS(A2:A10,">="&start,A2:A10,"<"&start+7) with start set to Monday 28 December 2026 finds the 3 dates in that week, even though they span two calendar years.
Result: 54 vs 52
54 vs 52: Sunday 31 December 2028 is the 54th WEEKNUM week, but ISO week 52.
Common mistakes
Labelling ISO weeks with the calendar year
1 January 2027 becomes "2027-W53". Take the year of the week's Thursday: YEAR(A2-WEEKDAY(A2,2)+4).
Assuming WEEKNUM(date,2) is the ISO week
It starts on Monday but still counts from 1 January with a short first week. Use ISOWEEKNUM or WEEKNUM(date,21) for ISO.
Turning week n into a date with DATE(y,1,1)+(n-1)*7
That lands on whatever weekday 1 January is. Use DATE(y,1,4)-WEEKDAY(DATE(y,1,4),3)+(n-1)*7 for the ISO Monday.
Tables sized for 52 weeks
ISO years can have 53 weeks and WEEKNUM can reach 54. Check with ISOWEEKNUM(DATE(y,12,28)).
FAQ
How do I get the week number from a date in Excel?
Use =ISOWEEKNUM(A2) for ISO weeks or =WEEKNUM(A2) for Sunday-start weeks counted from 1 January. Both return a number from 1 to 53 (WEEKNUM can occasionally reach 54).
Why does Excel say 1 January is week 53?
You are using ISOWEEKNUM (or WEEKNUM with 21). In ISO weeks, the first days of January belong to the previous year's last week when 1 January falls on a Friday, Saturday or Sunday, as in 2027.
How do I convert a week number to a date in Excel?
For ISO weeks, the Monday of week n in year y is =DATE(y,1,4)-WEEKDAY(DATE(y,1,4),3)+(n-1)*7. Add 6 for the Sunday at the end of that week.
How do I show the week number of today?
Use =ISOWEEKNUM(TODAY()) or =WEEKNUM(TODAY()). Add the ISO year with =YEAR(TODAY()-WEEKDAY(TODAY(),2)+4)&"-W"&TEXT(ISOWEEKNUM(TODAY()),"00") for a full label.
Can a number format show the week number?
No. Excel's number formats and TEXT have no week code, so use WEEKNUM or ISOWEEKNUM in a formula, or a helper column, and build any label with TEXT around it.
Functions used
WEEKNUMWeek number of a dateISOWEEKNUMISO week numberWEEKDAYDay of the week as a numberDATEBuilds a dateYEARYear of a dateMONTHMonth numberDAYDay of the monthTEXTNumber to formatted textINTRounds down to integerMODRemainder after divisionLEFTCharacters from the startRIGHTCharacters from the endCOUNTIFSCounts with several conditionsTODAYToday’s date
Related guides
- How to sum by week in Excel
- How to get the day of the week from a date in Excel
- How to calculate weeks between two dates in Excel
- How to find the nth weekday of a month in Excel
- How to get the first day of the month in Excel
- How to find the last day of the month in Excel
- How to use a custom formula in Excel Data Validation
Updated