Solve PV=nRT for any variable, use the combined gas law, calculate partial pressures, density, and compare real gas behavior with interactive charts.
Use PV=nRT to solve for any variable, apply the combined gas law, calculate partial pressures, or explore real gas behavior.
T = 273.15 K (0°C)
P = 1 atm = 101.325 kPa
V_m = 22.4 L/mol
0.082057 L·atm/(mol·K)
8.314 J/(mol·K)
62.364 L·Torr/(mol·K)
PV = nRT
P₁V₁/T₁ = P₂V₂/T₂
P_total = Σ P_i
The ideal gas law, expressed as PV = nRT, is one of the most fundamental equations in chemistry and physics. It describes the relationship between four key properties of gases: pressure (P), volume (V), amount of substance in moles (n), and absolute temperature (T). The gas constant R links these variables in a predictable way for gases behaving "ideally"—meaning gas particles are treated as point masses with no volume and no intermolecular interactions.
This equation works remarkably well for most gases under everyday conditions: room temperature, atmospheric pressure, and common gases like nitrogen (N₂), oxygen (O₂), helium (He), and argon (Ar). When you inflate a balloon, pump air into a tire, or watch a gas expand when heated, the ideal gas law explains and predicts these behaviors quantitatively. It's the foundation for understanding gas behavior in chemistry courses, physics problems, and real-world applications from scuba diving to weather prediction.
The beauty of PV = nRT lies in its versatility: if you know any three of the four variables (P, V, n, T), you can calculate the fourth. Need to find how much gas (moles) is in a pressurized container? Rearrange to n = PV/(RT). Want to predict pressure after heating a fixed volume of gas? Solve for P = nRT/V. This makes the ideal gas law an incredibly powerful problem-solving tool for students and professionals alike.
Beyond the basic law, related principles build on this foundation: the combined gas law (comparing two states of the same gas), Dalton's law of partial pressures (for gas mixtures), and real gas corrections via the van der Waals equation (when ideal assumptions break down). Our calculator handles all these scenarios, providing instant solutions with proper unit conversions, visual P-V diagrams, and step-by-step guidance to deepen your conceptual understanding.
The ideal gas law bridges theory and practice. In academic settings, it's essential for general chemistry, physical chemistry, and introductory physics courses—appearing in homework, exams, and lab calculations. In industry, engineers use it to design pneumatic systems, chemical reactors, and HVAC equipment. Environmental scientists apply it to model atmospheric gases, while biomedical researchers use it for respiratory gas exchange calculations. Mastering PV = nRT is a cornerstone of scientific literacy.
This calculator simplifies the math while reinforcing the concepts. Enter your known values with appropriate units (the tool handles conversions automatically), choose which variable to solve for, and see results instantly. Whether you're checking homework, preparing for exams, designing experiments, or exploring "what if" scenarios (what happens if I double the temperature?), this tool provides accurate, reliable answers with educational context to help you understand why gases behave the way they do.
This calculator is designed to make ideal gas law calculations effortless while teaching you the underlying principles. Here's a comprehensive guide to each feature and calculation mode:
Choose the variable you need to calculate from the dropdown or radio buttons:
The calculator automatically rearranges PV = nRT to solve for your chosen variable. For example, selecting "Pressure" uses P = nRT/V.
Input the three remaining variables. The calculator supports multiple unit systems—select the units that match your problem:
Example input: Solve for pressure
V = 2.5 L, n = 0.10 mol, T = 298 K
Calculator will use R = 0.08206 L·atm/(mol·K) and compute P
Click "Calculate" or the submit button. The calculator automatically:
Calculation: P = nRT/V
P = (0.10 mol)(0.08206 L·atm/(mol·K))(298 K) / (2.5 L)
P = 2.445 / 2.5 = 0.978 atm
Results display shows:
Use the visualization (if available) to understand relationships: how pressure increases with temperature at constant volume, how volume scales inversely with pressure at constant temperature, etc.
Depending on the calculator's implementation, you may also access:
Understanding the mathematics behind PV = nRT helps you solve problems flexibly and catch errors. Here are the key equations and how to use them:
PV = nRT
The fundamental equation relating pressure, volume, moles, and temperature
Solve for P: P = nRT / V
Solve for V: V = nRT / P
Solve for n: n = PV / (RT)
Solve for T: T = PV / (nR)
Example: 0.50 mol gas at 350 K in 10 L container. Find P.
P = nRT/V = (0.50)(0.08206)(350) / 10
P = 14.36 / 10 = 1.436 atm
R has different numerical values depending on your unit system. Always match R to your pressure and volume units:
R = 0.08206 L·atm/(mol·K) ← Use with P in atm, V in L
R = 8.314 J/(mol·K) ← Use with P in Pa, V in m³
R = 8.314 kPa·L/(mol·K) ← Use with P in kPa, V in L
R = 62.36 L·mmHg/(mol·K) ← Use with P in mmHg, V in L
R = 1.987 cal/(mol·K) ← Use for thermodynamics with calories
Critical: Temperature MUST always be in Kelvin. Convert °C to K: K = °C + 273.15
P₁V₁ / T₁ = P₂V₂ / T₂
For a fixed amount of gas (n constant), relates initial state (1) to final state (2)
Derived from PV = nRT: P₁V₁ = nRT₁ and P₂V₂ = nRT₂. Dividing both by nR gives the combined law.
Example: Gas at 1 atm, 300 K, 5 L heated to 400 K. New volume at 1 atm?
P₁V₁/T₁ = P₂V₂/T₂ → (1)(5)/300 = (1)(V₂)/400
V₂ = (5)(400)/300 = 6.67 L
Ptotal = P₁ + P₂ + P₃ + ... = Σ Pi
Pi = yi × Ptotal
where yi = mole fraction = ni / ntotal
Example: Air (simplified): 0.78 mol N₂ + 0.22 mol O₂, Ptotal = 1 atm
PN₂ = (0.78 / 1.00) × 1 atm = 0.78 atm
PO₂ = (0.22 / 1.00) × 1 atm = 0.22 atm
d = PM / (RT)
Density d (g/L or kg/m³), M = molar mass (g/mol)
Derived from PV = nRT and n = m/M (mass/molar mass), then d = m/V. Useful for finding molar mass from density measurements.
Example: Gas density 1.43 g/L at 1 atm, 273 K. Find M.
M = dRT/P = (1.43)(0.08206)(273) / 1
M = 32.0 g/mol (likely O₂)
STP: T = 273.15 K (0°C), P = 1 atm (101.325 kPa)
Vmolar = 22.414 L/mol at STP
At STP, one mole of any ideal gas occupies 22.4 L. This is a useful reference point for stoichiometry and gas volume calculations.
The ideal gas law appears everywhere from classroom problem sets to industrial design. Here are detailed scenarios where this calculator provides real value:
Ideal gas law problems are staples in chemistry and physics curricula. Typical questions: "A 5 L container holds 0.2 mol gas at 300 K—what's the pressure?" or "How many moles of gas are in a balloon at 1 atm, 25°C, with volume 3 L?" Use this calculator to check your manual work, verify unit conversions, and build confidence. Practice with textbook problems by solving first, then confirming answers here.
When reactions involve gaseous reactants or products, use PV = nRT to convert between moles and gas volumes. Example: combustion of propane (C₃H₈) produces CO₂ gas. If you know moles of CO₂ from stoichiometry, calculate the volume at given temperature and pressure. This links gas laws with balanced equations and mole ratios—critical for lab predictions and industrial process design.
Weather balloons expand as they rise because atmospheric pressure decreases with altitude. Use the combined gas law to predict volume changes: if a balloon is filled with helium at sea level (1 atm, 298 K, 100 L) and rises to where pressure is 0.5 atm and temperature is 250 K, what's the new volume? Understanding this helps meteorologists design balloons that won't burst and explains why balloons pop at high altitudes.
Scuba tanks store compressed air. A tank at 200 atm and 298 K holds far more moles of air than the same volume at 1 atm. Calculate how many moles (or liters at STP) are in a tank to estimate dive duration. Dalton's law applies to breathing gas mixtures (nitrox, trimix) where partial pressures of O₂ and N₂ determine safety limits. Incorrect calculations can be dangerous—this tool helps divers and instructors verify their math.
Car tires are filled with air at ~32 psi (2.2 atm). When driving on a hot day, tire temperature increases from 25°C to 50°C. Use PV = nRT at constant volume (tire size fixed) to predict pressure rise: P₂ = P₁(T₂/T₁). Understanding this explains why tire pressure monitoring systems (TPMS) warn you about pressure changes and why race teams carefully manage tire temperatures for optimal performance.
Heating, ventilation, and air conditioning (HVAC) systems move large volumes of air. Engineers use ideal gas law to calculate air density at different temperatures (d = PM/(RT)), which affects fan power requirements and duct sizing. For example, hot air (low density) requires different fan speeds than cold air (high density) to achieve the same mass flow rate. Accurate gas calculations ensure efficient, cost-effective climate control.
Chemistry labs use compressed gas cylinders (nitrogen, helium, hydrogen, etc.). Knowing how many moles are in a cylinder at given pressure and temperature helps plan experiments without running out mid-reaction. Also critical for safety: if a cylinder leaks in a confined space, calculate how much gas escapes and whether it poses asphyxiation or combustion hazards. Gas law knowledge can prevent accidents.
Human lungs exchange O₂ and CO₂ gases. Partial pressure gradients drive diffusion: alveolar O₂ partial pressure (~100 mmHg) exceeds venous blood O₂ (~40 mmHg), so O₂ moves into blood. Medical professionals use Dalton's law and ideal gas concepts to interpret arterial blood gas (ABG) measurements, design ventilators, and understand conditions like hypoxia, hypercapnia, and altitude sickness. Gas laws are literally life-saving knowledge in medicine.
The ideal gas law requires absolute temperature in Kelvin. Using 25°C directly gives nonsense results because the equation isn't valid with Celsius's arbitrary zero point. ALWAYS convert: K = °C + 273.15. At 25°C, use T = 298.15 K. This is the #1 most common error in gas law calculations—triple-check your temperature unit before calculating.
If you use R = 0.08206 L·atm/(mol·K), pressure MUST be in atm and volume in L. Using kPa for pressure with this R gives wrong answers by a factor of ~100. Each R value is tied to specific units. The calculator handles this automatically, but when doing manual work, write out units in your calculation to ensure they cancel correctly: (mol)(L·atm/(mol·K))(K) / L = atm ✓
If volume is given in mL but you use R in L·atm/(mol·K), you must convert: 500 mL = 0.500 L. Similarly, 1 cm³ = 1 mL = 0.001 L, and 1 m³ = 1000 L. Unit conversion errors cause answers to be off by factors of 1000 or more. Always double-check that your volume matches your R's volume unit. Write "1000 mL = 1 L" at the top of your work as a reminder.
PV = nRT requires moles, not grams. If given mass (e.g., 16 g O₂), convert to moles: n = m/M = 16 g / 32.00 g/mol = 0.50 mol. Using 16 directly as "n" gives a result 32 times too large. Conversely, if you solve for n and get 0.5 mol, don't report "0.5 g"—convert back to mass if needed. Always track whether you're working with moles or grams.
PV = nRT only works for gases in the gas phase. Water vapor at 100°C and 1 atm is a gas (use ideal gas law). Liquid water at 25°C is NOT a gas (don't use PV = nRT). If a substance is below its boiling point at the given pressure, it's likely liquid or solid—ideal gas law doesn't apply. Check phase diagrams or boiling/melting points to confirm your substance is actually gaseous under the conditions you're analyzing.
Ideal gas law works best at low pressure and moderate-to-high temperature. At very high pressures (>10 atm), gas particles' own volume becomes significant. At very low temperatures (near condensation), intermolecular attractions matter. For CO₂ at 50 atm and 250 K, deviations from ideal behavior can exceed 10%. Use van der Waals corrections for accuracy in these regimes. For typical chemistry problems (1-5 atm, 273-400 K), ideal gas law is fine.
To solve for V, divide both sides by P: V = nRT/P (not V = P/(nRT)). To solve for T, divide by nR: T = PV/(nR) (not T = nR/(PV)). Algebra errors are common under exam pressure. Write out each step clearly: "Start with PV = nRT. Divide both sides by P: V = nRT/P." Check dimensional analysis—units should cancel to give you the correct result unit.
Gauge pressure measures pressure above atmospheric (e.g., tire gauge reads 32 psi but absolute pressure is 32 + 14.7 = 46.7 psi). PV = nRT requires absolute pressure. If a problem states "gauge pressure = 2 atm," add atmospheric pressure: Pabs = 2 + 1 = 3 atm. Always clarify whether given pressure is absolute or gauge—this distinction is critical in engineering and real-world applications.
If input data has 2 significant figures (e.g., V = 5.0 L, n = 0.10 mol), your answer should have 2 sig figs, not 5. Report P = 0.98 atm, not 0.978423 atm. Gas constant R is known to many decimal places, so it doesn't limit sig figs. Match your answer precision to your measured data precision. In homework, follow your instructor's sig fig rules carefully to avoid losing points on correct calculations.
When using P₁V₁/T₁ = P₂V₂/T₂, clearly label which state is "1" (initial/before) and "2" (final/after). If you mix them up—using Pbefore with Tafter—you'll get nonsense. Make a table: State 1 (before): P₁, V₁, T₁. State 2 (after): P₂, V₂, T₂. Fill in known values and solve for the unknown. This organization prevents confusion and makes your work easy to check.
At STP (273.15 K, 1 atm), one mole of any ideal gas occupies 22.414 L. This is a powerful reference: if you know moles, you instantly know volume at STP without calculation. For quick estimates: 0.5 mol ≈ 11 L, 2 mol ≈ 45 L at STP. Use this to sanity-check answers—if you calculate 100 L for 0.1 mol at near-STP conditions, something went wrong. Molar volume is like "1 dozen = 12" for gases.
Write out units in every step: P(atm) = n(mol) × R(L·atm/(mol·K)) × T(K) / V(L). Cancel units: (mol)(L·atm/(mol·K))(K) / L = atm ✓. If units don't cancel to your target, you either used wrong R or need unit conversion. This method catches errors before you get a nonsense answer. It's slower initially but builds confidence and prevents mistakes—especially valuable during timed exams.
PV = nRT emerges from kinetic theory: gas pressure comes from particle collisions with walls. Higher temperature → faster particles → more forceful collisions → higher pressure (at constant V). More moles → more particles → more collisions → higher pressure. Understanding the molecular basis helps you predict qualitative trends: "If I heat this gas, pressure must increase" without calculation. This conceptual grasp makes you a better problem-solver.
Many real problems involve changing conditions: a gas is heated, compressed, or moved to different altitude. Combined gas law (P₁V₁/T₁ = P₂V₂/T₂) is ideal for these. Make a table of initial (1) and final (2) states, fill in what you know, solve for the unknown. This structure works for all "before/after" gas problems and is faster than re-deriving from PV = nRT each time. Master this pattern for exam efficiency.
Ideal gas law assumes particles have zero volume and no attractions. Real gases deviate: particle volume matters at high pressure (molecules take up space), attractions matter at low temperature (slow particles stick together). Van der Waals equation corrects for these: [P + a(n/V)²][V - nb] = nRT. Parameters a (attraction) and b (volume) are gas-specific. For pressures >10 atm or near boiling points, consider real gas behavior. Most undergraduate problems stay in the ideal regime, but knowing the limits shows depth of understanding.
For gas mixtures, each component contributes to total pressure independently (Dalton's law). If you know mole fractions and total pressure, calculate each Pi = yi × Ptotal. Conversely, if you know partial pressures, Ptotal = ΣPi and yi = Pi/Ptotal. This connects gas laws to stoichiometry (mole ratios in reactions), breathing gas analysis, and atmospheric composition studies. It's a crucial skill for advanced chemistry and physiology courses.
Rearrange d = PM/(RT) to M = dRT/P. If you measure gas density at known temperature and pressure, you can find molar mass—a classic experiment for unknown gas identification. For example, density 2.86 g/L at STP gives M = (2.86)(0.08206)(273.15)/1 ≈ 64 g/mol (likely SO₂). This technique is used in chemistry labs and has historical significance (how molecular weights were first determined experimentally).
Ideal gas law integrates with broader chemistry: (1) Thermodynamics—work done by expanding gas is w = -PΔV; use PV = nRT to express work in terms of T and n. (2) Chemical equilibrium—Kp (pressure-based equilibrium constant) relates to Kc via ideal gas law. (3) Kinetics—reaction rates for gas-phase reactions depend on concentrations, which connect to partial pressures via PV = nRT. Seeing these connections makes chemistry feel unified rather than disconnected topics.
Apply ideal gas law to real scenarios: tire pressure changes on cold mornings, helium balloon floating, propane tank capacity, air density affecting airplane lift. Real numbers make abstract equations tangible. For example, calculate how many moles of air are in your lungs (assume 6 L at body temperature 310 K and atmospheric pressure). You'll find ~0.24 mol, which feels meaningful when you consider each breath exchanges gases with your blood. This practice builds intuition and motivation.
Keep a one-page cheat sheet: (1) R values in all common unit systems, (2) STP conditions, (3) Conversion factors (1 atm = 101.325 kPa = 760 mmHg, 0°C = 273.15 K, 1 L = 1000 mL), (4) Common molar masses (N₂ = 28, O₂ = 32, He = 4, CO₂ = 44 g/mol). Having this at your fingertips during homework or open-note exams saves time and reduces errors. Eventually you'll memorize the most important values, but the sheet is insurance.
Explore these complementary tools for comprehensive chemistry problem solving
Calculate molecular weight from chemical formulas, convert grams to moles for gas calculations
Balance chemical reactions, find limiting reagents, calculate theoretical yields for gas reactions
Calculate Gibbs free energy, enthalpy, and entropy changes for gas-phase reactions
Calculate pH, pOH, and concentrations for acidic/basic solutions and gas solubility
Solve C₁V₁ = C₂V₂ for solution dilutions, concentrations, and gas mixture preparations
Convert between pressure units (atm, Pa, Torr), temperature (K, °C, °F), and volume units
Discover our complete suite of chemistry tools for equations, thermodynamics, solutions, and more
Browse All Chemistry Tools