How to Solve Calendar Odd Days Problems
Learn the odd-days method for finding any day of the week — century values, leap-year rules, worked example, and practice questions.
Expected Interview Answer
Odd days are the number of days left over after removing complete weeks from a given period, and they are the key to finding the day of the week for any date, since a normal year contributes 1 odd day (365 = 52×7 + 1) and a leap year contributes 2 (366 = 52×7 + 2).
To find the day of the week for a date, sum the odd days contributed by all complete years before it, plus the odd days from the months already elapsed in the current year up to that date, then reduce the total modulo 7 — the remainder maps to a day (0 = Sunday, 1 = Monday, and so on, using a reference day). Century blocks have fixed odd-day values worth memorizing: 100 years contribute 5 odd days, 200 years contribute 3, 300 years contribute 1, and 400 years contribute 0 (a full cycle resets to Sunday-equivalent). Month odd days also follow a fixed pattern based on each month's length (31-day months contribute 3, 30-day months contribute 2, February contributes 0 or 1 depending on leap status). Practicing the modulo-7 reduction at each stage keeps running totals small and avoids arithmetic errors.
- Reduces any date's weekday to simple modular arithmetic
- Century odd-day values (5, 3, 1, 0) make large date ranges tractable
- Reusable for both “what day was X” and “how many odd days between two dates” questions
AI Mentor Explanation
A cricket league schedules matches in a strict 7-day rotation across grounds, so after any block of days you only care about the leftover games that do not fill a complete week-cycle — exactly like odd days. A full year of matches (365 days) leaves 1 leftover fixture beyond complete week-cycles, and a leap year's extra day leaves 2, mirroring how a normal year gives 1 odd day and a leap year gives 2. Tracking these leftovers, then reducing modulo 7, is precisely how you compute which day of the week a future match falls on.
Worked example (day of week for a date)
Year odd days
- 1600y: 0, 300y: 1, 46y: 1 (mod 7)
Month + day odd days
- Jan-Jul: 2, plus 15 days: 1
Total mod 7
- 0+1+1+2+1 = 5 → Friday
Step-by-Step Explanation
Step 1
Recall century odd-day values
100y = 5, 200y = 3, 300y = 1, 400y = 0 odd days.
Step 2
Add odd days from remaining years
Each normal year = 1, each leap year = 2, within the leftover year block.
Step 3
Add odd days from elapsed months
Sum days in each completed month of the current year up to the date.
Step 4
Reduce total modulo 7
Map the remainder to a weekday using a known reference (0 = Sunday).
What Interviewer Expects
- Correct century odd-day values (5, 3, 1, 0 for 100/200/300/400 years)
- Correctly distinguishing normal-year (1) vs leap-year (2) odd-day contribution
- Accurate month-by-month odd-day summation up to the target date
- Correct final modulo-7 reduction and weekday mapping
Common Mistakes
- Forgetting to add 1 extra odd day for leap years within the range
- Miscounting elapsed months (including the target month's days incorrectly)
- Using wrong century odd-day values (confusing 100y=5 with 400y=0)
- Not reducing intermediate sums modulo 7, leading to arithmetic overload and errors
Best Answer (HR Friendly)
“I break the date down into odd days from full centuries, odd days from the remaining years within that century (1 per normal year, 2 per leap year), and odd days from the months elapsed in the target year, then add days already elapsed in the target month. Reducing that total modulo 7 gives a number I map to a weekday using a known reference day.”
Follow-up Questions
- What are the odd-day values for 100, 200, 300 and 400 years, and why does 400 years give 0?
- How do you find the number of odd days between two arbitrary dates?
- Why is Jan 1, 1 AD conventionally taken as the reference point for odd-day calculations?
- How would you find the day of the week for a date far in the future, like 2075?
MCQ Practice
1. How many odd days are there in 400 years?
400 years contain exactly 100 leap years under the Gregorian rule, giving 400×365+100 = 146100 days, which is exactly divisible by 7, so 0 odd days.
2. How many odd days does a normal (non-leap) year contribute?
365 = 52×7 + 1, so a normal year contributes 1 odd day.
3. If the total odd days for a date sum to 3 (with 0 = Sunday), what day is it?
With 0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday.
Flash Cards
Odd days in a normal year? — 1 (365 = 52 weeks + 1 day).
Odd days in 100 / 200 / 300 / 400 years? — 5, 3, 1, 0 respectively.
Core technique for day-of-week problems? — Sum all odd-day contributions, then reduce modulo 7.
Why do 400 years give 0 odd days? — They contain an exact number of weeks (146100 days ÷ 7 is a whole number).