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?
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.
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.
Day of the Week Calculation Formula & Tricks
Important Formulas
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.
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.
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
In any day calculation, remove complete multiples of 7 because they represent complete weeks. Only the remainder affects the weekday.
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.
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.
Day of the Week Calculation Concepts
Applying Zeller’s Congruence
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.
Converting January and February
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.
Leap-Year Rule
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.
Finding a Weekday from a Known Date
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.
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.
Keep practising
Practice more Day of the Week Calculation questions in the PrepShots app and continue from your current topic.
Practice More Questions - Start ₹1 Trial →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.
