Ideal Gas Temperature Calculator (PV = nRT)
Enter the pressure, volume, and amount of an ideal gas to find its temperature using the ideal gas law PV = nRT. The calculator also runs in reverse: switch the solve mode to find pressure, volume, or moles instead. Choose your preferred units for pressure (Pa, kPa, atm, bar, psi, mmHg) and volume (m³, L, mL), and display the temperature in Kelvin, Celsius, Fahrenheit, or Rankine.
Formula
Worked example
A container holds 1 mol of gas at a pressure of 1 atm (101,325 Pa) in a volume of 22.414 L (0.022414 m³). T = PV / (nR) = (101325 × 0.022414) / (1 × 8.31446) = 2271.1 / 8.31446 = 273.15 K (0 °C). This is the standard temperature and pressure (STP) result for one mole of an ideal gas.
What is the ideal gas law?
The ideal gas law, PV = nRT, combines four related gas laws into one equation: Boyle's law (P and V are inversely proportional at constant T and n), Charles's law (V is proportional to T at constant P and n), Gay-Lussac's law (P is proportional to T at constant V and n), and Avogadro's law (V is proportional to n at constant P and T). In the equation, P is the absolute pressure of the gas, V is the volume it occupies, n is the number of moles, R is the universal gas constant (8.31446 J per mole per Kelvin), and T is the absolute temperature in Kelvin. An ideal gas is a theoretical model in which molecules have no volume and exert no forces on each other. Real gases approach this behaviour at low pressures and high temperatures.
How to calculate temperature from the ideal gas law
Rearranging PV = nRT for temperature gives T = PV / (nR). You need three measured values: absolute pressure P (in Pascals for SI calculations), volume V (in cubic metres), and the amount of gas n (in moles). Divide the product of pressure and volume by the product of moles and R. The result is in Kelvin. To convert to Celsius, subtract 273.15. To convert to Fahrenheit, apply (K - 273.15) × 9/5 + 32. Always use absolute pressure, not gauge pressure. Gauge pressure reads zero at atmospheric pressure; absolute pressure reads zero in a complete vacuum. Adding atmospheric pressure (about 101,325 Pa or 1 atm at sea level) to a gauge reading gives absolute pressure.
Reverse-solve modes: pressure, volume, and moles
The same equation solves for any one variable when the other three are known. To find pressure: P = nRT / V. To find volume: V = nRT / P. To find the amount of substance: n = PV / (RT). Use the "Solve for" selector at the top of the calculator to switch between modes. Each mode accepts the three independent variables and outputs the fourth. This is useful in practical chemistry: for example, inflating a tyre to a known gauge pressure, a set volume, and a known temperature lets you work out how many moles of air were pumped in.
Units and the gas constant R
The gas constant R = 8.31446 J mol⁻¹ K⁻¹ is exact in SI units, where pressure is in Pascals and volume in cubic metres. In other common unit sets, R takes a different numerical value: 0.08206 L atm mol⁻¹ K⁻¹, or 8.31446 L kPa mol⁻¹ K⁻¹, or 1.987 cal mol⁻¹ K⁻¹ (the "gas constant in calories"). This calculator converts all inputs to SI internally and then converts the result back to your chosen display units, so you never need to worry about matching unit sets to the right R value.
Limitations of the ideal gas model
The ideal gas law becomes less accurate when molecules are close together (high pressure) or moving slowly (low temperature), because in both cases intermolecular attractions and the finite size of molecules start to matter. For gases near their condensation point, or above about 10-50 atm, equations of state such as the van der Waals, Peng-Robinson, or Redlich-Kwong equations give better predictions. Noble gases (helium, neon, argon) come closest to ideal behaviour among real gases, while polar molecules and large hydrocarbons deviate most. The compressibility factor Z = PV / (nRT) equals 1 for a perfect ideal gas and departs from 1 as real-gas effects grow.
Common gas conditions and typical temperatures
| Condition | Pressure | Volume (1 mol) | Temperature |
|---|---|---|---|
| STP (IUPAC 1982) | 1 atm (101.325 kPa) | 22.414 L | 273.15 K (0 °C) |
| SATP (IUPAC 1997) | 1 bar (100 kPa) | 24.789 L | 298.15 K (25 °C) |
| NTP (NIST) | 1 atm | 24.055 L | 293.15 K (20 °C) |
| Liquid nitrogen boiling | 1 atm | ~ | 77.36 K (-195.79 °C) |
| Dry ice sublimation | 1 atm | ~ | 194.65 K (-78.5 °C) |
| Body temperature | 1 atm | ~ | 310.15 K (37 °C) |
| Water boiling point | 1 atm | ~ | 373.15 K (100 °C) |
| Bunsen burner flame | 1 atm | ~ | ~1500 K (1227 °C) |
Representative conditions showing the ideal gas law in practice. STP = 0 °C / 273.15 K at 1 atm. SATP = 25 °C / 298.15 K at 1 bar.
Frequently asked questions
What units does the calculator use internally?
All inputs are converted to SI units before calculation: pressure to Pascals, volume to cubic metres, and temperature to Kelvin. The gas constant is 8.31446 J mol⁻¹ K⁻¹. Results are then converted back to whatever display units you choose, so you can freely mix atm, litres, and Celsius without worrying about unit consistency.
What is absolute zero and why does temperature have to be positive?
Absolute zero (0 K, -273.15 °C, -459.67 °F) is the lowest possible temperature. At absolute zero, the thermal motion of particles theoretically stops. The ideal gas law uses Kelvin because the volume and pressure of an ideal gas would reach zero at absolute zero, making the relationship proportional. A negative Kelvin temperature is not physically meaningful, so any result below 0 K indicates an error in the inputs.
What is the difference between gauge pressure and absolute pressure?
Gauge pressure measures pressure relative to the local atmospheric pressure and reads zero at atmospheric conditions. Absolute pressure measures from a true vacuum and always equals gauge pressure plus atmospheric pressure (about 101,325 Pa or 14.696 psi at sea level). The ideal gas law requires absolute pressure. If your pressure gauge reads 0.5 atm above atmospheric, the absolute pressure is 1.5 atm.
What conditions define STP and SATP?
Standard Temperature and Pressure (STP) as defined by IUPAC since 1982 is 0 °C (273.15 K) and 1 bar (100 kPa). The older IUPAC definition used 1 atm (101.325 kPa) instead of 1 bar. At modern STP, 1 mole of ideal gas occupies 22.711 L. Standard Ambient Temperature and Pressure (SATP) is 25 °C (298.15 K) and 1 bar; at SATP one mole occupies about 24.789 L. Many textbooks and reference tables still quote the pre-1982 STP with 1 atm, giving a molar volume of 22.414 L.
How accurate is the ideal gas law for air?
At atmospheric conditions (around 25 °C and 1 atm) dry air behaves close to an ideal gas with a compressibility factor Z very near 1 (about 0.9997). The approximation is very good for most everyday engineering calculations. Accuracy decreases at high pressures (compressed gas cylinders at 200 bar can have Z values of 1.05 or higher for nitrogen), at very low temperatures near the dew point, and for gases with strong dipole moments such as steam or ammonia.
Can I use this calculator for mixtures of gases?
Yes, using Dalton's law of partial pressures. Each component in an ideal gas mixture behaves as if it alone occupied the full volume. You can use the total pressure and total moles, or compute each component separately. The mole fraction of each gas times the total pressure gives its partial pressure, and PV = nRT holds for the total mixture using total n and total P.
How do I find the number of moles if I know the mass?
Divide the mass of gas (in grams) by its molar mass (in g/mol). For example, 32 g of oxygen (O2, molar mass 32 g/mol) is 1 mol. For 44 g of carbon dioxide (CO2, molar mass 44.01 g/mol) the answer is about 0.999 mol. Once you have n, enter it in the moles field along with pressure, volume, or temperature to solve the ideal gas law.