What Week Number Is It?

Instantly see the current ISO 8601 week number, with a full calendar of all weeks in the year.

Current Week Number
--
Loading...
Updates automatically every week
Year progress
--
Day of Year
--
Days Remaining
--
Quarter
--
Leap Year

All Week Numbers 2026

ISO 8601 week numbering · Weeks start on Monday

Week From (Monday) To (Sunday)

Programming Routines

Get the current ISO 8601 week number in your favourite language

Excel Microsoft Excel / LibreOffice Calc
=ISOWEEKNUM(TODAY())
Or in older versions: =WEEKNUM(TODAY(),21) where return type 21 is ISO-8601 (week starting on Monday).
In Excel 2007, use WEEKNUM(TODAY(),2) (2 = week starting Monday).
WEEKNUM(TODAY()) shows the week number with weeks starting on Sunday (return type = 1).
Sheets Google Docs Spreadsheet
=WEEKNUM(TODAY();21)
Type (here 21) is compatible with Excel/LibreOffice — 21 is ISO-8601.
PHP PHP
$weekNumber = date("W");
Or date("W", epoch) for other week numbers. Use capital W, not w.
Python Python
datetime.date.today().isocalendar()[1]
Perl PERL
my $weekNumber = POSIX::strftime("%V", gmtime time);
Replace time with other epoch/UNIX timestamps for other week numbers.
Java Java
Calendar now = Calendar.getInstance(); now.get(Calendar.WEEK_OF_YEAR);
Use WEEK_OF_YEAR in the Calendar class.
JS JavaScript
Date.prototype.getWeek = function () { var target = new Date(this.valueOf()); var dayNr = (this.getDay() + 6) % 7; target.setDate(target.getDate() - dayNr + 3); var firstThursday = target.valueOf(); target.setMonth(0, 1); if (target.getDay() != 4) { target.setMonth(0, 1 + ((4 - target.getDay()) + 7) % 7); } return 1 + Math.ceil((firstThursday - target) / 604800000); } var d = new Date(); alert(d.getWeek());
Extend the Date class using the above code.
C# C#
CultureInfo.CurrentCulture.Calendar.GetWeekOfYear( DateTime.Now, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday );
MySQL MySQL
SELECT WEEKOFYEAR(NOW())
Replace NOW() with other dates, e.g. SELECT WEEKOFYEAR('2026-02-20').
You can also use the WEEK function with mode=3: SELECT WEEK(NOW(), 3).
PostgreSQL PostgreSQL
SELECT EXTRACT(WEEK FROM CURRENT_DATE)
MS SQL MS SQL Server
SELECT DATEPART(wk, GETDATE())
Oracle Oracle
SELECT TO_CHAR(SYSDATE, 'IW') FROM DUAL
IW: Week of year (1-52 or 1-53) based on ISO-8601.
WW: Week of year (1-53) where week 1 starts on the first day of the year (mostly NOT used).
iSeries iSeries SQL
SELECT WEEK(NOW()) FROM sysibm.sysdummy1
Obj-C iPhone / Mac (Objective-C)
[NSString stringWithFormat:@"Week %d", [calendar ordinalityOfUnit:NSWeekCalendarUnit inUnit:NSYearCalendarUnit forDate:date]];
Swift iPhone / iOS / Swift
let gregorian = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian)! gregorian.firstWeekday = 2 // Monday gregorian.minimumDaysInFirstWeek = 4 let components = gregorian.components( .WeekOfYearCalendarUnit | .YearForWeekOfYearCalendarUnit, fromDate: date) let week = components.weekOfYear let year = components.yearForWeekOfYear
R R
lubridate::week()
Ruby Ruby
week_number = Time.now.strftime("%V")
Replace Time.now with Time.local(year, month, day) for other dates.
Formats: %U — week starting Sunday · %V — ISO-8601 · %W — week starting Monday.
Go Go
year, week := time.Now().ISOWeek()
Bash Linux / Unix Shell (Bash)
date +%V
Returns the ISO-8601 week number. See man date for more formats.
Lua Lua
Current_week = os.date("%V")
PowerShell Windows PowerShell
Get-Date -UFormat %V # or "{0:d2}" -f ($(Get-Culture).Calendar.GetWeekOfYear( $(Get-Date), [System.Globalization.CalendarWeekRule]::FirstFourDayWeek, [DayOfWeek]::Monday))
X++ X++ (Microsoft Dynamics AX)
int weeknum; weeknum = weekOfYear(today());
C/AL C/AL (Microsoft Dynamics NAV)
MESSAGE(FORMAT(CALCDATE('CW', TODAY), 0, '<week>'));