# Compute the Day of any Date in Your Head

Calculate whether any date in history was a Friday.

Ever wondered what day your friend’s birthday occurred, or whether the next July 4th will be a Thursday? You can calculate it using simple math, which you’ll learn here!

This simple method uses different codes that we add up to get our result. We’ll need a month code, a century code, and a day code.

## Calculate It!

As we explain the process, we’ll use **December 16, 2482** as an example.

- Take the last two digits of the year. In our example, this is $82$.
- Divide by 4, and drop any remainder. For us, $\lfloor 82 \div 4 \rfloor = 20$.
- Add the date of the month. We’ll do $20 + 16 = 36$.
- Add the month’s value from the month codes table. In our example, this is $6$, so we do $36 + 6 = 42$.
- Add the century code from the century codes table. In our example, this is $6$, so we do $42 + 6 = 48$.
- Add the last two digits of the year. In our example, this was $82$, so we do $48 + 82 = 130$.
- Divide by 7 and take the remainder. In our example, this is $130 \bmod 7 = 4$.
- Find your day in the day codes table. In our example, this is Wednesday. This is your final result!

## Month Codes

Month | Value | Month | Value |
---|---|---|---|

January | 1* | July | 0 |

February | 4* | August | 3 |

March | 4 | September | 6 |

April | 0 | October | 1 |

May | 2 | November | 4 |

June | 5 | December | 6 |

** For leap years, use 2 for January and 5 for February.*

## Century Codes

Century | Value |
---|---|

1700s, 2100s, 2500s, … | 4 |

1800s, 2200s, 2600s, … | 2 |

1900s, 2300s, 2700s, … | 0 |

2000s, 2400s, 2800s, … | 6 |

## Day Codes

Day | Value |
---|---|

Saturday | 0 |

Sunday | 1 |

Monday | 2 |

Tuesday | 3 |

Wednesday | 4 |

Thursday | 5 |

Friday | 6 |