Ideal Gas Law Calculator
Solve PV = nRT for any unknown variable — pressure, volume, moles, or temperature. Includes isothermal P-V curve visualization.
About this calculator
The ideal gas law, PV = nRT, links a gas's pressure, volume, amount, and absolute temperature through a single constant of proportionality, R. This calculator uses R = 0.08206 L·atm/(mol·K), which is why pressure defaults to atmospheres and volume to liters — plug in values in those units and the algebra falls out directly by rearranging the equation for whichever variable you select to solve for, with the other three treated as known inputs. Alongside the solved variable, the calculator reports the same pressure in kilopascals and the same temperature in Celsius purely as unit conversions for convenience, not as independent calculations.
It also reports a "molar density" (moles per liter, n/V) rather than a true mass density in grams per liter — going from moles to mass would require the gas's molar weight, which isn't collected as an input, so don't confuse this figure with the density you'd measure on a gas of known identity. The isothermal curve chart plots pressure against volume from 1 to 50 liters while holding moles and temperature fixed at whatever values you entered (or computed), tracing the classic inverse P-V relationship at constant T. The biggest limitation to keep in mind: the ideal gas law assumes point-mass molecules with no intermolecular attraction, which breaks down at high pressure or low temperature where real gases condense or deviate significantly — this calculator won't warn you when you've entered conditions far outside where the ideal approximation actually holds.
Inputs
Results
Result
1.00066
The ideal gas law
- 1.Multiply moles, the gas constant and temperature
This product is the total thermal energy available to the gas. R is the bridge between a count of molecules and an energy — it exists precisely so this multiplication has consistent units.
- 2.Divide by the volume
Pressure is that energy spread over the space the gas occupies. Squeeze the same energy into less volume and the pressure rises in exact proportion.
Where the units go
- mol × L·atm/(mol·K) × K ÷ L mol · K · L→atm
Émile Clapeyron combined Boyle's, Charles' and Avogadro's separate observations into one equation of state, introducing the constant that carries the relationship between the amount of gas and its energy.
How to Use This Calculator
- Select which variable to solve for (pressure, volume, moles, or temperature).
- Enter the known values for the other three variables with appropriate units.
- Review the calculated result using the ideal gas law: PV = nRT.
- Use this for standard conditions — real gases deviate at high pressure or low temperature.
How the result changes with Volume (V)
| Volume (V) | Result |
|---|---|
| 11 | 2.0377 |
| 17 | 1.31851 |
| 34 | 0.65926 |
| 56 | 0.40026 |
What each input means
- Solve For
- Select which variable to solve for — the other three are inputs
- Pressure (P)
- Gas pressure in atmospheres (1 atm = 101.325 kPa)
- Volume (V)
- Gas volume in liters (22.4 L = 1 mol ideal gas at STP)
- Moles (n)
- Amount of gas in moles
- Temperature (T)
- Absolute temperature in Kelvin (0°C = 273.15 K)
How this is calculated
Formula
PV = nRTWorked example, using the default values
- Identify Input Parameters4 parametersSolve For = 1, Pressure (P) = 1, Volume (V) = 22.4, Moles (n) = 1 = 5 input(s) provided
- Calculate ResultResult1.00066 = 1.00066
- Calculate Solved VariableSolved VariablePressure (P) = Pressure (P)
- Calculate PressurePressure = P1.00066 = 1.00066
Engine last updated . Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Why does the field I'm solving for still show a value?
Whichever variable you select in Solve For gets recalculated by rearranging PV = nRT and overwrites the default or entered value for that field — for example, selecting Volume computes V = (n × R × T) / P, replacing whatever default volume was there. The displayed value for that output always reflects the calculated result, not an input you typed.
What is Molar Density actually measuring, and why isn't it a real density?
Molar density is simply moles divided by volume (n/V), computed directly from the same inputs used to solve the gas law. It is not mass density in grams per liter, because that would require the gas's molar weight, which this calculator never collects as an input — don't treat it as equivalent to the density you'd measure for a specific real gas.
Why does the P-V curve look the same shape no matter which variable I solve for?
The isotherm chart always plots pressure as (n × R × T) / volume across volumes from 1 to 50 liters, using whichever moles and temperature end up in the final result (whether entered or solved-for). It holds those two fixed and only varies volume, so the curve is always the same inverse relationship, just scaled by your specific n and T.
Why does the calculator use R = 0.08206 instead of the SI value of 8.314?
0.08206 L·atm/(mol·K) is the version of the gas constant matched to this calculator's chosen units — atmospheres for pressure, liters for volume — so the algebra works without any unit conversion. The kPa output is a display convenience computed from the atm result afterward, not a change to the underlying calculation.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Osmotic Pressure Calculator
Calculate osmotic pressure using the van't Hoff equation (π = iMRT). Convert between atm, kPa, mmHg, and psi.
ChemistryBoiling Point Elevation
Calculate the boiling point elevation of a solution from the ebullioscopic constant, molality, and van't Hoff factor.
Fluid PowerHydraulic Accumulator Calculator
Size a hydraulic bladder or piston accumulator using gas law calculations for isothermal or adiabatic processes.
ChemistryMolarity Calculator
Calculate the molarity (molar concentration) of a solution from solute mass, molar mass, and solution volume. Essential for chemistry lab work and solution preparation.
More in Science & Physics.