The Pizza Algorithm

aka How many pizza's do I need to order to feed n adults?

Back to main page

Maybe your experiences are different than mine but I have found that I spent a lot of time trying to order pizzas for a group of people. And discussing what kind of pizzas to buy. And how many to buy. And sometimes running out, and sometimes having pizza left over, and often times running out of popular pizza and having leftover unpopular pizza. And being a Software Engineer with every core of my being I developed an algorithm for it which has proven of enough use that I am tired of rewriting it and emailing it so hence this page. Remember your mileage will vary. My mileage even varies - when with kids pizza 1 and 2 are swapped, when with my wife mushrooms fall off of the ANSI standard. So...

Figure on
1 large pizza (16 inches) for every (n+1)/4 people rounding up
or
1 medium pizza (12 inches) for every (n+1)/3 people rounding up
so
or
And if you want there to be leftover pizza just add
n
people...


and so on.

Assumptions:

mjf