Skip to main content

Ideal Gas Law Calculator

Chemistry

PV = nRT, with the units kept honest.

Interactive Tool
Live Calculation

Ideal Gas Law Calculator

P = nRT / V with R = 8.314 kPa L / (mol K) and T in kelvin.

mol
mol
C
C
L
L
g/mol
g/mol
Evaluated Formula:P = nRT / V with R = 8.314 kPa L / (mol K) and T in kelvin.
Guidance:
Always convert Celsius to kelvin by adding 273.15. Forgetting this is the most common ideal gas error.
R = 8.314 works with pressure in kPa and volume in litres. If you use atm, use R = 0.08206 with volume in litres.
The ideal gas law assumes no intermolecular forces and point particles. It is least accurate at high pressure and near condensation.
Pressure
101.3 kPa

Calculated instantly

Pressure in atmospheres1 atm
Density1.18 g/L
Molar volume24.47 L/mol

Embed this calculator

Put this calculator on your own site with the snippet below. The frame contains the tool only, reports its own height, and carries a visible link back to the full page. Embedding is free; keep the attribution link as it is, and do not wrap the frame in a way that hides it.

Preparing the embed code for this page...

What This Calculator Does

The Ideal Gas Law Calculator solves PV = nRT for pressure using moles, temperature, and volume, then reports density and molar volume. It uses the gas constant that matches kilopascals and litres, so the units stay consistent.

How It Works

Temperature in Celsius is converted to kelvin. Pressure is moles times the gas constant 8.314 times temperature, divided by volume in litres, giving kilopascals. Dividing by 101.325 converts to atmospheres. Density is the mass of gas, moles times molar mass, divided by volume. Molar volume is volume divided by moles and is about 24.5 L/mol at 25 C and one atmosphere for an ideal gas.

Example

One mole of air at 25 C in 24.47 L gives P = 1 x 8.314 x 298.15 / 24.47 = 101.3 kPa, or about 1.000 atm. With a molar mass of 28.97 g/mol the density is 28.97 / 24.47 = 1.184 g/L, and the molar volume is 24.47 L/mol.

Formula

Pressure
P = nRT / V
Temperature
T (K) = temperature in C + 273.15
Density
mass / volume = n x molar mass / V
Molar volume
V / n

Reading the Results

Pressure

Absolute pressure in kilopascals from the ideal gas law. It is not gauge pressure; add atmospheric pressure if you need a gauge reading.

Density

Mass per litre at the stated temperature and volume. It assumes the gas behaves ideally, which is close enough for air at ordinary conditions.

Molar volume

Volume per mole. At 0 C and one atmosphere it is about 22.4 L/mol; at 25 C it is about 24.5 L/mol.

Sources and References

  • NIST - Ideal Gas Law and the Gas Constant

    Gas constant values and units

    Reference values for R and the conditions under which the ideal approximation is reasonable.

  • OpenStax Chemistry - The Ideal Gas Law

    PV = nRT and its applications

    Textbook derivation and worked examples, including unit conversion.

References identify the method or data behind this calculator. Where a standard or tariff changes, the current edition applies, and the assumptions stated above take precedence over a remembered figure.

Frequently Asked Questions

Why do I have to add 273.15 to the temperature?

The gas laws are based on absolute temperature, where zero means the particles have minimum thermal energy. Celsius starts at the freezing point of water, not absolute zero. Using 25 instead of 298.15 understates the pressure by a factor of about 12.

Which value of R should I use?

Use 8.314 when pressure is in kPa and volume in litres. Use 0.08206 when pressure is in atmospheres and volume in litres. The numerical value changes with the units, but the physical relationship does not. This calculator uses the kPa form.

When does the ideal gas law break down?

At high pressure, low temperature, or near the boiling point, intermolecular forces and molecular volume matter. Real gas equations such as van der Waals add corrections. For air at room temperature and near atmospheric pressure, the ideal approximation is usually adequate.

Is the pressure absolute or gauge?

The ideal gas law uses absolute pressure. Gauge pressure measures the difference from the surrounding atmosphere. If a gauge reads 200 kPa, the absolute pressure is about 301 kPa at sea level, and the ideal gas calculation needs the absolute value.

Can I solve for volume or moles instead?

Yes, by rearranging: V = nRT/P and n = PV/RT. This calculator is set up to solve for pressure from the other three. Use the same unit discipline, and convert temperature to kelvin before substituting.