100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

How to Solve Calendar Problems

Solve calendar aptitude problems using the odd-days method and leap year rules, with a worked example and practice questions with answers.

mediumQ17 of 225 in Aptitude Est. time: 5 minsLast updated:
Open Code Lab

Expected Interview Answer

Calendar problems are solved by counting "odd days" — the remainder when total days between two dates are divided by 7 — since the day of the week repeats every 7 days.

A normal year has 365 days = 52 weeks + 1 odd day; a leap year has 366 days = 52 weeks + 2 odd days. To find the day for a given date, count the odd days accumulated from a known reference date and map the remainder (0-6) onto the days of the week. A century (100 years) has 5 odd days, 200 years has 3, 300 years has 1, and 400 years has 0 odd days because every 4th century is a leap century. Leap years are divisible by 4, except century years, which must be divisible by 400.

  • The odd-days method reduces any date gap to a single remainder
  • Leap year rules are checked with three simple divisibility tests
  • Century odd-day values (5, 3, 1, 0) let you jump centuries instantly

AI Mentor Explanation

A bowler’s over cycles every 6 balls; ask "which ball of the over is delivery number 44" and you compute 44 mod 6. Calendar problems work identically but with a 7-day cycle: total days between two dates, mod 7, tells you how many weekdays you have shifted from the reference day. Just as overs restart cleanly every 6 balls, the week restarts cleanly every 7 days — count total days, take the remainder, and map it onto the weekday sequence.

Worked example (odd days method)

Step-by-Step Explanation

  1. Step 1

    Fix a reference date

    Start from a known date and weekday, or from 1 Jan year 1 = Monday.

  2. Step 2

    Count odd days

    Normal year = 1 odd day, leap year = 2 odd days; sum across the span.

  3. Step 3

    Check leap years correctly

    Divisible by 4, except century years, which need divisibility by 400.

  4. Step 4

    Reduce mod 7 and map

    Take total odd days mod 7, then shift the reference weekday by that count.

What Interviewer Expects

  • Correct odd-days values for normal (1) and leap (2) years
  • Accurate leap year rule (÷4, except centuries which need ÷400)
  • Century odd-day values: 100y=5, 200y=3, 300y=1, 400y=0
  • Ability to reduce a date-gap calculation cleanly mod 7

Common Mistakes

  • Treating every century year as a leap year (1900 is not, 2000 is)
  • Forgetting to add the extra odd day for leap years crossed in the range
  • Miscounting the reference weekday offset (off-by-one errors)
  • Not reducing the final odd-day total mod 7 before mapping to a weekday

Best Answer (HR Friendly)

I find the day of the week using odd days: a normal year leaves 1 extra day beyond whole weeks, a leap year leaves 2. I count these up between a known reference date and the target date, take the total modulo 7, and shift the known weekday by that amount. The main thing to get right is the leap year rule, especially for century years.

Follow-up Questions

  • How many odd days are there in 400 years, and why is that significant?
  • Is the year 1900 a leap year? What about 2000?
  • How would you find what day of the week your birthday falls on next year?
  • How do odd days help determine if a given year’s calendar repeats in a future year?

MCQ Practice

1. How many odd days does a leap year contribute?

366 days ÷ 7 = 52 weeks remainder 2, so a leap year has 2 odd days.

2. Which of these is a leap year?

Century years must be divisible by 400 to be leap; 2000 ÷ 400 = 5 exactly, so it is leap. 1900, 2100, 2200 are not.

3. If 1 Jan 2024 is a Monday, what day is 1 Jan 2025 (2024 is a leap year)?

2024 has 2 odd days (leap year), so the weekday shifts 2 days from Monday to Wednesday.

Flash Cards

Odd days in a normal year?1 (365 mod 7 = 1).

Odd days in a leap year?2 (366 mod 7 = 2).

Leap year rule?Divisible by 4; century years must also be divisible by 400.

Odd days in 100/200/300/400 years?5, 3, 1, 0 respectively.

1 / 4

Continue Learning