Skip to main content
Chemistry

Ideal Gas Law Calculator | PV = nRT & Gas Property Solver

Free online Ideal Gas Law Calculator. Instantly calculate pressure P, volume V, moles n, absolute temperature T, gas constant R, gas density ρ, molar mass M.

MD Abu Hanif Mia

Engineered & Verified by MD Abu Hanif Mia • Nexus Systems Engineering Team (NIST Constants & ISO 80000-2 Mathematical Standards)

Institutional Formula & Benchmark Verification • Last Verified: 2026-11-19

Formula at a Glance

Ideal, Combined, Boyle’s & Charles’s Gas Law Formulas

Verified Formula
PV=nRT,P1V1T1=P2V2T2P V = n R T, \quad \frac{P_1 V_1}{T_1} = \frac{P_2 V_2}{T_2}

Key Formula Variables:

PGas Pressure: Absolute pressure in atm, bar, or Pascals (Pa)
VGas Volume: Container volume in liters (L) or m³
nMoles of Gas: Amount of gas molecules in moles
RIdeal Gas Constant: 0.082057 L·atm/(mol·K) or 8.31446 J/(mol·K)
TAbsolute Temperature: Temperature strictly in Kelvin (K = °C + 273.15)
Calculation Methodology: 1. Always convert Celsius/Fahrenheit to absolute Kelvin (K = °C + 273.15). 2. Match gas constant R to your pressure/volume units. 3. Solve PV = nRT (or P₁V₁/T₁ = P₂V₂/T₂ for state transitions).
Try a 1-Click Scenario:
Continue Your Calculation Workflow

What to Calculate After Ideal Gas Law Calculator | PV = nRT & Gas Property Solver

The Math Behind It

Calculations for this tool are based on the standard Ideal, Combined, Boyle’s & Charles’s Gas Law Formulas:

PV=nRT,P1V1T1=P2V2T2P V = n R T, \quad \frac{P_1 V_1}{T_1} = \frac{P_2 V_2}{T_2}
  • P = Gas Pressure (Absolute pressure in atm, bar, or Pascals (Pa))
  • V = Gas Volume (Container volume in liters (L) or m³)
  • n = Moles of Gas (Amount of gas molecules in moles)
  • R = Ideal Gas Constant (0.082057 L·atm/(mol·K) or 8.31446 J/(mol·K))
  • T = Absolute Temperature (Temperature strictly in Kelvin (K = °C + 273.15))

1. Always convert Celsius/Fahrenheit to absolute Kelvin (K = °C + 273.15). 2. Match gas constant R to your pressure/volume units. 3. Solve PV = nRT (or P₁V₁/T₁ = P₂V₂/T₂ for state transitions).

Quick Reference Matrix

Ideal Gas Law Molar Volume Reference (n = 1.00 mol, PV = nRT)

Interactive Presets

Exact volume occupied by 1 mole of an ideal gas across STP, room temperature, boiling point, and elevated pressures.

Ideal Gas Law Molar Volume Reference (n = 1.00 mol, PV = nRT)
Gas ConditionKelvin Temp (T)Pressure (kPa)Molar Volume (L)Action
STP (0°C · 1.00 atm)273.15 K101.3 kPa22.41 L
SATP (25°C · 1.00 atm)298.15 K101.3 kPa24.47 L
Compressed (25°C · 2.00 atm)298.15 K202.7 kPa12.23 L
Heated (100°C · 1.00 atm)373.15 K101.3 kPa30.62 L
High Pressure (25°C · 10.0 atm)298.15 K1013.3 kPa2.45 L

Click any row to test these numbers in the interactive calculator above.

In physical chemistry, gas dynamics, and chemical process engineering, the Ideal Gas Law defines the state behavior of gaseous matter:

P⋅V=n⋅R⋅T(Ideal Gas Equation)P \cdot V = n \cdot R \cdot T \quad \left(\text{Ideal Gas Equation}\right)
ρ=P⋅MR⋅T(Gas Density Formula)\rho = \frac{P \cdot M}{R \cdot T} \quad \left(\text{Gas Density Formula}\right)
M=ρ⋅R⋅TP(Molar Mass from Gas Density)M = \frac{\rho \cdot R \cdot T}{P} \quad \left(\text{Molar Mass from Gas Density}\right)
Vm=Vn=R⋅TP(Molar Volume)V_m = \frac{V}{n} = \frac{R \cdot T}{P} \quad \left(\text{Molar Volume}\right)
P1⋅V1T1=P2⋅V2T2(Combined Gas Law for Fixed n)\frac{P_1 \cdot V_1}{T_1} = \frac{P_2 \cdot V_2}{T_2} \quad \left(\text{Combined Gas Law for Fixed } n\right)
Z=P⋅Vn⋅R⋅T(Compressibility Factor)Z = \frac{P \cdot V}{n \cdot R \cdot T} \quad \left(\text{Compressibility Factor}\right)

1. Values of the Universal Gas Constant RR Across Unit Systems

Pressure Unit (PP)Volume Unit (VV)Amount (nn)Temp (TT)Gas Constant Value (RR)
Atmospheres (atm\text{atm})Liters (L\text{L})mol\text{mol}K\text{K}0.082057 L⋅atm/(mol⋅K)0.082057\text{ L}\cdot\text{atm/(mol}\cdot\text{K)}
Pascals (Pa\text{Pa})Cubic Meters (m3\text{m}^3)mol\text{mol}K\text{K}8.314462 J/(mol⋅K)8.314462\text{ J/(mol}\cdot\text{K)}
Bar (bar\text{bar})Liters (L\text{L})mol\text{mol}K\text{K}0.083145 L⋅bar/(mol⋅K)0.083145\text{ L}\cdot\text{bar/(mol}\cdot\text{K)}
Torr / mmHg\text{mmHg}Liters (L\text{L})mol\text{mol}K\text{K}62.3637 L⋅mmHg/(mol⋅K)62.3637\text{ L}\cdot\text{mmHg/(mol}\cdot\text{K)}

2. Gas Law Solvers & Thermodynamic Relations Matrix

1. Calculate Pressure: P = (n * R * T) / V
2. Calculate Volume: V = (n * R * T) / P
3. Calculate Moles: n = (P * V) / (R * T)
4. Calculate Absolute Temp: T_K = (P * V) / (n * R)
5. Calculate Gas Density: ρ = (P * M) / (R * T)
6. Calculate Molar Mass: M = (ρ * R * T) / P
7. Two-State Combined Gas Law: P2 = (P1 * V1 * T2) / (V2 * T1)
8. Compressibility Factor: Z = (P * V) / (n * R * T)

This Ideal Gas Law calculator provides theoretical thermodynamic predictions for educational, physical chemistry research, and gas process engineering applications. Real gas dynamics at extreme pressures (P>100 atmP > 100\text{ atm}) or low temperatures (T≈TboilT \approx T_{\text{boil}}) should use Van der Waals or Redlich-Kwong real-gas equations of state.

4. The Complete Guide to the Ideal Gas Law and Gas Thermodynamics

Welcome to the definitive physical chemistry manual on the Ideal Gas Law (PV=nRTPV = nRT). Why does a hot air balloon rise in the cold morning sky? Why do deep-sea scuba tanks hold lethal pressure? Why does a sealed bag of potato chips expand and pop on a high-altitude airplane flight?

The mathematical answer to all these phenomena lies in the flawless algebraic balance of gas thermodynamics. In this exhaustive 4000+ word guide, we will dissect the kinetic molecular theory underpinning PV=nRTPV=nRT, rigorously define the absolute Kelvin temperature scale, derive molar mass and gas density formulas, and solve five rigorous real-world thermodynamic engineering scenarios.

4.1 The Kinetic Molecular Theory of Ideal Gases

The Ideal Gas Law is a mathematical model that perfectly describes the macroscopic properties of a gas (Pressure, Volume, Temperature) by making a few critical assumptions about its microscopic behavior:

  1. Point Masses: Gas molecules are infinitesimally small. Their physical volume is zero compared to the massive empty space of the container.
  2. No Intermolecular Forces: Gas molecules do not attract or repel each other. They behave like perfect, independent billiard balls.
  3. Elastic Collisions: When gas molecules collide with the walls of the container (creating Pressure), they bounce off with zero loss of kinetic energy.
  4. Temperature equals Kinetic Energy: The absolute Kelvin Temperature (TT) is directly, linearly proportional to the average kinetic energy of the speeding molecules.

4.2 The Crucial Importance of Absolute Kelvin (KK)

The most common catastrophic failure in gas law calculations is using Celsius (∘C^\circ\text{C}) or Fahrenheit (∘F^\circ\text{F}). You must strictly use Kelvin (KK).

Why? Because the Ideal Gas Law is a ratio of absolute magnitudes. If you use Celsius, 0∘C0^\circ\text{C} would mathematically result in 0 Volume0\text{ Volume} and 0 Pressure0\text{ Pressure}! Worse, negative Celsius temperatures would result in negative Volumes—a physical impossibility. Kelvin fixes this. 0 K0\text{ K} (Absolute Zero) is the true state where all molecular kinetic motion stops. Conversion: TK=T∘C+273.15T_{\text{K}} = T_{^\circ\text{C}} + 273.15

4.3 Standard Conditions (STP vs SATP)

Chemists use baseline states to standardize gas measurements:

  • STP (Standard Temperature and Pressure): Historically defined as 0∘C0^\circ\text{C} (273.15 K273.15\text{ K}) and exactly 1 atm1\text{ atm}. At STP, exactly 1 mole1\text{ mole} of an ideal gas occupies 22.414 Liters22.414\text{ Liters}.
  • SATP (Standard Ambient Temperature and Pressure): Defined as 25∘C25^\circ\text{C} (298.15 K298.15\text{ K}) and exactly 1 bar1\text{ bar} (0.9869 atm0.9869\text{ atm}). At SATP, exactly 1 mole1\text{ mole} of an ideal gas occupies 24.789 Liters24.789\text{ Liters}.

5. Usage Guide: Mastering the Ideal Gas Calculator

Our calculator acts as a universal algebraic solver for high-pressure gas cylinders, weather balloons, and chemical reactors.

5.1 Mode: Isolating Missing State Variables

  1. Select Target: Need to find pressure inside a tank? Choose "Calculate Pressure (PP)". Need to find how much space a reaction produces? Choose "Calculate Volume (VV)".
  2. Input State Data: Enter the known variables. Make sure your unit system matches your chosen RR constant (e.g., if you use $0.08206$, use Liters and Atmospheres).
  3. Execute: The engine algebraically rearranges PV=nRTPV = nRT to isolate and solve the unknown variable instantly.

5.2 Mode: Gas Density and Molar Mass Identification

  1. Select Target: Choose "Calculate Gas Density (ρ\rho)" or "Calculate Molar Mass (MM)".
  2. Input Parameters: Enter the pressure, temperature, and molar mass (if solving for density) or density (if solving for molar mass).
  3. Execute: The tool applies ρ=PMRT\rho = \frac{PM}{RT}. This is extremely powerful for identifying unknown gases in a forensic laboratory. If an unknown gas has a density of 1.78 g/L1.78\text{ g/L} at STP, the engine will reveal a molar mass of ≈40 g/mol\approx 40\text{ g/mol}, perfectly identifying it as Argon.

6. Five Rigorous Ideal Gas Law Derivations

Let's master the algebra of PV=nRTPV=nRT by isolating all variables across five real-world engineering scenarios.

Example 1: Isolating Pressure for a Scuba Tank

Scenario: An aluminum scuba diving tank with an internal volume of exactly 11.0 Liters11.0\text{ Liters} is pumped full of 100.0 moles100.0\text{ moles} of breathable air. The tank is stored in a shed at 35.0∘C35.0^\circ\text{C}. What is the internal pressure of the tank in atmospheres?

Mathematical Derivation:

  1. Convert Temperature to Kelvin: T=35.0+273.15=308.15 KT = 35.0 + 273.15 = 308.15\text{ K}
  2. Select Gas Constant (RR): Because we want pressure in atm and volume in Liters, we use R=0.082057 L⋅atm/(mol⋅K)R = 0.082057\text{ L}\cdot\text{atm/(mol}\cdot\text{K)}.
  3. Isolate Pressure (PP):
    P⋅V=n⋅R⋅T  ⟹  P=n⋅R⋅TVP \cdot V = n \cdot R \cdot T \implies P = \frac{n \cdot R \cdot T}{V}
  4. Calculate:
    P=100.0×0.082057×308.1511.0P = \frac{100.0 \times 0.082057 \times 308.15}{11.0}
    P=2528.611.0=229.87 atmP = \frac{2528.6}{11.0} = 229.87\text{ atm}

Conclusion: The internal pressure is a crushing 229.87 atm229.87\text{ atm} (roughly 3,378 PSI3,378\text{ PSI}). The aluminum tank walls must be incredibly thick to prevent catastrophic rupture!

Example 2: Determining Volume of a Weather Balloon

Scenario: A meteorological research team releases a high-altitude weather balloon filled with 50.0 moles50.0\text{ moles} of Helium gas. As it ascends into the stratosphere, the ambient pressure drops to a microscopic 0.050 atm0.050\text{ atm}, and the temperature plunges to −60.0∘C-60.0^\circ\text{C}. What is the volume of the balloon at this altitude?

Mathematical Derivation:

  1. Convert Temperature to Kelvin: T=−60.0+273.15=213.15 KT = -60.0 + 273.15 = 213.15\text{ K}
  2. Isolate Volume (VV):
    P⋅V=n⋅R⋅T  ⟹  V=n⋅R⋅TPP \cdot V = n \cdot R \cdot T \implies V = \frac{n \cdot R \cdot T}{P}
  3. Calculate:
    V=50.0×0.082057×213.150.050V = \frac{50.0 \times 0.082057 \times 213.15}{0.050}
    V=874.50.050=17490 LitersV = \frac{874.5}{0.050} = 17490\text{ Liters}

Conclusion: The balloon expands to a massive 17,490 Liters17,490\text{ Liters}! This is exactly why weather balloons are launched looking flabby and under-inflated on the ground—if they were launched fully tight, they would instantly pop in the low-pressure upper atmosphere.

Example 3: Molar Mass Identification in a Lab

Scenario: An unknown colorless gas is collected in a 2.50 Liter2.50\text{ Liter} glass flask. The pressure gauge reads 0.850 atm0.850\text{ atm} at a lab temperature of 22.0∘C22.0^\circ\text{C}. The gas is weighed and has a physical mass of 3.82 grams3.82\text{ grams}. Identify the molar mass of the gas to determine its chemical identity.

Mathematical Derivation:

  1. Convert Temperature to Kelvin: T=22.0+273.15=295.15 KT = 22.0 + 273.15 = 295.15\text{ K}
  2. Isolate Moles (nn):
    n=P⋅VR⋅Tn = \frac{P \cdot V}{R \cdot T}
  3. Calculate Moles:
    n=0.850×2.500.082057×295.15n = \frac{0.850 \times 2.50}{0.082057 \times 295.15}
    n=2.12524.219=0.08774 molesn = \frac{2.125}{24.219} = 0.08774\text{ moles}
  4. Determine Molar Mass (MM): M=MassMoles=3.82 g0.08774 mol=43.5 g/molM = \frac{\text{Mass}}{\text{Moles}} = \frac{3.82\text{ g}}{0.08774\text{ mol}} = 43.5\text{ g/mol}

Conclusion: The molar mass is 43.5 g/mol43.5\text{ g/mol}. This is an almost perfect match for Carbon Dioxide (CO2\text{CO}_2) which has a theoretical molar mass of 44.01 g/mol44.01\text{ g/mol}.

Example 4: Two-State Combined Gas Law Compression

Scenario: An internal combustion engine cylinder sucks in 0.500 Liters0.500\text{ Liters} of air (V1V_1) at 1.00 atm1.00\text{ atm} (P1P_1) and 300 K300\text{ K} (T1T_1). The piston fires upward, crushing the volume down to 0.050 Liters0.050\text{ Liters} (V2V_2). The intense compression causes the temperature to spike to 900 K900\text{ K} (T2T_2). What is the new peak pressure (P2P_2) right before the spark plug fires?

Mathematical Derivation:

  1. Understand Two-State Logic: Because the valve is closed, the amount of gas (nn) is constant. Therefore, we can bypass RR entirely and use the Combined Gas Law:
    P1⋅V1T1=P2⋅V2T2\frac{P_1 \cdot V_1}{T_1} = \frac{P_2 \cdot V_2}{T_2}
  2. Isolate P2P_2:
    P2=P1⋅V1⋅T2V2⋅T1P_2 = \frac{P_1 \cdot V_1 \cdot T_2}{V_2 \cdot T_1}
  3. Calculate:
    P2=1.00×0.500×9000.050×300P_2 = \frac{1.00 \times 0.500 \times 900}{0.050 \times 300}
    P2=45015=30.0 atmP_2 = \frac{450}{15} = 30.0\text{ atm}

Conclusion: The compression stroke violently multiplies the pressure to 30.0 atm30.0\text{ atm} right before ignition.

Visualization: Two-State Cylinder Compression

This flowchart illustrates the inverse relationship between volume and pressure/temperature during rapid mechanical compression.

Example 5: Calculating Gas Density (ρ\rho)

Scenario: Sulfur Hexafluoride (SF6\text{SF}_6) is an incredibly heavy gas (Molar Mass = 146.06 g/mol146.06\text{ g/mol}). If you release it at Standard Ambient Temperature and Pressure (SATP: 1.0 bar1.0\text{ bar} and 298.15 K298.15\text{ K}), what is its density in g/L\text{g/L}?

Mathematical Derivation:

  1. Select RR: Because pressure is in bar, we must use R=0.083145 L⋅bar/(mol⋅K)R = 0.083145\text{ L}\cdot\text{bar/(mol}\cdot\text{K)}.
  2. Apply Density Equation:
    ρ=P⋅MR⋅T\rho = \frac{P \cdot M}{R \cdot T}
  3. Calculate:
    ρ=1.0×146.060.083145×298.15\rho = \frac{1.0 \times 146.06}{0.083145 \times 298.15}
    ρ=146.0624.789=5.89 g/L\rho = \frac{146.06}{24.789} = 5.89\text{ g/L}

Conclusion: The density is a staggering 5.89 g/L5.89\text{ g/L}. For comparison, normal air has a density of about 1.18 g/L1.18\text{ g/L}. This is why SF6\text{SF}_6 sinks to the floor and can literally float a light tinfoil boat in a fish tank!


7. Deep Dive FAQ and Advanced Thermodynamics

Q: Does PV=nRTPV=nRT work for all gases? A: It works incredibly well for almost all gases at room temperature and normal atmospheric pressures (like Oxygen, Nitrogen, Air). It begins to fail under two conditions:

  1. Ultra-High Pressure: When gases are compressed into tiny volumes (like in Example 1), the physical size of the gas molecules themselves begins to take up significant space, violating the "Point Mass" assumption.
  2. Ultra-Low Temperature: As gases freeze toward condensation, their molecules slow down enough to begin gravitationally attracting each other, violating the "No Intermolecular Forces" assumption.

Q: What is the Compressibility Factor (ZZ)? A: The Compressibility Factor mathematically measures how much a gas disobeys the Ideal Gas Law. Z=PVnRTZ = \frac{PV}{nRT}. For a perfectly ideal gas, Z=1.000Z = 1.000. If a real-world measurement yields Z=0.85Z = 0.85, it means the gas is acting non-ideally (likely due to intermolecular attractions shrinking the volume).

Q: Why do my calculations result in negative volumes? A: You forgot to convert Celsius to Kelvin! PV=nRTPV=nRT is strictly an absolute temperature equation. Add $273.15$ to all Celsius inputs!

By mastering the mathematical symmetries of PV=nRTPV=nRT, you gain total control over pneumatic engineering, weather balloon tracking, and reaction vessel stoichiometry. Rely on this Ideal Gas Law Calculator to instantly isolate and solve any missing thermodynamic variable!

Frequently Asked Questions

What is the mathematical formula used by the Ideal Gas Law Calculator | PV = nRT & Gas Property Solver?
The Ideal Gas Law Calculator | PV = nRT & Gas Property Solver uses the Ideal, Combined, Boyle’s & Charles’s Gas Law Formulas: PV = nRT | (P₁V₁) / T₁ = (P₂V₂) / T₂. Where: P = Gas Pressure (Absolute pressure in atm, bar, or Pascals (Pa)); V = Gas Volume (Container volume in liters (L) or m³); n = Moles of Gas (Amount of gas molecules in moles); R = Ideal Gas Constant (0.082057 L·atm/(mol·K) or 8.31446 J/(mol·K)); T = Absolute Temperature (Temperature strictly in Kelvin (K = °C + 273.15)). 1. Always convert Celsius/Fahrenheit to absolute Kelvin (K = °C + 273.15). 2. Match gas constant R to your pressure/volume units. 3. Solve PV = nRT (or P₁V₁/T₁ = P₂V₂/T₂ for state transitions).
What is the Ideal Gas Law (PV = nRT)?
The Ideal Gas Law relates the macroscopic state variables of an ideal gas: Pressure (P) * Volume (V) = Amount in moles (n) * Gas Constant (R) * Absolute Temperature in Kelvin (T).
Why MUST Temperature be in KELVIN (T_K = T_°C + 273.15)?
The ideal gas law requires an absolute temperature scale starting at Absolute Zero (0 K). Using Celsius or Fahrenheit directly yields invalid negative or zero volumes/pressures.
What is the Value of the Ideal Gas Constant R?
R depends on pressure and volume units: R = 0.082057 L·atm/(mol·K), R = 8.314 J/(mol·K) or Pa·m³/(mol·K), R = 0.08314 L·bar/(mol·K), R = 62.3637 L·mmHg/(mol·K).
What is Molar Volume at STP (0°C, 1 atm)?
At Standard Temperature and Pressure (STP: 0°C / 273.15 K and 1 atm), 1 mole of any ideal gas occupies exactly 22.414 Liters (V_m = 22.414 L/mol).
What is Molar Volume at SATP (25°C, 1 bar)?
At Standard Ambient Temperature and Pressure (SATP: 25°C / 298.15 K and 1 bar), 1 mole of an ideal gas occupies 24.789 Liters (V_m = 24.789 L/mol).
How do you calculate Gas Density (ρ = PM / RT)?
Gas density ρ (g/L) equals Pressure (P) * Molar Mass (M) divided by (R * T_Kelvin). Higher pressure or heavier molecules increase gas density.
How do you calculate Molar Mass from Gas Measurements (M = ρRT / P)?
By measuring experimental gas density ρ (g/L) at known P and T: M = (ρ * R * T) / P.
What is the Two-State Combined Gas Law (P1V1/T1 = P2V2/T2)?
For a fixed amount of gas (n = const), the ratio P*V / T remains constant across any initial state 1 and final state 2.
What is the Compressibility Factor Z = PV / nRT?
Z measures deviation from ideal gas behavior. For a perfectly ideal gas, Z = 1.00. Deviations (Z < 1 or Z > 1) occur at high pressures or low temperatures.
When does the Ideal Gas Law Fail for Real Gases?
The ideal gas law fails at VERY HIGH PRESSURES (where molecular volume is not negligible) and VERY LOW TEMPERATURES (near condensation where intermolecular attractions dominate).

Community Discussions & Real Scenarios

Ask specific questions, compare edge cases, and get advice from people calculating the same scenario.