I looked into this some more.
Simple answer: The head space of bottles is generally small relative to the volume of beer being primed. So, the calculators online do not consider head space.
Longer answer:
I wanted to prove to myself that head space was generally irrelevant. I calculated the amount of glucose added to prime 53 bottles of beer to 2.5 volumes of CO2. If you assume the beer fermented at 65F online calculators say this beer would need 4.3 ounces of corn sugar to prime.
The relationship between CO2 volume and pressure is governed by Henry’s Law, stating that at a constant temperature, the amount of gas dissolved in a liquid is directly proportional to the partial pressure of that gas in equilibrium with the liquid.
Henry’s law is used to make the carbonation charts we use to force carbonate beer with the set it and forget it method. 2.5 volumes of CO2 in beer at 37F requires a head space pressure of 10.7 PSIG.
If we assume that each bottle holds 12 ounces of beer and has 1 ounce of head space then we have 53 ounces of head space that needs to be at 10.7 PSIG when the beer is in the fridge at 37F with 2.5 volumes of CO2 in solution.
We can use the Ideal Gas Law to calculate the number of moles of CO2 needed to pressurize the head space. For our 5 gallon batch in bottles we need 0.12 moles of CO2 in the head space. That is 0.12 moles in addition to the CO2 in solution in the beer. The extra corn sugar required is about 0.4 ounces to add that gas for the head space. With no head space one needs 4.3 ounces of corn sugar to carbonate 5 gallons beer fermented at 65F to 2.5 volumes of CO2. With 1 ounce per bottle of head space one needs 4.7 ounces of corn sugar.
The extra 0.4 ounces sounds like a lot, but when you consider the inaccuracy in all of your measurements, it’s probably best to play it safe and not add the extra sugar.
However, if you are priming 2.5 gallons in a 5 gallon keg, you will need to adjust the priming sugar amount considerably. With 2.5 gallons head space and 2.5 gallons of beer carbonated at 2.5 volumes (assume fermentation temp 65F) one needs 4.4 ounces of corn sugar. While 2.5 gallons of beer carbonated at 2.5 volumes (assume fermentation temp 65F) with no head space requires 2.1 ounces of corn sugar to prime.
I attached a spreadsheet if anyone wants to use it or check my work.
Carbonation Calculator.xlsx (5.6 KB)
Remember this is just math. Your mileage may vary.