People typically remember anniversaries in terms of dates and years, not days of the week. If you can’t remember whether you got married on a Saturday or Sunday, or don't know which day of the week you were born on, there’s a simple arithmetic-based math trick to help you figure out sans calendar, according to It's Okay To Be Smart host Joe Hanson.

Mathematician John Conway invented the so-called Doomsday Algorithm to calculate the day of the week for any date in history. It hinges on several sets of rules, including that a handful of certain dates always share the same day of the week, no matter what year it is. (Example: April 4, June 6, August 8, October 10, December 12, and the last day of February all fall on a Wednesday in 2018.) Using this day—called an “anchor day”—among other instructions, you can figure out, step by step, the very day of the week you’re searching for.

Learn more about the Doomsday Algorithm in the video below (and if it’s still stumping you, check out It’s OK to Be Smart’s handy cheat sheet here).