If July 4th falls on a certain day of the week, Halloween (October 31st) will fall on that same day of the week in a given year. This works because July and October have the same number of days, that being 31. Check them both in a calendar. They line up the same way Christmas and New Year's Day line up, except they're further apart.
In a given year, they both occur on the same day of the week. For example, this year, they both fall on a Tuesday. In 2021, they both occurred on a Sunday.
BlueSpeedMouse17 OP t1_ja5co5r wrote
Reply to comment by redditorihardlynoher in Halloween and 4th of July always occur on the same day of the week. by BlueSpeedMouse17
I only realized that after I hit post. That's why I specified in the body.