← Time & Date

Day of the Week Calculator

Find the weekday of any date from year 1 to 9999, see the formula worked out, and compare the same date in nearby years.

Date

Any date from 0001-01-01 to 9999-12-31. You can type the year directly.

Zeller's congruence

h = (q + ⌊13(m + 1) / 5⌋ + K + ⌊K / 4⌋ + ⌊J / 4⌋ + 5J) mod 7 0 = Saturday, 1 = Sunday, 2 = Monday … 6 = Friday

q is the day of the month, m the month with January and February counted as 13 and 14 of the previous year, K the year within the century, and J the century.

Day of the week
–
Relative to today–
Day of the year–
ISO week–
Leap year–

Zeller's congruence with your numbers

TermWorkingValue

The same date in nearby years

YearDateWeekday

    

About this tool

The Day of the Week Calculator tells you which weekday any calendar date falls on, past or future, for years 1 through 9999. Type a date and the weekday appears instantly along with how far it is from today, the day of the year, and the ISO week. Under the result the page works through Zeller's congruence step by step with your date's numbers so you can see how the weekday is derived, and a table lists the same month and day in the five years before and after, which is handy for spotting when an anniversary next lands on a weekend. It is useful for historians, genealogists, event planners, and anyone checking what day they were born.

How it works

The weekday shown comes from the browser's calendar, which treats every date as proleptic Gregorian. The worked example uses Zeller's congruence: with q the day of the month, m the month where January and February count as months 13 and 14 of the previous year, K the year within the century (year mod 100) and J the century (floor of year / 100), the weekday index is h = (q + floor(13(m + 1) / 5) + K + floor(K / 4) + floor(J / 4) + 5J) mod 7, where 0 is Saturday, 1 Sunday and so on through 6 Friday. The page's self-test confirms that Zeller's formula and the browser calendar agree for thousands of dates. Dates are built with setFullYear so years below 100 are not misread as 19xx.

Frequently asked questions

Does this give the right weekday for dates before 1582?

It gives the proleptic Gregorian weekday, which extends today's calendar rules backwards. Before the Gregorian reform (1582 in Catholic Europe, 1752 in Britain and its colonies, 1918 in Russia) documents used the Julian calendar, whose dates differ by 10 to 13 days. A date written in a Julian-era source would need converting to Gregorian first for the weekday to match.

What is Zeller's congruence?

A formula published by Christian Zeller in 1882 that computes the weekday of a Gregorian date from the day, month, and year using only integer arithmetic. Its trick is to start the year in March so the irregular February lands at the end, and to approximate the accumulated month lengths with floor(13(m + 1) / 5). The result is a number from 0 (Saturday) to 6 (Friday).

Why does the same date fall on a different weekday each year?

A common year has 365 days, which is 52 weeks plus one day, so a date moves forward one weekday from one year to the next. A leap year adds a second day, so a date after February 29 jumps two weekdays. The full pattern repeats every 28 years within a century and exactly every 400 years across the Gregorian cycle.

Which weekday is the most common for a given date?

Over the 400-year Gregorian cycle, 146,097 days, a given month and day falls on each weekday either 56, 57, or 58 times, so no weekday is much more common than another. One curiosity: the 13th of a month falls on a Friday 688 times in 400 years, slightly more often than on any other weekday.

Related tools

Life in Weeks · Age Calculator · Days Between Dates · Date Calculator · Countdown to a Date · Online Timer · Stopwatch · Pomodoro Timer · World Clock · Time Zone Converter · Meeting Time Planner · UTC Time Converter

Browse all Time & Date Tools, or go back to every free tool on HeroYears.