Day of the Week from a Birthdate
Gauss's weekday formula — find which day of the week any birthdate fell on.
Formula
Variables
Example
15 Aug 1947 → W = 5 ⇒ Friday
How it works
This is a compact version of Gauss’s weekday calculation: it turns a date into a number from 0 to 6 that matches Sunday through Saturday. The idea is to add up the day of the month, the month’s offset within the year, and the leap-year contributions from the year and century, then reduce the total modulo 7 because weekdays repeat every 7 days. The special month numbering starts the year in March so that February can be treated as the last month of the previous year, which makes leap years fit cleanly into the arithmetic.
When to use it
Use this when you need the day of the week for a historical date, birthdate, or anniversary without a calendar lookup. It is especially useful in maths puzzles, date calculations, and quick checks in history or genealogy work.
Worked example, step by step
Find the weekday for 2 July 1990. Here, d = 2, m = 5 (because March=1, April=2, May=3, June=4, July=5), y = 90, c = 19. Compute the month term: floor(2.6m - 0.2) = floor(2.6 × 5 - 0.2) = floor(12.8) = 12. Compute the year terms: floor(y/4) = floor(90/4) = 22 and floor(c/4) = floor(19/4) = 4. Substitute into the formula: W = (2 + 12 + 90 + 22 + 4 - 2×19) mod 7. Simplify: W = (2 + 12 + 90 + 22 + 4 - 38) mod 7 = 92 mod 7. 92 ÷ 7 leaves remainder 1, so W = 1. Since 1 = Monday, 2 July 1990 was a Monday.
Common mistakes to avoid
- Forgetting to shift January and February into the previous year and using the wrong month number
- Mixing up the weekday codes, especially assuming 0 means Monday instead of Sunday
- Using the full year 1990 in the y term instead of only the year within the century, 90
Did You Know?
Isaac Asimov reportedly could name the weekday of any date in his head; the trick is exactly this kind of modular arithmetic.
Share this formula
More in Time & Calendar
View allLeap Year Rule
BasicTests whether a Gregorian year has 366 days.
Clock Hand Angle
BasicAngle between the hour and minute hands of an analog clock.
Zeller's Congruence
AdvancedFinds the day of the week for any Gregorian date.
Julian Day Number
AdvancedContinuous day count used by astronomers to compare dates.
Days Between Two Dates
IntermediateNumber of days separating two calendar dates.
Age in Years
BasicWhole years elapsed since a birth date.