Day of the Week Calculator

Day of the Week Calculator

Popular AI Skill PRO

Enter Calculation

Formula

h=(d+⌊13(m+1)5⌋+K+⌊K4⌋+⌊J4⌋+5J)mod7Weekday index=(h+6)mod7(0=Sunday)where{d=Daym={Month+12,Month<3Month,otherwiseY={Year−1,Month<3Year,otherwiseK=Ymod100J=⌊Y100⌋\begin{gathered} h = \left( d + \left\lfloor \frac{13(m+1)}{5} \right\rfloor + K + \left\lfloor \frac{K}{4} \right\rfloor + \left\lfloor \frac{J}{4} \right\rfloor + 5J \right) \bmod 7 \\[0.6em] \text{Weekday index} = (h + 6) \bmod 7 \quad (0=\text{Sunday}) \\[1.5em] \text{where}\quad \left\{ \begin{aligned} d &= \text{Day} \\ m &= \begin{cases} \text{Month} + 12, & \text{Month} < 3 \\ \text{Month}, & \text{otherwise} \end{cases} \\ Y &= \begin{cases} \text{Year} - 1, & \text{Month} < 3 \\ \text{Year}, & \text{otherwise} \end{cases} \\ K &= Y \bmod 100 \\ J &= \left\lfloor \frac{Y}{100} \right\rfloor \end{aligned} \right. \end{gathered}
Show calculation steps (1)
  1. Leap Year Test and Day Clamping

    Leap=(Ymod4=0andYmod100≠0)or(Ymod400=0)d=min⁡(max⁡(Day,1),Lm)where{Y=YearLm=days in Month(29 for February if Leap)\begin{gathered} \text{Leap} = \left( Y \bmod 4 = 0 \ \text{and}\ Y \bmod 100 \neq 0 \right) \ \text{or}\ \left( Y \bmod 400 = 0 \right) \\[0.6em] d = \min\left( \max\left( \text{Day},\ 1 \right),\ L_{m} \right) \\[1.5em] \text{where}\quad \left\{ \begin{aligned} Y &= \text{Year} \\ L_{m} &= \text{days in } \text{Month} \ (29 \text{ for February if Leap}) \end{aligned} \right. \end{gathered}

    The Year is a leap year when divisible by 4 but not by 100, unless divisible by 400; February then has 29 days and the Day entry is clamped to the length of the selected Month.

Usage stats

Advertisement

Results

Day of the Week
Tuesday
November 17, 2026 is a Tuesday
Day Number of the Year 321
Days in Year 365
Nth Weekday of Month 3rd Tuesday of November 2026
Count of That Weekday in Month 4
Days in Month 30

Report an error on this page

What is the Day of the Week Calculator?

This tool tells you which day of the week any calendar date falls on. Enter a month, day and year and it returns the weekday name plus a set of useful calendar facts: the day-number of the year, how many days are in that month and year, which ordinal occurrence of the weekday the date is (for example the "3rd Monday"), and how many times that weekday occurs in the month. It uses the proleptic Gregorian calendar, so it works for any past or future year and is valid worldwide.

How to use it

Choose the month and year, type the day, and pick the output language for the weekday name. Press calculate to see a plain-language sentence such as "June 15, 2026 is a Monday" along with a breakdown table. The day input is validated against the real length of the chosen month, so impossible dates such as February 30 are rejected.

Circular modulo 7 wheel mapping remainder values 0 to 6 to weekdays
The result \(h\) is taken mod 7, landing on one of seven weekday positions.

The formula explained

The weekday is found with Zeller's congruence. January and February are treated as months 13 and 14 of the previous year. With \(K = \text{year} \bmod 100\) and \(J = \left\lfloor \text{year} / 100 \right\rfloor\), the term $$h = \left( d + \left\lfloor \frac{13(m+1)}{5} \right\rfloor + K + \left\lfloor \frac{K}{4} \right\rfloor + \left\lfloor \frac{J}{4} \right\rfloor + 5J \right) \bmod 7$$ gives a value where 0 = Saturday and 1 = Sunday. We convert that to a Sunday=0..Saturday=6 index. Leap years follow the Gregorian rule: divisible by 4, except centuries unless divisible by 400.

Advertisement

Worked example

For June 15, 2026: \(K = 26\), \(J = 20\), \(\left\lfloor 13 \cdot 7 / 5 \right\rfloor = 18\), so $$h = (15 + 18 + 26 + 6 + 5 + 100) \bmod 7 = 170 \bmod 7 = 2 = \text{Monday}.$$ June has 30 days, the date is day 166 of a 365-day year, it is the 3rd Monday, and June 2026 contains 5 Mondays.

Diagram mapping a date to Zeller's congruence variables d, m, J, K
How the day, month, century (\(J\)) and year-of-century (\(K\)) map into the formula's variables.

FAQ

Does it work for very old dates? Mathematically yes, but before October 1582 most of Europe used the Julian calendar, so historical weekdays may differ. This tool always uses the proleptic Gregorian calendar.

Does the week start on Sunday or Monday? The weekday math is calendar-agnostic. We index Sunday as 0, but this only affects table display, not the computed result.

Why offer multiple languages? The weekday name is display-only; selecting a language simply translates the label while the underlying date math stays identical.

Last updated:

Most popular in Time and Date

View all Time and Date calculators