We all try to keep from over-buying Halloween candy to save money and to prevent us from eating all of the leftovers.

Well, good news. The housing blog Apartment Therapy has come up with a formula on how much Halloween candy you should buy.

Here it is:

We can't guarantee this will give you the perfect answer, although it might get close if you're able to fill in all the blanks. The main thing to take away here is that when you're figuring out how much candy to stock this year, you should consider all the variables.

Does this help?  Do you have a formula for how much candy to buy?  Do you just buy more than you think you'll need because, well somebody can eat the leftovers?