Ideal Gas Law Calculator

PV = nRT • Leave exactly one variable empty to solve it
Use SI for Pa + m³. Use L·atm for atm + L style solving.
Quick summary
Fill any 3 fields and leave exactly 1 empty, then click Calculate.
Leave empty if pressure is the unknown.
Leave empty if volume is the unknown.
Leave empty if amount is the unknown.
Temperature must be above absolute zero. Leave empty if temperature is the unknown.

Results

Solved variable
Value (selected units)
Consistency check
Shows PV/(nRT). A valid result is usually very close to 1.

A gas changes state when its pressure, volume, temperature, or amount changes. The ideal gas law connects all four properties in one equation, making it possible to calculate the missing value when the other three are known.

This Ideal Gas Law Calculator solves PV = nRT for pressure, volume, moles, or temperature. Choose a gas-constant mode that matches your units, enter three known values, and leave exactly one field empty.

Ideal gas law diagram showing pressure, volume, amount, temperature, and PV equals nRT
Pressure, volume, amount of gas, and absolute temperature are related by PV = nRT.

How the Ideal Gas Law Calculator Works

The calculator rearranges the ideal gas equation for the field left blank. It converts supported selections into a consistent unit system, performs the calculation, and returns the answer in the selected output unit.

SymbolQuantityRequired meaning
PPressureAbsolute pressure, not gauge pressure
VVolumeVolume occupied by the gas
nAmountNumber of moles of gas
RGas constantConstant selected to match the unit system
TTemperatureAbsolute temperature in kelvins

Ideal Gas Law Formula

The molar form of the ideal gas law is:

PV = nRT

Because the calculator can solve for any one of the four variables, it uses the appropriate rearrangement:

UnknownFormula
PressureP = nRT ÷ V
VolumeV = nRT ÷ P
Molesn = PV ÷ RT
TemperatureT = PV ÷ nR

Choose the Correct Gas Constant

The numerical value of R depends on the pressure and volume units. Matching the constant to the unit system avoids a common source of answers that are wrong by a large conversion factor.

ModeGas constantNatural input combination
SIR = 8.314462618 Pa·m³/(mol·K)Pa, m³, mol, K
L·atmR = 0.082057366 L·atm/(mol·K)atm, L, mol, K

The calculator handles its supported unit selections, but the physical inputs still need to describe the same gas state. If you calculate outside the tool, convert every value before substituting it into the formula.

How to Use the PV = nRT Calculator

  1. Select SI or L·atm as the gas-constant mode.
  2. Enter the three quantities you know.
  3. Select the unit beside each entered quantity.
  4. Leave the quantity you want to solve completely empty.
  5. Click Calculate.
  6. Review the solved value and the consistency check.

A consistency value of PV/(nRT) close to 1 confirms that the displayed variables satisfy the ideal gas equation, subject to rounding.

Worked Example: Solve for Gas Volume

Suppose 0.500 mol of gas is at an absolute pressure of 2.00 atm and a temperature of 300 K. Find the volume.

Known: n = 0.500 mol, P = 2.00 atm, T = 300 K
Constant: R = 0.082057366 L·atm/(mol·K)
Formula: V = nRT ÷ P

V = (0.500 × 0.082057366 × 300) ÷ 2.00 = 6.154 L

Rounded to three significant figures, the gas occupies approximately 6.15 L. The units cancel to litres because the pressure in the numerator and denominator is measured in atmospheres.

Use Absolute Temperature and Pressure

The ideal gas equation requires an absolute scale. Temperature must therefore be expressed in kelvins during the calculation. Zero kelvin represents absolute zero, so a temperature of 0 K or below is not a valid gas-state input.

Pressure must also be absolute. A pressure gauge normally reports pressure relative to the surrounding atmosphere. When gauge pressure is provided, convert it before using the gas law:

Pabsolute = Pgauge + Patmospheric

For example, a gauge reading of 2 atm in an atmosphere of 1 atm corresponds to an absolute pressure of 3 atm—not 2 atm.

When Is the Ideal Gas Law Accurate?

The ideal gas model assumes that gas particles occupy negligible volume and have no intermolecular attractions except during elastic collisions. Many gases behave approximately this way at moderate pressure and temperatures well above their condensation point.

Accuracy can decrease at high pressure, very low temperature, or near a phase change because particle volume and intermolecular forces become important. For design work, compressed-gas systems, pressure vessels, or conditions near condensation, use an appropriate real-gas equation of state and qualified engineering data.

Common Input Mistakes

  • Entering all four values: leave exactly one variable blank.
  • Using Celsius directly: the equation requires kelvins, although the calculator can convert supported temperature units.
  • Using gauge pressure: convert it to absolute pressure first.
  • Mixing unit systems: match pressure and volume units to the selected gas-constant mode.
  • Confusing mass with moles: convert gas mass to moles using its molar mass before applying PV = nRT.

Ideal Gas Law Calculator FAQs

What does PV = nRT calculate?

It relates a gas’s absolute pressure, volume, amount in moles, and absolute temperature. If three values are known, the equation can be rearranged to calculate the fourth.

What value of R should I use?

Use R = 8.314462618 Pa·m³/(mol·K) with SI inputs or R = 0.082057366 L·atm/(mol·K) with litres and atmospheres. Other equivalent values exist, but every unit in the equation must remain compatible.

Can I enter temperature in Celsius or Fahrenheit?

Yes, when the calculator offers those selections; it converts them to kelvins internally. In a manual calculation, convert to absolute temperature before using the formula.

Why must pressure be absolute?

The gas law measures pressure from a true zero-pressure reference. Gauge pressure uses local atmospheric pressure as its zero, so using it directly produces an incorrect gas state.

Can the calculator find the number of gas molecules?

It solves for moles. To estimate the number of molecules, multiply the calculated moles by Avogadro’s constant, approximately 6.022 × 1023 particles per mole.

Does the ideal gas law work for every gas?

It is an approximation that works best for dilute gases at moderate pressure and sufficiently high temperature. Real-gas corrections may be necessary at high density or near condensation.

Related Calculators

References

View Sponsored Offers →

Related Tools

Avogadro’s number calculator

Calculate particle count and molar mass from moles and sample mass using Avogadro’s exact constant, clear formulas, units, and a worked example.

Half-Life Calculator

Calculate remaining quantity, elapsed time, half-life, decay constant, or mean lifetime with formulas, steps, units, and a worked example.

Molarity Calculator

Use our Molarity Calculator to find moles, mass concentration, and molarity from solute mass, molar mass, and solution volume.

PPM to Molarity Calculator

PPM to Molarity Calculator to convert parts per million into molarity using molar mass and solution assumptions.

pH Calculator

Free pH calculator that syncs [H+], [OH−], pOH, concentration, and mass/volume. Supports strong/weak acids and bases, unit options, steps, and PDF.

Atom Calculator

Use our Atom Calculator to find protons, neutrons, electrons, atomic number, mass number, and ionic charge quickly from standard atomic relationships.

Theoretical Yield Calculator

Theoretical Yield Calculator to find the maximum product yield from stoichiometry, limiting reagent, and molar relationships.

Percent Yield Calculator

Use our Percent Yield Calculator to calculate chemistry percent yield from actual yield and theoretical yield in mg, g, or kg.