# Day of the week calculator

I got interested in methods for computing the day of the week for an arbitrary date when a student on the math team I was coaching sent me the following question from an old competition:
**Brian was born on March 27, 2001. What day of the week was this, given that June 1, 2014 was a Sunday?**

While writing up an answer for this specific case, I learned about the Doomsday method and Zeller's congruence and wrote up
some notes showing how to use those methods to solve this problem as well. The calculator below applies Zeller's formula, which uses modular arithmetic to compute the weekday as
\[ \textrm{Day of the Week} = \left[ D+ \lfloor \frac{13}{5} (M + 1)\rfloor + Y +\lfloor \frac{Y}{4}\rfloor + \lfloor\frac{Z}{4}\rfloor+5Z \right] \pmod{7}\]
where the variables are:
- \(D = \textrm{day} \)
- \(M = \textrm{month} \)
- \(Y = \textrm{year} \mod{100}\)
- \(Z = \lfloor\frac{\textrm{year}}{100}\rfloor\)
If you are interested in more math competition problems, I have assembled a collection of resources here.
## Use Zeller's Congruence

Click the “Activate” button below to compute days of the week.