# Day of the Week Calculator - Weekday, Day of the Year and ISO Week Number

Page: https://hirantha.me/tools/day-of-week-calculator
Part of: Hirantha Sandaruwan Lakshan free tools (https://hirantha.me/tools)
Updated: 2026-10-13

Find the weekday of any date from 1583 to 9999, plus the day of the year, ISO week number, leap year check and days left in the year.

This is a free tool that runs in the browser: open the page to use it. File tools process files on the visitor's own device; files are never uploaded or stored. No account, sign-up, payment or watermark.

Type or pick a date to see which day of the week it was or will be, which day of the year it is, its ISO 8601 week number, whether the year is a leap year and how many days are left. It works for any date from 1583 to 9999 in the Gregorian calendar, in your browser, with nothing sent anywhere.

The tool turns the date into a count of days since 1 January 1970, which was a Thursday, using whole-number arithmetic (Howard Hinnant's published algorithm), and takes that count modulo 7 to get the weekday. The same method works for every year in range and does not depend on your time zone.

You can do it by hand with Zeller's congruence: h = (q + floor(13(m + 1) / 5) + K + floor(K / 4) + floor(J / 4) - 2J) mod 7. Here q is the day of the month, m the month counted from March = 3 (January and February count as months 13 and 14 of the previous year), K the year of the century and J the century. Then h = 0 is Saturday, 1 is Sunday, 2 is Monday and so on. For 13 October 2026: q = 13, m = 10, K = 26, J = 20, so h = (13 + 28 + 26 + 6 + 5 - 40) mod 7 = 38 mod 7 = 3, a Tuesday.

The day of the year counts 1 January as 1. A year is a leap year if it is divisible by 4, except century years that are not divisible by 400, so 2000 and 2028 are leap years and 1900 and 2100 are not. A leap year has 366 days and 29 days in February.

ISO 8601 weeks start on Monday, and week 1 is the week with the year's first Thursday. So the first days of January can belong to week 52 or 53 of the previous year, and the last days of December to week 1 of the next. A year has 53 weeks if 1 January is a Thursday, or if it is a leap year that starts on a Wednesday. Otherwise it has 52.

Dates before the Gregorian reform of October 1582 would be proleptic, meaning the Gregorian rules applied backwards, so the tool does not handle them. Countries also adopted the calendar at different times (Britain and its colonies in 1752, Russia in 1918, Greece in 1923), so a date written in an older Julian-calendar record names a different day.

Q: What day of the week was I born?
A: Enter your date of birth. For example, 15 March 1990 was a Thursday. The age calculator on this site also shows the weekday of the birth date.

Q: How do I find the week number of a date?
A: Enter the date and read the ISO week number. For example, Tuesday 13 October 2026 is in week 42. Weeks run from Monday to Sunday, and the tool also shows the dates the week covers.

Q: Why is 1 January sometimes in week 52 or 53?
A: ISO weeks belong to the year that holds their Thursday. 1 January 2027 is a Friday, so it is in the last week of 2026, week 53, and week 1 of 2027 begins on Monday 4 January 2027.

Q: Is 1900 a leap year? What about 2100?
A: No for both. A century year is a leap year only if it is divisible by 400, so 2000 was a leap year but 1900 and 2100 are not. The Gregorian calendar has 97 leap years in every 400 years.

Q: How many days are left in the year?
A: The tool counts the days after the chosen date. 13 October 2026 is day 286 of 365, which leaves 79 days until 31 December.

Q: Does this work for dates before 1583?
A: No. The Gregorian calendar began in October 1582 and was adopted at different times in different countries, so an older date could mean a different day on the calendar then in use. The tool accepts 1583 to 9999 and says so for anything else.

Q: Does my time zone change the answer?
A: No. A date has the same weekday everywhere, and the tool works on calendar dates only. Only the default for 'today' uses the date in Sri Lanka (Asia/Colombo, UTC+5:30).

Sources: ISO week date - Wikipedia (https://en.wikipedia.org/wiki/ISO_week_date); Zeller's congruence - Wikipedia (https://en.wikipedia.org/wiki/Zeller%27s_congruence); Leap year - Wikipedia (https://en.wikipedia.org/wiki/Leap_year); Gregorian calendar - Wikipedia (https://en.wikipedia.org/wiki/Gregorian_calendar); Howard Hinnant: chrono-Compatible Low-Level Date Algorithms (https://howardhinnant.github.io/date_algorithms.html)

Related tools:

- [Age calculator (years, months and days)](https://hirantha.me/tools/age-calculator.md): Exact age in years, months and days, days, weeks and hours lived, the next birthday and its weekday, and the age on any date.
- [Days between two dates calculator](https://hirantha.me/tools/date-difference-calculator.md): Count the days between two dates in weeks, months and years, with business days, an end-date option and Sri Lanka holidays left out if you like.
- [Date calculator (add or subtract days, months, years)](https://hirantha.me/tools/date-calculator.md): Add or subtract years, months, weeks and days from any date, or count working days, and see the weekday of the result.
- [Timestamp converter](https://hirantha.me/tools/timestamp-converter.md): Convert between Unix epoch time and human-readable dates.
