Ideal Gas Law Calculator – PV = nRT Pressure Solver
Use this free Ideal Gas Law Calculator to find the pressure of a gas from PV = nRT. Enter the volume, the amount of gas in moles and the temperature in kelvin, using R = 8.314 J/(mol·K).
One equation links the four quantities that describe a gas — its pressure, volume, temperature and amount — and it does so for every gas in the universe at once. PV = nRT does not care whether the gas is oxygen, helium or steam: count the moles, fix the temperature and the container, and the pressure is already decided. That indifference to chemistry is what makes the law so powerful. It means a single calculator can price the air in a scuba tank, the lift of a hot-air balloon and the atmosphere of a distant exoplanet, all with the same four letters.
The law is really four older gas laws wearing one coat. Squeeze a gas at fixed temperature and pressure rises in inverse proportion to volume (Boyle's law). Heat it at fixed pressure and it expands in proportion to its absolute temperature (Charles's law). Heat it in a sealed, rigid container and the pressure climbs instead (Gay-Lussac's law). Add more gas and either the pressure or the volume must grow to fit the extra particles (Avogadro's law). PV = nRT is what you get when all four behaviours are true at once — as, to a very good approximation, they are for every real gas at everyday conditions.
The one discipline the law demands is units, and above all temperature: the T must be absolute, in kelvin. That is not bureaucratic fussiness. The law says pressure is proportional to temperature, and proportionality only makes sense from a genuine zero — absolute zero, where particle motion itself runs out. A gas at 20 °C is not "twice as hot" as one at 10 °C in any physical sense (293 K against 283 K, a ratio of 1.035, not 2), and the gas laws know it. Convert first — K = °C + 273.15 — and the equation will reward you with answers that match the laboratory.
Formula
Ideal gas law PV = nRT, so pressure P = nRT ÷ V • P in pascals (Pa), V in cubic metres (m³), n in moles (mol), T in kelvin (K), R = 8.314 J/(mol·K)
Because the equation holds one of each quantity, it rearranges into a solver for any of them: V = nRT ÷ P, n = PV ÷ (RT) and T = PV ÷ (nR). Whichever you solve for, the unit discipline is the same and it is strict: pascals, not kilopascals or bar (1 bar = 100,000 Pa); cubic metres, not litres (divide litres by 1,000); moles, not grams (divide grams by the molar mass); and kelvin, never Celsius. Meet those four conditions and the SI answer drops out directly — pascals for pressure, cubic metres for volume, kelvin for temperature. This calculator solves for pressure and reports it in pascals and kilopascals.
| Symbol | Meaning | Units |
|---|---|---|
| P | pressure of the gas (absolute) | pascals (Pa) |
| V | volume the gas fills | cubic metres (m³) |
| n | amount of gas | moles (mol) |
| R | universal gas constant | 8.314 J/(mol·K) |
| T | absolute temperature | kelvin (K) |
Pressure is collisions — the particle picture behind PV = nRT
A gas is not a continuous jelly; it is a swarm of particles in frantic, random motion, and pressure is the drumming of that swarm against the container walls. Every collision delivers a tiny kick; billions of kicks per second merge into the steady push we read on a gauge. Read the equation through that picture and each variable becomes a knob on the collision rate. More moles (n) means more particles colliding. Higher temperature (T) means each particle moves faster, striking harder and more often. Smaller volume (V) crowds the same swarm into less space, so the walls are struck more frequently. Pressure is not in the equation by definition — it is what collisions add up to, and P = nRT/V is the swarm's arithmetic.
The picture also explains the law's limits before we ever state them. It assumes the particles are points with no size of their own and no attraction for one another — true enough when they are far apart and moving fast. Crowd them (high pressure) and their own volume stops being negligible; slow them (low temperature) and their mutual attractions start bending their paths, pulling the pressure below the ideal prediction, until at last the gas gives up and condenses into a liquid. The ideal law is the physics of a polite, well-spaced crowd; real gases at extremes stop being polite.
How to use
- Enter the volume of the container in cubic metres — if you know it in litres, divide by 1,000 (50 L = 0.05 m³).
- Enter the amount of gas in moles; from a mass in grams, divide by the gas's molar mass (oxygen O₂ = 32 g/mol, nitrogen N₂ = 28 g/mol, CO₂ = 44 g/mol).
- Enter the temperature in kelvin: K = °C + 273.15 (so 27 °C = 300.15 K ≈ 300 K).
- Click "Calculate Pressure" to get the pressure in pascals and kilopascals. For comparison, atmospheric pressure is 101,325 Pa.
Worked examples
Example 1 — pressure in a rigid container. A container of 0.05 m³ holds 2 mol of gas at 300 K.
P = nRT / V = (2 × 8.314 × 300) / 0.05 = 99,768 Pa = 99.77 kPa (about 0.98 atm)
Example 2 — a party balloon's worth of gas. A flexible tank holds 0.5 mol of helium in 0.01 m³ (10 litres) at 293 K (20 °C):
P = nRT ÷ V = (0.5 × 8.314 × 293) ÷ 0.01 = 1218 ÷ 0.01 ≈ 121,800 Pa = 121.8 kPa — about 1.2 atmospheres, a gently firm balloon rather than a strained one.
Example 3 — solving for temperature. A sealed cylinder at 200,000 Pa contains 2.5 mol of gas in 0.03 m³. How hot is it?
T = PV ÷ (nR) = (200,000 × 0.03) ÷ (2.5 × 8.314) = 6,000 ÷ 20.785 ≈ 288.7 K, which is 288.7 − 273.15 ≈ 15.5 °C — a cool room, not the furnace the big pascal figure might suggest. Large pressures do not automatically mean large temperatures.
Example 4 — the famous 22.4 litres. How much space does 1 mol of any ideal gas occupy at 0 °C (273.15 K) and standard pressure (101,325 Pa)?
V = nRT ÷ P = (1 × 8.314 × 273.15) ÷ 101,325 = 2271 ÷ 101,325 ≈ 0.02241 m³ = 22.4 litres. This is the molar volume quoted in every chemistry classroom — and notice it came out of the equation, not out of any property of a particular gas.
Example 5 — solving for volume. A welder's gas bottle must hold 3 mol of argon at 350 K against a pressure of 150,000 Pa. What volume is needed?
V = nRT ÷ P = (3 × 8.314 × 350) ÷ 150,000 = 8,729.7 ÷ 150,000 ≈ 0.0582 m³ = 58.2 litres — a large workshop cylinder, exactly the size such bottles are.
Example 6 — the tyre on a hot day. A sealed tyre's volume barely changes, so with n and V fixed, pressure tracks absolute temperature. Air filled at 293 K (20 °C) that reaches 323 K (50 °C) after a motorway run rises in pressure by the factor 323 ÷ 293 ≈ 1.102 — a 10.2% increase. This is why tyre pressures are specified "cold": the hot reading is supposed to be higher, and bleeding it down to the cold figure leaves the tyre under-inflated once it cools.
The ideal gas law in real life
Scuba and gas bottles. A 12-litre dive cylinder filled to 200 bar holds, by n = PV/(RT), roughly 200 × 10⁵ × 0.012 ÷ (8.314 × 293) ≈ 98.5 mol of air — about 2.9 kg — which is why a full tank is noticeably heavier and why its contents can be budgeted in minutes of breathing. Every compressed-gas trade, from welding to anaesthesia, runs this same calculation.
Hot-air balloons. A balloon's envelope is open at the bottom, so its pressure stays equal to the atmosphere's; heating the air inside therefore pushes air out, lowering n and so the density. The lift of a balloon is the ideal gas law read as a density statement: hot, sparse air inside, cool dense air outside.
Weather and altitude. Combine PV = nRT with gravity and you get the atmosphere itself: pressure and density fall off with height in a curve meteorologists use daily, and the reason a crisp packet puffs up on a mountain pass or in an aircraft cabin is the gas inside obeying the law against a falling outside pressure.
Engines. A diesel engine compresses air to perhaps a twentieth of its volume; even before fuel is injected, Gay-Lussac's share of the law has driven the temperature past 500 °C — hot enough to ignite the fuel on contact, no spark plug required. Petrol engines, compressing less, stay below ignition and keep their plugs.
Cooking at altitude. Water boils when its vapour pressure matches the surrounding pressure; on a high mountain the pressure — the same P this calculator computes — is lower, so water boils cooler and pasta takes longer. Pressure cookers are the deliberate reverse: raise P, raise the boiling point, cook faster.
Breathing and medicine. Ventilators and anaesthetic machines meter gases by moles in disguise: a flow at a stated pressure and temperature is a stated number of molecules per minute, and dosing depends on it. The law quietly underwrites the numbers on the dials.
When the ideal gas law fails
The law is a model, and like all good models it fails in informative places. Push a gas to very high pressure and the particles' own volume — ignored by the model — becomes a real fraction of the container, so the gas resists compression more than predicted. Cool it towards liquefaction and the attractions between particles — also ignored — pull the pressure below the ideal value, until droplets form and the "gas" is half liquid. Engineers patch the model with the van der Waals equation, which subtracts a volume allowance and adds an attraction term, at the price of two gas-specific constants. The rule of thumb: near room temperature and pressures of a few atmospheres or less, PV = nRT is accurate to a percent or better for common gases; at hundreds of atmospheres or near a boiling point, reach for the corrections.
One law, four older laws
Each classical gas law is PV = nRT with two variables held still. Fix T and n: PV = constant, which is Boyle's law (1662). Fix P and n: V ∝ T, Charles's law. Fix V and n: P ∝ T, Gay-Lussac's law. Fix P and T: V ∝ n, Avogadro's law — equal volumes, equal numbers of particles, the insight that made the mole inevitable. The combined law also yields the practical ratio form used for a fixed amount of gas changing state: P₁V₁/T₁ = P₂V₂/T₂, the workhorse behind Example 6's tyre. Seeing the four laws as one is not just tidiness — it is how you know which knob you are allowed to turn in any given problem.
Quick reference: values worth remembering
| Quantity | Value |
|---|---|
| gas constant R | 8.314 J/(mol·K) • 0.08206 L·atm/(mol·K) |
| standard atmospheric pressure | 101,325 Pa = 1.013 bar |
| molar volume at 0 °C, 1 atm | 22.4 litres |
| molar volume at 25 °C, 1 atm | ≈ 24.5 litres |
| room temperature | 293–298 K |
| 1 m³ | 1,000 litres |
| absolute zero | 0 K = −273.15 °C |
The molar volume rows deserve a pause: at 25 °C the same mole of gas takes 24.5 litres instead of 22.4 — the ratio 298/273.15 ≈ 1.091 applied to 22.4 gives 24.4–24.5, Charles's law doing mental arithmetic for you.
Common mistakes
- Using Celsius for T. The single most destructive gas-law error. At 20 °C the correct T is 293 K; entering 20 makes every answer about fifteen times too small, and at 0 °C it predicts zero pressure — a gas that pushes on nothing at all. Convert before you calculate, every time.
- Entering litres as cubic metres. 50 litres is 0.05 m³. Skipping the ÷ 1,000 shrinks the computed pressure a thousand-fold. The reverse slip — entering m³ where a formula expects litres with R = 0.08206 — inflates it just as badly. Match the volume unit to the R you are using.
- Using gauge pressure. A tyre gauge reads pressure above atmospheric. The gas law wants absolute pressure: gauge + 101,325 Pa. At low pressures the difference is not a detail — a "0.5 bar" gauge reading is really about 1.5 bar absolute, a three-fold error.
- Entering grams instead of moles. 32 g of oxygen is 1 mol, not 32. Forgetting to divide by the molar mass multiplies n — and therefore P — by the molar mass itself. If your pressure looks about 32 times too big for oxygen, this is why.
- Mixing forms of R. R = 8.314 belongs with pascals and cubic metres; R = 0.08206 belongs with atmospheres and litres. Either pair is self-consistent, but crossing them — litres with 8.314, say — scrambles the answer by factors of a thousand or a hundred thousand.
FAQ
Why must the temperature be in kelvin?
The gas laws are built on absolute temperature. A temperature in °C must first be converted: K = °C + 273.15. Using °C directly gives wrong answers.
What is an ideal gas?
A model gas whose particles have no volume and no forces between them. Real gases behave almost ideally at normal temperatures and pressures, so PV = nRT is a very good approximation.
How do I find moles from a mass?
Divide the mass in grams by the molar mass of the gas. For example, 32 g of oxygen (O₂, molar mass 32 g/mol) is exactly 1 mol.
How do I rearrange PV = nRT to find volume, moles or temperature?
The equation has one of each quantity, so each rearrangement is a single division: V = nRT ÷ P, n = PV ÷ (RT), and T = PV ÷ (nR). This calculator solves for pressure, but any of the four can be the unknown — just keep every other value in SI units (pascals, cubic metres, moles, kelvin) and the answer comes out in SI too.
What pressure is one atmosphere in pascals?
Standard atmospheric pressure is 101,325 Pa = 101.325 kPa, defined as the average pressure of Earth's atmosphere at sea level. A car tyre at 2.2 bar gauge is at about 220,000 Pa above atmospheric pressure — roughly 321,000 Pa absolute. Gas-law calculations should always use absolute pressure, not the gauge reading.
How many litres is a cubic metre?
One cubic metre is 1,000 litres, so 0.05 m³ — the container in Example 1 — is 50 litres. The most common gas-law slip is entering litres where the formula expects cubic metres: 50 entered instead of 0.05 makes the pressure a thousand times too small. Convert first: litres ÷ 1,000 = cubic metres.
What is a mole, in plain terms?
A mole is a counting unit, like a dozen but vastly bigger: 6.022 × 10²³ particles (Avogadro's number). One mole of any gas at the same temperature and pressure occupies the same volume — about 22.4 litres at 0 °C and 1 atm — because the volume is set by the particles' motion, not by what the particles are.
Does PV = nRT work for liquids or solids?
No. The law describes gases, whose particles fly freely and fill their container. Liquids and solids have strong forces between particles and nearly fixed volumes, so squeezing them barely changes their volume at all — their behaviour needs entirely different equations. The ideal gas law is a gas-only tool.
Why does a sealed spray can warn against heat?
With volume and moles fixed, pressure is proportional to absolute temperature: P₂/P₁ = T₂/T₁. A can at 3 bar absolute and 293 K (20 °C) left in a hot car at 333 K (60 °C) climbs to 3 × 333/293 ≈ 3.41 bar — and a can thrown on a fire heads towards pressures its seams were never built to hold. The warning label is this calculator's formula, printed in red.
What does R = 8.314 actually mean?
R is the universal gas constant: the energy scale that converts moles × kelvin into pressure × volume. Its value, 8.314 J/(mol·K), is the same for every ideal gas everywhere — it is built from Avogadro's number and Boltzmann's constant, the two bridges between the particle world and the laboratory world. Other unit systems use other forms of R (0.08206 L·atm/(mol·K), for instance), which is why you must match R to your units.