ideal gas law calculator

Ideal Gas Law Calculator (PV = nRT)

Choose which variable to solve for, enter the other three values, and click Calculate.

Tip: when solving for a variable, that field is disabled automatically.

What is the Ideal Gas Law?

The ideal gas law is one of the most useful equations in introductory chemistry and physics. It links four measurable properties of a gas: pressure, volume, amount of substance, and temperature. The formula is:

PV = nRT

This relationship works best for gases at relatively low pressure and high temperature, where molecules are far enough apart that interactions are minimal.

Meaning of Each Variable

  • P = Pressure of the gas
  • V = Volume occupied by the gas
  • n = Amount of gas in moles
  • R = Ideal gas constant
  • T = Absolute temperature (Kelvin)

In this calculator, computations are internally performed with R = 0.082057 L·atm·mol-1·K-1, then converted to your preferred output units.

How to Use This Ideal Gas Law Calculator

Step-by-step

  • Select the variable you want to find: pressure, volume, moles, or temperature.
  • Enter the other three known values.
  • Choose the units for each quantity.
  • Click Calculate to get your result instantly.

The calculator automatically validates inputs and checks for physically meaningful values (such as positive pressure, volume, and moles, plus temperature above absolute zero).

Worked Examples

Example 1: Solve for Pressure

Suppose you have 1.5 mol of gas in a 10 L container at 300 K. Rearranging gives:

P = nRT / V

Plugging in values gives a pressure of about 3.69 atm.

Example 2: Solve for Temperature

If a gas has pressure 2 atm, volume 5 L, and amount 0.5 mol:

T = PV / (nR)

The temperature comes out near 244 K (about -29 °C).

Unit Tips for Reliable Results

Unit consistency is where many mistakes happen. This tool handles conversion for you, but it is still useful to remember:

  • Kelvin is the absolute temperature scale used in gas equations.
  • 1 atm = 101.325 kPa = 760 mmHg.
  • 1 L = 1000 mL and 1 m³ = 1000 L.

When the Ideal Gas Law Works (and When It Doesn’t)

The ideal gas law assumes gas molecules have negligible volume and do not attract each other. Real gases deviate from this behavior at:

  • Very high pressures
  • Very low temperatures (near condensation)
  • Conditions where intermolecular forces matter

Under those conditions, more advanced equations of state (like Van der Waals) provide better accuracy.

Common Mistakes to Avoid

  • Using Celsius directly in the equation without converting to Kelvin.
  • Mixing pressure and volume units without conversion.
  • Forgetting that moles must be greater than zero.
  • Entering negative or zero volume/pressure values.

Final Thoughts

Whether you're solving homework problems, running quick engineering checks, or reviewing core chemistry concepts, this ideal gas law calculator gives fast and accurate results in multiple unit systems. Save time, avoid manual conversion errors, and focus on understanding the physical behavior of gases.

🔗 Related Calculators