Different powders have different energies because of additions to nitrocellulose (double base has nitroglycerin added, triple base has nitroguanidine in addition to that), but they are all going to be very similar in the end.
If we calculate the molecular weight of a simple molecule of nitrocellulose, C6H8(NO2)2O5, we come up with a molecular weight of 251.14 grams per mol.
Let us go with a 41.5 grain charge and convert to grams and we get 2.689155 grams.
That gives us 0.010707 mols of nitrocellulose. C6H8(NO2)2O5 => 2CO2 4H2O 2N2 CO (remainder 4 Carbons). That means we multiply 0.010707 by 9 to get the number of mols of gas (gross oversimplification, each product will have a slightly different R value).
In SI units, P is measured in pascals, V is measured in cubic metres, n is measured in moles, and T in kelvin (273.15 Kelvin = 0 degrees Celsius). R has the value 8.314 J·K−1·mol−1 or 0.08206 L·atm·mol−1·K−1 if using pressure in standard atmospheres (atm) instead of pascals, and volume in litres instead of cubic meters.
so we set P to 1 atm, T to 293 K, and calculate for V.
V = 0.963701325*.08206*293 = 2.31708 liters.
Now we have another assumption to make, that we can use a volumetric density as a legitimate proxy for actual density. So 0.0653 cc/gr is the densest I can find on a chart, so our 41.5 grains becomes 2.70995 cubic centimeters. Since one cubic centimeter equals one milliliter we are looking at 2.70995/2317.08 or an a solid volume of 0.001169, or a thousand fold expansion in volume from solid to gas.
Considering that 1,000 and 70,000 are only an order of magnitude apart I'd say my math is close enough to demonstrate the process. In reality, one would go through and do this for every molecule in the gunpowder they were interested in (accounting for binders, stabilizers, etc) and then adding up all the partial pressures to get a total. I didn't even calculate for complete combustion (a remainder of 4 carbons, from the simplest nitrocellulose formula I could find).
My chemistry professors would be horrified by my math and assumptions here, but my engineering professors would be happy with a "ball park" first shot at looking at the problem, so don't take any of this as gospel.