Read this lesson as text

Calendar Calculations

Intro to Proofs · Axiom Academy

Calendar Calculations: Zeller's Congruence What day of the week was any date in history? One idea — arithmetic mod 7 — answers it with no calendar in sight. The week is a loop of 7 days that never breaks. Encode the days as numbers, take a remainder mod 7, and you can pin down the weekday of any date — your next birthday, or July 4th, 1776 . January 1, 2000 was a Saturday — call it day 0 . Drag forward and watch the pointer spin around the seven days: after 7 it's back to Saturday, so the weekday is just (0 + days) mod 7 . Zeller's congruence: what day was July 4, 1776? In 1882 Christian Zeller turned this into one formula. Step through the four stages for Independence Day and watch the remainder fall out: h = (q + 13(m+1)/5 + K + K/4 + J/4 − 2J) mod 7 . Why the whole calendar repeats every 400 years Jump whole 400-year blocks and the weekday never budges — because 400 Gregorian years hold exactly 146,097 days, and 146,097 = 7 × 20,871 with nothing left over. Slide to a non-multiple of 400 and the day drifts. One move runs all of it: number the days, take the remainder mod 7 . The same cyclic arithmetic is what makes a clock wrap at 12, lets cryptography work inside a finite ring, and keeps computers counting days from a fixed epoch. The calendar is just modular arithmetic you can hang on a wall.

This is the written version of the interactive lesson above. See the full Intro to Proofs course.