Ideal Gas Law Calculator (PV = nRT)
Enter any three variables to solve for the fourth. The calculator automatically selects the correct R value based on your units.
Related Calculators
Combined Gas Law
Charles's Law
Boyle's Law
Gay-Lussac's Law
Dalton's Law
Avogadro's Law
Volume of Gas
What is the Ideal Gas Law?
The Ideal Gas Law is a fundamental equation in chemistry and physics that relates four key properties of a gas: pressure (P), volume (V), the number of moles (n), and temperature (T). The equation is written as:
where R is the universal gas constant. This law assumes the gas behaves ideally — meaning the gas molecules have no volume and no intermolecular forces. While no real gas is perfectly ideal, this law provides excellent approximations at moderate temperatures and pressures.
PV=nRT Formula — All Rearranged Forms
You can rearrange PV = nRT to solve for any variable:
Gas Constant (R) Values Table
| R Value | Units | When to Use |
|---|---|---|
| 0.08206 | L·atm/(mol·K) | P in atm, V in L |
| 8.314 | J/(mol·K) | SI units: P in Pa, V in m³ |
| 8.314 | kPa·L/(mol·K) | P in kPa, V in L |
| 62.36 | L·mmHg/(mol·K) | P in mmHg, V in L |
| 1.987 | cal/(mol·K) | Energy in calories |
See the full Gas Constant R Values reference table for more details.
PV=nRT Units
| Variable | Common Units | SI Unit |
|---|---|---|
| Pressure (P) | atm, kPa, mmHg, psi | Pa (Pascal) |
| Volume (V) | L, mL | m³ |
| Moles (n) | mol | mol |
| Temperature (T) | K, °C, °F | K (Kelvin) |
| Gas Constant (R) | Depends on P & V units | 8.314 J/(mol·K) |
For a complete guide, visit PV=nRT Units.
Step-by-Step Examples
Example 1: Solve for Pressure
Given: 2.0 mol of gas in a 10.0 L container at 300 K. Find P.
Example 2: Solve for Volume
Given: 1.5 mol of gas at 1.0 atm and 273.15 K (0°C). Find V.
Example 3: Solve for Moles
Given: A 5.0 L container at 2.5 atm and 350 K. Find n.
Example 4: Solve for Temperature
Given: 0.5 mol of gas at 3.0 atm in a 2.0 L container. Find T.
What is n in PV=nRT?
In the ideal gas law, n represents the number of moles of gas. A mole is a counting unit equal to 6.022 × 10²³ particles (Avogadro's number). You can calculate the number of moles from the mass of a gas using:
For example, 32 g of O₂ (molar mass = 32 g/mol) equals exactly 1 mole. If you need to find moles using gas properties, rearrange PV=nRT: n = PV/(RT).
Ideal Gas Law vs Combined Gas Law
Use the Ideal Gas Law (PV=nRT) when you know or need to find the number of moles of gas. Use the Combined Gas Law (P₁V₁/T₁ = P₂V₂/T₂) when comparing the same gas at two different states (before and after a change) and moles stay constant.
Ideal Gas Law with Molar Mass
Since n = m/M (mass divided by molar mass), you can rewrite the ideal gas law as:
This is useful for finding the molar mass of an unknown gas. For gas density (ρ = m/V), rearrange to:
Frequently Asked Questions
-
PV=nRT is the Ideal Gas Law. P stands for pressure, V for volume, n for the number of moles of gas, R for the universal gas constant, and T for temperature in Kelvin. It describes the relationship between these four state variables for an ideal gas.
-
In PV=nRT, n represents the number of moles of gas. One mole equals 6.022 × 10²³ particles (Avogadro's number). You can calculate n from the mass of gas divided by its molar mass: n = mass / molar mass.
-
R is the universal gas constant. Its value depends on the units you use: R = 0.08206 L·atm/(mol·K) when P is in atm and V in liters, R = 8.314 J/(mol·K) in SI units, R = 8.314 kPa·L/(mol·K) when P is in kPa, or R = 62.36 L·mmHg/(mol·K) when P is in mmHg.
-
Temperature must always be in Kelvin. For the other variables, the units must be consistent with your chosen R value. Common combinations: P in atm + V in L + R = 0.08206, or P in kPa + V in L + R = 8.314, or P in Pa + V in m³ + R = 8.314.
-
Rearrange PV=nRT to solve for P: P = nRT/V. Plug in the number of moles (n), the gas constant (R), the temperature in Kelvin (T), and the volume (V), then calculate. Make sure your units are consistent with the R value you choose.
-
The most common values of R are: 0.08206 L·atm/(mol·K), 8.314 J/(mol·K), 8.314 kPa·L/(mol·K), 62.36 L·mmHg/(mol·K), and 1.987 cal/(mol·K). Choose the value that matches the pressure and volume units in your problem.
-
The ideal gas law is used to calculate any one of the four variables (P, V, n, T) when the other three are known. Applications include determining gas volumes in chemical reactions, calculating pressures in sealed containers, finding the molar mass of an unknown gas, and estimating gas behavior under different conditions.