find the weekday of January 1st for any year
Carl Friedrich Gauss (1777–1855), one of the greatest mathematicians in history, devised a compact formula to determine the weekday of January 1st for any given year. Found in a handwritten note among his papers, it was first published posthumously in 1927. The formula is valid from 1583 onward — the first full year of the Gregorian calendar. Enter a year above to see it in action.