Weekday Finder
Find the day of the week for any past or future date.
About the Weekday Finder
The Weekday Finder tells you which day of the week (Monday through Sunday) corresponds to any date — past, present, or future. Behind the simple lookup is a deep problem: the calendar we use today (the Gregorian calendar, introduced by Pope Gregory XIII in 1582) repeats every 400 years, but a 400-year cycle contains 146,097 days, which is divisible by 7 — so the weekday pattern repeats every 400 years exactly. The cycle includes 97 leap years and 303 common years.
The algorithm to compute the weekday of an arbitrary date without a calendar is called Zeller’s congruence (1882) or the Doomsday algorithm (John Conway, 1973). Both reduce to modular arithmetic on the year, month, and day. Modern computers do not need these algorithms — the Date object computes weekdays directly via getDay(), which returns 0 (Sunday) through 6 (Saturday).
This tool also computes the day of year (1–365 or 1–366 for leap years), the ISO 8601 week number (1–53), the calendar quarter, and the days remaining in the year. The ISO 8601 week numbering system is used in European business contexts — week 1 is the week containing the first Thursday of the year, which means January 1 may fall in week 52 or 53 of the previous year.
How It Works
The weekday is obtained from new Date(year, month, day).getDay(), which returns 0 for Sunday, 1 for Monday, ..., 6 for Saturday. JavaScript’s Date uses the Gregorian calendar proleptically — dates before 1582 (when the Gregorian calendar was introduced) are treated as if it had applied retroactively. This matches ISO 8601 and modern computing conventions but is historically inaccurate for events recorded under the Julian calendar.
The day of year is computed as Math.floor((date - new Date(year, 0, 0)) / 86400000). The trick is new Date(year, 0, 0) — JavaScript’s Date constructor accepts out-of-range arguments and rolls them over, so new Date(2025, 0, 0) returns December 31, 2024 (the ‘0th’ day of January rolls back to the last day of the previous December). Subtracting this from the target date gives the number of days since January 1 — the day of year.
The ISO 8601 week number is trickier. ISO 8601 defines week 1 as the week containing the year’s first Thursday, which is equivalent to the week containing January 4. To compute it: find the Thursday of the current week (by adjusting the date by the day-of-week offset), then compute the number of weeks between that Thursday and January 1 of the same year. The result is a number from 1 to 52 or 53 (years with 53 weeks occur when January 1 is a Thursday in a non-leap year, or a Wednesday in a leap year).
The leap-year check follows the Gregorian rule: a year is a leap year if it is divisible by 4, except centuries, except quadricenturies. So 2000 was a leap year, 1900 was not, 2024 is, 2025 is not.
Worked Examples
March 8, 2025 is a Saturday. Day of year: 67 (31 days in January + 28 in February + 8 in March). ISO 8601 week: 10. Quarter: Q1. Days remaining: 298.
January 1, 2000 was a Saturday — the famous Y2K rollover happened on a Saturday, which is why the ‘Y2K bug’ did not cause widespread outages (most offices were closed). Day of year: 1. ISO week: 52 of 1999 (because January 1, 2000 was a Saturday, the week containing January 1 was the last week of 1999 per ISO 8601 rules).
February 29, 2024 was a Thursday — the leap day in 2024. Days remaining in year after February 29: 306 (366 total − 60 days through February 29).
December 31, 2024 was a Tuesday — ISO week 1 of 2025 (because December 31, 2024 was a Tuesday and the week containing January 1, 2025 was the first week of 2025 per ISO rules). This is one of the confusing edge cases that ISO 8601 was designed to handle consistently.
When to Use This Tool
- Verifying the day of the week for an event in the past or future (e.g. ‘what day of the week was July 4, 1776?’ — Thursday).
- Scheduling recurring events — ‘the third Thursday of each month’ requires knowing which dates fall on Thursdays.
- Calculating age in weeks for newborns (often used in pediatric contexts).
- Determining which quarter a date falls in for financial reporting.
- Validating date inputs in forms — if a user enters ‘February 30’, the
Dateobject rolls over to March 2, which the day-of-year output reveals. - Finding day-of-year numbers for astronomical observations, inventory cycles, or seasonal analytics.
- ISO 8601 week numbering for European business reports (weekly sales by ISO week, manufacturing WEEKNR() functions in Excel).
Limitations & Disclaimer
The tool uses JavaScript’s Date object, which implements the proleptic Gregorian calendar defined in ISO 8601. Dates before 1582 are treated as if the Gregorian calendar applied retroactively, which is historically inaccurate — for research involving pre-Gregorian dates, use a dedicated Julian-to-Gregorian conversion tool. ISO 8601 week numbering is used (week 1 = week containing the year’s first Thursday). The Unix timestamp is computed at noon UTC on the entered date to avoid DST ambiguities. For pre-1970 timestamps, the tool returns a negative number (valid in JavaScript but unusual). See our disclaimer for full terms.
Frequently Asked Questions
Why does JavaScript’s getDay() return 0 for Sunday, not 1 for Monday?
JavaScript follows the American convention where Sunday is the first day of the week. ISO 8601 (international standard) uses Monday as the first day. To convert: <code>isoDay = (jsDay + 6) % 7</code> gives 0 for Monday, 6 for Sunday. Most European business logic uses ISO day numbering.
What is ISO 8601 week numbering?
ISO 8601 defines week 1 as the week containing the year’s first Thursday (equivalently, the week containing January 4). This means January 1 may fall in week 52 or 53 of the previous year. The system is used in European business contexts (manufacturing, retail, finance) and is the basis for Excel’s <code>ISOWEEKNUM()</code> function. Years with 53 weeks occur when January 1 is a Thursday in a non-leap year, or a Wednesday in a leap year.
How accurate is the weekday for dates before 1582?
Not historically accurate. JavaScript’s <code>Date</code> uses the Gregorian calendar proleptically — it treats the Gregorian calendar as if it had applied retroactively to all dates. In reality, dates before 1582 were recorded under the Julian calendar (which drifted by about 10 days by the time of the Gregorian reform). For historical research, use a dedicated Julian-to-Gregorian conversion tool.
Why does the tool report the Unix timestamp?
The Unix timestamp (seconds since 1970-01-01 UTC) is a useful cross-system identifier for the date. Databases, file systems, and APIs often use Unix timestamps. The tool reports the timestamp at noon UTC on the entered date to avoid DST ambiguities.
How do I find the day of the week without a computer?
Use the Doomsday algorithm (John Conway, 1973). The key insight: in any year, certain ‘doomsday’ dates always fall on the same weekday: 4/4, 6/6, 8/8, 10/10, 12/12, plus 5/9, 9/5, 7/11, 11/7 (mnemonic: ‘I work 9 to 5 at the 7-11’), plus the last day of February. Memorize the doomsday for the year (a 1–2 digit calculation), and any date’s weekday follows by counting days from the nearest doomsday.
Why does the week start on Sunday in the US but Monday in Europe?
Religious and cultural tradition. In the Christian tradition, Sunday is the Sabbath (the day of rest) and the first day of the week. In the Jewish tradition, Saturday is the Sabbath and the first day of the week starts on Sunday. ISO 8601 standardized on Monday as the first day for international business purposes. Calendar apps typically let you choose; the US default is Sunday-first, the European default is Monday-first.
Last updated: September 9, 2026 · Author: HT99 Tools Editorial Team