Day of the Week Calculation Using Calendar Shortcuts

Day of the Week Calculation determines whether a given date falls on Sunday, Monday, or another weekday. The calculation uses the date, month, year, leap-year adjustment and calendar cycles. This page explains Zeller’s congruence, odd-day counting, shortcut rules, solved calculations and common date-based aptitude problems.

On this page

What Is Day of the Week Calculation?

Day of the Week Calculation is the process of finding the weekday corresponding to a particular date in the Gregorian calendar.

A date can be converted into a weekday by counting the total number of days from a known reference date or by using a direct formula such as Zeller’s congruence. Since every seven days complete one week, the final remainder after division by 7 determines the weekday. In Zeller’s formula, January and February are treated as months 13 and 14 of the previous year.

Day of the Week Calculation Video Lessons

Watch short topic-wise lessons for quick revision.

2 Lessons
Lesson 1 of 2 Quick Revision

Calendar Odd Days and Day Calculation

Learn how to calculate odd days and determine the day of the week for given dates using calendar-based aptitude methods.

Continue with more lessons and practice in PrepShots.Watch More in App - Start ₹1 Trial →
More Day of the Week Calculation Lessons Scroll to explore →

Day of the Week Calculation Formula & Tricks

Important Formulas

Zeller’s congruence
h = [q + ⌊13(m + 1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J] mod 7

For the Gregorian calendar, q is the date, m is the month number with March = 3, ..., December = 12, January = 13 and February = 14; K is the last two digits of the year and J is the century number, ⌊year/100⌋. The result h uses 0 = Saturday, 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday and 6 = Friday.

Odd-day remainder
Weekday shift = Total number of days mod 7

When the number of days between two dates is divided by 7, the remainder gives the shift in the weekday. A remainder of 0 means the weekday does not change.

Days in a year
Common year = 365 = 52 weeks + 1 day; leap year = 366 = 52 weeks + 2 days

A common year shifts the weekday of a fixed date in the next year by 1 day. A leap year shifts it by 2 days when the interval includes 29 February.

Quick Tricks

Reduce large totals modulo 7

In any day calculation, remove complete multiples of 7 because they represent complete weeks. Only the remainder affects the weekday.

Example: If the total is 195, then 195 mod 7 = 6. Therefore, use a shift of 6 days instead of counting all 195 days.
Handle January and February carefully

In Zeller’s congruence, January is month 13 and February is month 14 of the previous year. This automatically places February 29 in the correct position.

Example: For 10 January 2024, use q = 10, m = 13 and year = 2023, so K = 23 and J = 20.
Use the year-cycle shortcut

A common year contributes 1 odd day and a leap year contributes 2 odd days. For a long interval, count the ordinary-year and leap-year contributions separately, then reduce the sum modulo 7.

Example: For four consecutive ordinary years, the shift is 4 days. For four years containing one leap year, the shift is 5 days.

Day of the Week Calculation Concepts

Applying Zeller’s Congruence

Zeller’s congruence gives the weekday directly from the date, month and year after converting January and February into months 13 and 14 of the previous year.

For 15 August 1947, q = 15, m = 8, K = 47 and J = 19. Therefore, h = [15 + ⌊13(9)/5⌋ + 47 + ⌊47/4⌋ + ⌊19/4⌋ + 5(19)] mod 7 = 195 mod 7 = 6. Since h = 6 represents Friday, 15 August 1947 was a Friday.

Example: For 1 January 2000, use q = 1, m = 13, K = 99 and J = 19 because January belongs to the previous year. The result is h = 0, which represents Saturday.

Converting January and February

January and February must be shifted to the end of the previous year when using Zeller’s congruence.

January is represented by m = 13 and the year is reduced by 1. February is represented by m = 14 and the year is also reduced by 1. For example, 29 February 2024 is calculated with year 2023, K = 23 and J = 20. This treatment accounts for the leap day correctly.

Example: For 10 January 2024, use q = 10, m = 13 and year 2023, not year 2024.

Leap-Year Rule

A year is a leap year if it is divisible by 4, except century years must also be divisible by 400.

Thus, 2024 is a leap year because it is divisible by 4. The year 1900 is not a leap year because it is divisible by 100 but not by 400. The year 2000 is a leap year because it is divisible by 400. A leap year has 366 days and February has 29 days.

Example: The years 2000 and 2024 are leap years, whereas 1900 and 2023 are common years.

Finding a Weekday from a Known Date

To find the weekday of another date, add the number of days between the two dates to the known weekday and reduce the result modulo 7.

Count the remaining days in the first month, all complete months between the dates and the days elapsed in the final month. Include 29 February whenever the interval passes through it. A remainder of 1 moves the weekday forward by one day, while a remainder of 0 leaves it unchanged.

Example: If a date is known to be Monday and another date is 16 days later, then 16 mod 7 = 2, so the later date is Wednesday.

Day of the Week Calculation Data Table

Use the structured data below while following the explanation and examples.

Weekday Codes in Zeller’s Congruence

Interpretation of the remainder h obtained from Zeller’s congruence.

h value Weekday
0 Saturday
1 Sunday
2 Monday
3 Tuesday
4 Wednesday
5 Thursday
6 Friday

Note: The values repeat cyclically modulo 7.

Learn more concepts on PrepShots

Start ₹1 Trial →

Practice Day of the Week Calculation Questions

Practise published questions related to this topic.

Want more practice questions?

Practice in App →

Day of the Week Calculation Quick Quiz

Attempt 5 questions and check your score instantly.

Quick Revision Notes

Day of the Week Calculation Revision Points

Use these rules for quick revision of date and weekday calculations.

  • Zeller’s formula is h = [q + ⌊13(m + 1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J] mod 7.
  • In the formula, March = 3 through December = 12, January = 13 and February = 14.
  • For January or February, use the previous year in K and J.
  • The Zeller remainder codes are 0 Saturday, 1 Sunday, 2 Monday, 3 Tuesday, 4 Wednesday, 5 Thursday and 6 Friday.
  • A common year has 365 days and contributes 1 odd day.
  • A leap year has 366 days and contributes 2 odd days.
  • A century year is a leap year only when it is divisible by 400.
  • Always reduce the final day count modulo 7.

Day of the Week Calculation FAQs

What is the day of the week calculation formula?

For the Gregorian calendar, use h = [q + ⌊13(m + 1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J] mod 7. Here, January = 13, February = 14, K is the last two digits of the adjusted year and J is the century number.

Which weekday does a Zeller remainder of 4 represent?

A remainder of 4 represents Wednesday. The sequence is 0 Saturday, 1 Sunday, 2 Monday, 3 Tuesday, 4 Wednesday, 5 Thursday and 6 Friday.

How is 29 February handled in day of the week calculation?

First check that the year is a leap year. In Zeller’s congruence, February is entered as month 14 and the calculation uses the previous year, so 29 February 2024 uses year 2023 in the formula.

Was 15 August 1947 a Friday according to Zeller’s formula?

Yes. Substitution gives h = [15 + 23 + 47 + 11 + 4 + 95] mod 7 = 195 mod 7 = 6. Remainder 6 represents Friday.

What weekday shift does a common year produce?

A common year has 365 days, which equals 52 weeks and 1 extra day. Therefore, the weekday of a fixed date generally shifts forward by 1 day after a common year.

Is 1900 a leap year?

No. Although 1900 is divisible by 4 and 100, it is not divisible by 400. Therefore, 1900 is a common year.

Continue learning Day of the Week Calculation on PrepShots

Continue on PrepShots