ôô

# How to Calculate the Day of the Week of Any Date

Learn how to use the connection between modular arithmetic and remainders in division to calculate the day of the week of any date.

By
Jason Marshall, PhD
Episode #055

## How to Calculate the Day of the Week of Any Future Date

Now, what if instead of being told the number of days from today, you’re instead given an actual date. For example, what if you’re asked to figure out when New Year’s Day next year is going to fall. Well, in this case, the trick is to start by figuring out the number of days between that day and today. This is the tough part and can definitely take some thinking.

If we say that today is March 18, you can use the knowledge that the months of April, June, September, and November each have 30 days, while the other 5 months between now and next January each have 31 days. That means that there are a total of 13 days left in March, 4 x 30 = 120 days left for all the months that have 30 days between now and next January, 5 x 31 = 155 days left for all the months that have 31 days between now and next January, and then 1 more day to get from December 31 to January 1. That gives us a grand total of 13 + 120 + 155 + 1 = 289 days until next New Year’s Day.

Once you know the number of days until the date you’re interested in, you’re home free since we’ve already learned how to finish the calculation from that point. Since 289 mod 7 is congruent to 2, and since the day we’re calculating from is Friday, March 18, we’ve found that next New Year’s Day must be 2 days after a Friday…which is a Sunday!

## How to Calculate the Day of the Week of Any Date

If you think about it, you’ll see that although we’ve been talking only about days in the future, this method actually works just fine for figuring out the days of the week of past dates too. For example, if you wanted to figure out what the day of the week was 94 days ago, the answer is 94 mod 7 days of the week before today. Since 94 / 7 = 13 remainder 3, if today was a Friday, then 94 days ago must have been 3 days before a Friday…which is a Tuesday.

One word of warning: although we haven’t had to worry about this in any of the cases we’ve looked at, when you’re calculating the number of days from today to a given date, be sure to watch out for those occasional leap days that occur in February of years that are divisible by 4 (with a few exceptions).

## Wrap Up

Okay, you’re now ready to become a date calculating machine. With a bit of practice, you can actually get pretty quick at doing this sort of thing. And it’ll be well worth your time since you’ll have a very impressive trick to pull out at parties! After you’ve got the general idea down, see if you can come up with any clever tricks that will help you speed up the calculation even more.

If you have ideas about this or any other questions about math, please email them to me at mathdude@quickanddirtytips.com, send them via Twitter, or become a fan of the Math Dude on Facebook and get help from me and the other math fans there.

Until next time, this is Jason Marshall with The Math Dude’s Quick and Dirty Tips to Make Math Easier. Thanks for reading math fans!

Calendar image courtesy of Shutterstock