HomeEveryday Life › Day of the Week Calculator

Day of the Week Calculator

Returns the weekday of any Gregorian date together with its day-of-year number, the ISO 8601 week number and week-based year, and whether it falls on a weekend.

When to use

You need to know what weekday a date falls on, its ISO week number, or its ordinal day in the year.

Do not use when: You need to count days between dates (use date-difference) or determine leap years (use leap-year).

Formula

day_of_year = date − 1 January + 1; ISO week: take the Thursday of the same Monday-based week, iso_week = floor((day_of_year(Thursday) − 1) / 7) + 1 and iso_week_year = year of that Thursday

Inputs

ParameterTypeUnitRequiredDescription
datedatedefault todayAny date in the proleptic Gregorian calendar (YYYY-MM-DD); defaults to the current UTC date.

Outputs

OutputTypeUnitDescription
weekdaystringDay of the week.
day_of_yearintegerOrdinal day number, 1 January = 1.
days_remaining_in_yearintegerdaysDays after this date until 31 December.
iso_weekintegerISO 8601 week number (1–53); weeks start on Monday and week 1 contains the year's first Thursday.
iso_week_yearintegerYear the ISO week belongs to (can differ from the calendar year around New Year).
iso_week_datestringDate in ISO week-date notation YYYY-Www-D (D: 1 = Monday … 7 = Sunday).
is_weekendbooleantrue for Saturday or Sunday.
days_in_yearinteger365 or 366.

Example

2026-09-23: {"date":"2026-09-23"}{"weekday":"Wednesday","day_of_year":266,"days_remaining_in_year":99,"iso_week":39,"iso_week_year":2026,"iso_week_date":"2026-W39-3","is_weekend":false,"days_in_year":365}

2021-01-01 (belongs to ISO week 53 of 2020): {"date":"2021-01-01"}{"weekday":"Friday","day_of_year":1,"days_remaining_in_year":364,"iso_week":53,"iso_week_year":2020,"iso_week_date":"2020-W53-5","is_weekend":false}

GET https://tttkmbb.com/api/v1/calculate/day-of-week?date=2026-09-23

Machine access

Sources

FAQ

Why can the ISO week year differ from the calendar year?

ISO weeks run Monday–Sunday and week 1 is the week containing the first Thursday of January, so 29–31 December can belong to week 1 of the next year and 1–3 January to week 52/53 of the previous year.

Are US-style week numbers (weeks starting Sunday) supported?

No. Only the ISO 8601 definition is returned; US calendars that start weeks on Sunday and call 1 January week 1 can differ by one.

Related calculators