Date & Time

WEEKNUM Formula

WEEKNUM returns the week number of a date within the year, where week 1 is the week containing January 1st. The return_type argument controls which day starts the week. It is useful for weekly reporting, grouping data by week, and production scheduling.

Syntax

WEEKNUM(serial_number, [return_type])
ParameterDescription
serial_number Parameter of the WEEKNUM function.
[return_type] (Optional.) Parameter of the WEEKNUM function.
Try WEEKNUM in Viztab — free, no signup

Examples

Week number (Sunday start)

Formula
=WEEKNUM("2026-04-09")
Returns 15 — April 9, 2026 falls in the 15th week of the year using the default Sunday-start system.

Week number (Monday start)

Formula
=WEEKNUM("2026-04-09", 2)
Returns 15 using Monday as the first day of the week. The result may differ from the Sunday-start version for dates near week boundaries.

Group by week

Formula
="Week " & WEEKNUM(A1, 2) & " - " & YEAR(A1)
Creates labels like "Week 15 - 2026" for grouping transactions or events by week in pivot-style reports.

Common Errors

#VALUE!

Occurs when the date is not valid or return_type is not a recognized option.

#NUM!

Occurs for date serial numbers outside the valid range.

Tips

Not ISO week numbers

WEEKNUM uses a US convention where week 1 always contains Jan 1. For ISO 8601 week numbering (used in Europe), use ISOWEEKNUM instead.

Return types

1 (default) = Sunday start, 2 = Monday start. Types 11-17 allow any day as week start. Most business reporting uses type 2 (Monday start).

Year boundary quirk

Dec 31 is always in week 52 or 53 of the current year with WEEKNUM. ISO week numbering may place it in week 1 of the next year.

Try WEEKNUM in Viztab

Import your data and use WEEKNUM with 370+ other formulas. No signup required.

Open Viztab

Related Formulas