How to get the week number of a date
✓ Verified in LibreOffice 25.8.7.3Find which week of the year a date falls in — for weekly reports and grouping.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =WEEKNUM(A2) | US convention: week 1 contains Jan 1, weeks start Sunday. Use ISOWEEKNUM for the ISO standard. |
| Google Sheets | =WEEKNUM(A2) | Identical, including ISOWEEKNUM. |
| LibreOffice Calc | =WEEKNUM(A2) | Identical. |
How it works
WEEKNUM's default numbering calls the week containing January 1 "week 1" and starts weeks on Sunday — July 21, 2026 lands in week 30. Businesses in Europe usually want ISO week numbers instead (weeks start Monday; week 1 is the one containing the first Thursday): that's ISOWEEKNUM(A2), which can differ by 1 from WEEKNUM near year boundaries — the classic source of off-by-one week reports.
Verified, not just documented
We ran =WEEKNUM(DATE(2026,7,21)) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 30 — exactly the expected result. Every formula here is confirmed by actually executing it.