Ideal gas law calculator: PV = nRT
Solve PV = nRT by leaving one quantity blank. Pressure, volume, moles and temperature are converted automatically between common units.
Calculate pressure, volume, amount of gas or temperature with the ideal gas law. Leave exactly one quantity blank when reverse solving is supported.
Ideal-gas model; absolute pressure and absolute temperature.
Results
Calculation details
Was this tool useful?
How does this tool work?
The ideal gas law connects pressure, volume, amount of substance and absolute temperature. Enter any three quantities and the calculator solves PV = nRT for the fourth while handling unit conversions.
Calculations use pascals, cubic metres, moles and kelvins internally with R = 8.31446261815324 J·mol⁻¹·K⁻¹. Inputs are converted to coherent SI units before solving.
Temperature in the equation is absolute. Celsius and Fahrenheit inputs are converted to kelvins before they enter PV = nRT.
The ideal gas law is a model rather than an exact description of every real gas. Deviations become more important at high pressure and near condensation.
How to use this tool
Choose the unknown quantity
Enter exactly three of pressure, volume, amount of substance and temperature. Leave the quantity to solve for blank; the calculator rearranges PV = nRT automatically.
Check units and temperature
Inputs are converted to a coherent unit system before calculation. Celsius and Fahrenheit temperatures are converted to kelvins because the ideal gas equation requires absolute temperature.
Use absolute pressure
Pressure in the equation is absolute. If your instrument reports gauge pressure, convert it to absolute pressure before using the value.
Interpret the answer as an ideal model
The result is most useful when the gas behaves approximately ideally. Deviations grow at high pressure, low temperature and near condensation.
Good to know
Kelvin is part of the physics, not just a unit preference
Gas-law proportionalities use an absolute temperature scale. Substituting 20 for 20 °C is therefore incorrect; the appropriate absolute temperature is 293.15 K.
Gauge pressure is not absolute pressure
Many instruments report pressure relative to the surrounding atmosphere, whereas PV = nRT requires pressure measured from vacuum. Confusing the two can shift the input by roughly one atmosphere.
Ideal gas behaviour is an approximation
The model neglects molecular size and intermolecular interactions in its simplest form. Real gases often approach ideal behaviour at lower pressure and sufficiently high temperature but can depart substantially near phase changes.
Formula
The ideal gas law combines pressure, volume, amount of substance and absolute temperature in one relation. The calculator converts inputs so a consistent value of R can be used.
Ideal gas law
PV = nRT
P is absolute pressure, V volume, n amount of substance and T absolute temperature.
- P
- absolute pressure
- V
- volume
- n
- amount of substance
- T
- absolute temperature
- R
- molar gas constant
Use absolute pressure and absolute temperature. The model is most reliable for gases that are sufficiently dilute and away from condensation.
Use cases
Chemistry and thermodynamics homework
Solve for one unknown in PV = nRT while checking the unit path. The worked relation is especially useful when a problem mixes litres, cubic metres, pascals, atmospheres, Celsius and kelvins.
Estimating gas volume
Given moles, temperature and pressure, estimate the volume an ideal gas would occupy. This provides a useful order-of-magnitude check before laboratory work or when comparing the same amount of gas under different conditions.
Estimating pressure in a closed vessel
For a known volume, temperature and amount of gas, calculate the theoretical absolute pressure. Treat the result as a physics estimate, not as a substitute for vessel ratings, safety procedures or a real-gas model at high pressure.
Finding amount of substance from P, V and T
When pressure, volume and temperature are measured, solving for n connects macroscopic gas measurements with moles. In chemistry exercises, that value can then be combined with molar mass or stoichiometry.
Examples
One mole at 0 °C
Use V = nRT/P.
Input
n = 1 mol; T = 273.15 K; P = 101.325 kPaResult
V ≈ 22.41 LPressure in a vessel
Absolute pressure is nRT/V.
Input
n = 2 mol; V = 10 L; T = 300 KResult
P ≈ 498.9 kPaTips and best practices
- Use absolute pressure rather than gauge pressure.
- Do not insert a Celsius value directly as T.
- Use a real-gas model when the gas is strongly compressed.
- If an answer looks unreasonable, first check litre-versus-cubic-metre and kPa-versus-Pa conversions.
- When comparing two states of one sample, verify whether the amount of gas is actually constant before applying a combined-gas relationship.
Sources and references
- OpenStax, 9.2 Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law (opens in a new tab), ChemistryPage in English
- BIPM, The International System of Units (SI Brochure) (opens in a new tab), Bureau international des poids et mesuresPage in English
Frequently asked questions
What is R?
R is the molar gas constant. This calculator uses the SI value 8.31446261815324 J·mol⁻¹·K⁻¹.
Can I use litres and bar?
Yes. The calculator converts compatible units before solving.
Why must temperature be absolute?
The ideal gas equation is defined on an absolute temperature scale, so 0 °C is 273.15 K.
Does the law work for every gas?
It is an ideal model. Real gases can deviate significantly at high pressure or low temperature.
Can I mix bar and litres in the inputs?
Yes. Compatible units are converted to a coherent system before the equation is solved.
Why do real gases deviate from PV = nRT?
At higher density, molecular volume and intermolecular forces are no longer negligible, so a real-gas equation may be more appropriate.
Related tools
Keep going with these tools
Tools similar or complementary to this one.
Similar tools
Calculate density, mass or volume from any two known values with automatic unit conversion.
Calculate molar concentration, amount of substance or solution volume from any two known values.
Enter any two values among voltage, current, resistance and power to calculate the other two automatically.