The ideal gas law relates a number of a gas's physical properties to one another. According to the law, the product of a gas's pressure and volume is proportional to the product of its temperature and the number of molecules in it. At a known pressure, you can therefore calculate a gas's temperature from its volume and its number of molecules. The final factor relating these values is a constant, known as the universal gas constant.

Multiply the gas's pressure, in atmospheres, by its volume in liters. With a pressure, for instance, of 4 atmospheres, and a volume of 5 liters yields 4 x 5 = 20.

Divide the result by the number of moles of gas. If, for instance, the gas contains 2 moles of molecules: 20 / 2 = 10.

Divide the result by the gas constant, which is 0.08206 L atm/mol K: 10 / 0.08206 = 121.86. This is the gas's temperature, in Kelvin.

Subtract 273.15 to convert the temperature to degrees Celsius: 121.86 - 273.15 = -151.29.