Skip to main content
Calcimator

Day of Week

Day of week for any Gregorian date (Sakamoto method).

About this calculator

This calculator finds the day of the week for any Gregorian calendar date using Sakamoto's algorithm, a compact closed-form formula rather than a lookup table or a full calendar library. It adjusts the year backward by one whenever the month is January or February (line 9), then combines that adjusted year with century and leap-year correction terms and a fixed per-month offset before taking the result modulo 7 (line 10) -- the same century rule real calendars use, so 1900 (not divisible by 400) and 2000 (divisible by 400) get different corrections even though both are divisible by 100. The result, 0 through 6, maps directly to Sunday through Saturday.

Month and Day are each floored and clamped before the formula runs -- Month to 1-12 and Day to 1-31 regardless of what month was chosen (lines 17-18); Year is floored with a fallback default but not clamped to any range (line 16) -- which means the calculator will still return a weekday for a date that does not exist on a real calendar, such as day 31 in a 30-day month or February 30th; it has no separate check for calendar validity, only for the input ranges on Month and Day. Because the underlying formula is genuinely modular arithmetic, no single input can be said to move the weekday result in one consistent direction the way a linear formula would: adding a week always returns to the same weekday, but adding a handful of days can land on an earlier weekday index than a smaller change did, and the algorithm's own year-adjustment step means a change in Year alone does not shift the result by a fixed, predictable amount either. Reading the weekday off the Index (0=Sun) field or the Weekday label always agrees with a real calendar's day of the week for any year the formula supports.

Inputs

Results

Weekday

Friday

Index (0=Sun)5
How to Use This Calculator
  1. Enter a four-digit year.
  2. Enter the month (1-12) and day (1-31).
  3. The calculator uses the Sakamoto algorithm to determine the day of the week for any Gregorian date.
  4. View the weekday name and numeric index (0 = Sunday through 6 = Saturday).

Recommended for this calculation

We may earn a commission if you sign up through these links.

MARATHON

Never lose track of time across zones

MARATHON Atomic Travel Alarm Clock, Six Time Zones

See on Amazon
AT-A-GLANCE

See your whole year at a glance

AT-A-GLANCE 2026 Wall Calendar, Monthly, 24 x 36 in

See on Amazon
GOWENIC

Count down to the day that matters

GOWENIC LCD Digital Countdown Timer Clock

See on Amazon

MARATHON: As an Amazon Associate I earn from qualifying purchases.

AT-A-GLANCE: As an Amazon Associate I earn from qualifying purchases.

GOWENIC: As an Amazon Associate I earn from qualifying purchases.

What each input means

Year
Four-digit year.
Month
1–12.
Day
Day of month.

How this is calculated

Formula

Day = (y + ⌊y/4⌋ − ⌊y/100⌋ + ⌊y/400⌋ + t[m−1] + d) mod 7 (Sakamoto's algorithm)

Engine last updated . Checked against 3 independently-derived tests how we verify calculators.

Frequently Asked Questions

Why does the calculator sometimes return the same weekday when I only change the month?

Because the algorithm's per-month offset table and its year-adjustment step (line 9) are both fixed corrections built around the calendar's real month lengths -- when a month is exactly four weeks long, as February is in a non-leap year, sliding the same day-of-month from that February into the following March lands on the identical weekday, since 28 days is an exact multiple of 7.

Can I enter a date that doesn't actually exist, like April 31st?

Yes, and the calculator will not stop you or warn you. Day is only clamped to the range 1-31 and Month to 1-12 independently of each other (lines 16-18), so entering day 31 for April, a 30-day month, still runs the formula and returns a weekday -- just not one that corresponds to a real calendar date, since April 31st doesn't exist.

Does the calculator account for the Julian-to-Gregorian calendar switch?

No. It applies the Gregorian leap-year rule -- divisible by 4, except centuries, except again every 400 years -- uniformly to every year you enter (line 10), including years before the Gregorian calendar was adopted in a given country. For a genuinely historical date before 1582, the weekday this calculator reports may not match what a period calendar of the time would have shown.

Why does 1900 get treated differently from 2000 even though both are divisible by 100?

Because the Gregorian rule has a second exception: a century year is only a leap year if it's also divisible by 400. The algorithm's century and quadricentennial correction terms (line 10) apply that exception directly, so 1900 (divisible by 100 but not 400, not a leap year) and 2000 (divisible by both, a leap year) shift the weekday count by a different number of days across their surrounding years.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Time & Date.