Calculations using the ideal gas equation