A friend of mine that worked a beer joint in college did this math once to determine what to charge. BTW, I spent way too much time in the beer joint…
It all depends on the size of the keg: pony keg - 8 gal, 1/2 keg - 16 g, full keg- 32 g. The 16g g keg was pretty much the standard keg fo collegiate beer parties - run low, go buy some more.
Number of servings also depend on the size of the serving - standard can (bottle) or “cup.”
A “standard can or bottle” of beer is 12 ounces. One quart = 32 ounces, so one quart = 2.83 standard cans of beer. Multiply 2.83 x specific keg gals = #standard cans in a type of keg.
At that beer joint, a “cup”held 8 ounces - 4 cups per quart, 4 quarts per gallon. Do the math for your size keg.