Ideal Gas Law Calculator

The ideal gas law is one of the most important equations in chemistry and physics: PV = nRT. It links the four properties of a gas sample, namely pressure (P), volume (V), the number of moles (n), and absolute temperature (T), through the universal gas constant R, and lets you work out any one of those four quantities when you know the other three. This calculator solves that problem instantly. You choose which variable you want to find, enter the three known values, select whether you are working in atmospheres or kilopascals, and the calculator returns the answer. When you use atmospheres the constant R is 0.08206 L atm per mol per K, and when you use kilopascals R is 8.314 L kPa per mol per K. Volume is always in litres and temperature is always in kelvin, so if you have a Celsius temperature you need to add 273.15 before entering it. The ideal gas law assumes gas molecules behave as perfect point particles with no volume and no attractive or repulsive forces between them. In practice, real gases follow this law closely at low pressures and high temperatures, drifting away only near the condensation point or under very high pressure. The law is used constantly in chemistry coursework, physics labs, and engineering calculations involving gases such as air, nitrogen, and carbon dioxide. Useful applications include working out the volume a gas sample will occupy at a new temperature or pressure, finding how many moles are in a container, and checking results from gas-collection experiments. Results are theoretical and assume ideal behaviour; real gases may differ slightly from the predicted values.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
Advertise on this page
atm
L
mol
K
1 atm
pressure
Pressure1 atm
Volume22.414 L
Moles1 mol
Temperature273.15 K

Ideal gas law assumes perfectly elastic point-mass molecules with no intermolecular forces. Real gases deviate at high pressures or near their boiling point. Temperature must be in kelvin (add 273.15 to convert from Celsius).

How it works

The calculator rearranges PV = nRT to isolate the selected unknown. Solving for P gives nRT / V. Solving for V gives nRT / P. Solving for n gives PV / RT. Solving for T gives PV / nR. The gas constant R is 0.08206 L atm per mol per K when pressure is in atm, or 8.314 L kPa per mol per K when pressure is in kPa. The selected variable's input is hidden so you only enter the three known values. Any input of zero where zero is physically meaningless (negative moles or temperature, zero volume or pressure) will show an error prompt rather than a nonsensical result.

Worked example

At standard temperature and pressure (STP) you have 1 mol of an ideal gas at 273.15 K. Using PV = nRT with P = 1.000 atm: V = nRT / P = (1 mol x 0.08206 x 273.15) / 1.000 = 22.414 L. This is the standard molar volume and matches the default values pre-filled in the calculator above.

Related calculators