Fill any THREE of pressure, volume, amount and temperature; the fourth is solved.
Temperatures are converted to kelvin before any arithmetic, and pressures must be absolute, not gauge: a tyre gauge reading needs the atmosphere added (about 1.013 bar) before it belongs in these equations. Both conventions are explained below, because together they cause nearly every wrong gas-law answer ever submitted.
| Quantity | Value |
|---|
Disclaimer: This calculator gives estimates for general information only. It is not financial, medical or other professional advice. Pressure vessels and compressed gas are hazardous; design and filling work belongs to rated equipment and qualified practice, not to a web calculator.
What this calculator does
Solves the gas laws in the two forms they are actually used. The ideal gas law, PV = nRT, takes any three of pressure, volume, amount and temperature and returns the fourth, in the units you choose from six pressure units, three volume units and three temperature scales, with an optional mass that adds the gas density and the implied molar mass, the classic route to identifying an unknown gas. The combined gas law, P1V1/T1 = P2V2/T2, tracks a fixed amount of gas between two states: it takes any five of the six state values and returns the sixth, which covers Boyle’s law (temperature constant) and Charles’s law (pressure constant) as the special cases they are, without pretending they are separate physics. Temperatures are converted to kelvin internally on every path, pressures are treated as absolute, and the substitution is printed with the result so the arithmetic can be followed rather than trusted.
How to use it
- Leave exactly one blank in the chosen mode: the blank is what gets solved. Fill everything and the calculator refuses, because a fully specified state has no unknown; leave two blank and it refuses the other way, because one equation cannot fix two unknowns.
- Enter temperature in any scale and it is converted to kelvin before use. A temperature at or below absolute zero is refused with the reason, which catches the classic blunder of feeding Celsius into the formula raw: at 0 °C the gas has not stopped, and the combined law with raw Celsius divides by zero at exactly the point students try it.
- Pressure must be absolute. Gauges read the excess over atmospheric pressure; add the atmosphere (1.013 bar, 14.7 psi) to a gauge reading before entering it. Vacuum values are absolute already when quoted as a pressure, and the limitations return to this.
- The optional mass field turns an ideal-gas result into a density (mass over solved volume) and a molar mass (mass over solved moles), the pair of numbers gas-identification problems ask for. Leave it blank and those rows simply do not appear.
- The defaults are the room-temperature molar volume: one mole at 1 atm and 25 °C, the 24.47-litre figure that anchors gas intuition at working conditions, distinct from the 22.41 litres at 0 °C quoted for STP.
The method
Everything is computed in SI: pressure in pascals (atm 101,325 exactly; bar 100,000; mmHg 133.322387415; psi 6,894.757293168), volume in cubic metres, temperature in kelvin (K = °C + 273.15; K = (°F + 459.67) × 5/9), amount in moles, with R = 8.314462618 J/(mol·K), the exact value under the current SI mole definition. The ideal law is solved by straightforward rearrangement: P = nRT/V, V = nRT/P, n = PV/(RT), T = PV/(nR). The combined law follows from the ideal law at fixed n, P1V1/T1 = P2V2/T2 = nR, and is solved for whichever of the six is blank, with the two named special cases falling out by cancelling the constant quantity: T1 = T2 gives Boyle, P1 = P2 gives Charles, V1 = V2 gives the pressure law. Density = mass/V and molar mass = mass/n when a mass is supplied. Results are also converted back into the units selected and, for pressure and temperature, the neighbouring scales, so answers can be sanity-checked against the gauge or thermometer that produced the question. Full precision throughout, rounded only for display.
Worked examples
The default molar volume. One mole, 1 atm, 25 °C (298.15 K): V = nRT/P = 8.314462618 × 298.15 / 101,325 = 24.465 litres. The same mole at 0 °C takes 22.414 litres. Confusing the two reference temperatures is worth about 9% and a generation of mismatched textbook answers; the pair of figures is the fastest orientation check in gas work.
Boyle’s law inside the combined mode. The defaults there: 2 litres at 1 atm and 0 °C, compressed to 2 atm at the same temperature: V2 = P1V1/P2 = 1 × 2/2 = 1 litre exactly, volume halving as pressure doubles, which is Boyle’s law doing its one job.
A Charles’s law case. Same start, pressure held at 1 atm (enter P2 = 1), temperature raised to 100 °C: V2 = 2 × 373.15/273.15 = 2.732 litres. In raw Celsius the ratio would have been 100/0 and the problem infamous; in kelvin it is a 36.6% expansion, the arithmetic behind every hot-air balloon.
Identifying a gas. Ideal mode: a sample of 4.29 g occupies 2.4 litres at 1 atm and 25 °C. The solved amount is 0.0981 mol, so the molar mass is 4.29 / 0.0981 = 43.7 g/mol and the density 1.79 g/L: carbon dioxide (44.01 g/mol) within experimental slop, identified by two divisions from four measurements.
The gauge trap, priced. A tyre at 32 psi gauge is at 46.7 psi absolute. Run a heating calculation with 32 instead of 46.7 and the temperature effect is overstated by the ratio 46.7/32, roughly 46%: the single most expensive unit error in applied gas work, and it is a convention error, not an arithmetic one.
Reading your result
The verdict names the solved quantity with its substitution, and the table repeats the whole state in the units around it: pressure in the selected unit plus atm and kPa, volume in litres and the selected unit, temperature in kelvin and the entered scale. Sanity bands help: molar volumes near room conditions should sit near 24 to 25 litres per mole at 1 atm; a solved temperature wildly beyond the inputs (thousands of kelvin from a benchtop problem) usually means a Celsius value slipped into a kelvin slot or a gauge pressure stood in for an absolute one, and the table’s conversions make both visible. In combined mode, check the direction before the digits: compressing must shrink the volume, heating at fixed pressure must grow it, and a result that moves the wrong way has a swapped pair in it, which the printed substitution will show.
Limitations
- Ideal means ideal. Real gases deviate, measurably at high pressure, low temperature and near condensation (the compressibility factor Z leaves 1). For air at room conditions the law is accurate to well under a percent; for steam near saturation or CO2 near its critical point it is a first approximation only.
- The combined law holds the amount fixed. A leaking or venting system changes n between the two states and no rearrangement of P, V and T can see it; the balloon that loses gas while it warms needs the full ideal law at each state, not the combined shortcut.
- Absolute pressure is the user’s responsibility. The calculator converts units faithfully but cannot know whether a psi figure was gauge or absolute. When in doubt in tyre, tank and HVAC contexts, assume gauge and add the atmosphere.
- Mixtures are treated as one gas. The ideal law handles a mixture’s totals correctly (Dalton’s law sums partial pressures to the same PV = nRT with total n), but no per-component answers exist here; enter the component’s partial pressure and its own n for those.
- Nothing here rates a container. Solved pressures are arithmetic, not a statement that any vessel survives them.
Frequently asked questions
Why must temperature be in kelvin?
Because the law is proportional, and proportions need a true zero. Doubling temperature must double the thermal energy scale the law measures, which is only true from absolute zero: warming a gas from 10 °C to 20 °C is not doubling anything (it is a rise from 283.15 to 293.15 K, about 3.5%), and the combined law in raw Celsius gives a volume ratio of 2 for it, or division by zero at 0 °C. Kelvin is not a pedantic preference here; it is the only scale on which the equations are the equations. This calculator converts for you, but the conversion is load-bearing, not cosmetic.
Which R should I use?
The one matching your units, and this page removes the choice by working in SI with R = 8.314462618 J/(mol·K) and converting at the edges. The other R values in textbooks (0.082057 L·atm/(mol·K), 62.364 L·mmHg/(mol·K), 8.314 kPa·L/(mol·K)) are the same constant wearing unit conversions; most wrong answers blamed on R are really unit mismatches between the R chosen and the pressure or volume fed to it.
Is Boyle’s law a different calculation from the combined law?
It is the combined law with the temperature held constant, so T1 and T2 cancel and P1V1 = P2V2 remains; Charles’s law is the same object with pressure cancelling. Historically they were separate discoveries stitched together later, and many courses still teach them as three laws, but computationally there is one relation, which is why this page offers one combined mode with the constant quantity left equal, rather than three near-identical tools.
What changed with STP and the molar volume?
Two reference conventions circulate: the older STP (0 °C, 1 atm) gives the molar volume 22.414 L, while IUPAC’s current standard pressure of 1 bar at 0 °C gives 22.711 L, and room-temperature references (25 °C, 1 atm) give 24.465 L. None is wrong; each is a stated convention, and most inter-answer disputes in gas problems are two conventions colliding. This page states the state on every result, which is the whole defence.
Related calculators
Method: ideal gas law PV = nRT with R = 8.314462618 J/(mol·K), all arithmetic in SI with exact pressure conversions and kelvin temperatures; combined law P1V1/T1 = P2V2/T2 at fixed amount, Boyle and Charles as its constant-temperature and constant-pressure cases. Last reviewed: 24 October 2026.
