Ideal Gas Law Calculator (PV = nRT): what this tool is for
The online Ideal Gas Law calculator instantly solves the fundamental equation of state PV = nRT by calculating pressure (P), volume (V), amount of substance (n), absolute temperature (T), or gas mass (m).
Derived from the combined historical empirical laws of Boyle, Charles, Gay-Lussac, and Avogadro, the ideal gas equation unites thermodynamic state variables using the universal gas constant R = 8.314462618 J·mol⁻¹·K⁻¹.
The tool includes a multi-unit converter supporting all common pressure, volume, and temperature scales (atm, bar, Pa, kPa, hPa, psi, mmHg, Torr, L, mL, m³, °C, K, °F), while computing gas density (ρ) and molar volume (Vm) under specific experimental conditions.
With the built-in chemical formula parser, simply type your gas formula (He, N₂, O₂, CO₂, CH₄, etc.) to automatically retrieve IUPAC molar mass and compute total mass or density effortlessly.
All thermodynamic calculations execute strictly in your web browser: no experimental formulation data is transmitted over the network, ensuring instantaneous results and absolute privacy.
No file stored
Nothing is saved on our servers, during or after processing.
Local processing
The computation runs in your browser whenever the technology allows it.
Instant result
No waiting and no export queue: the result appears live.
Free, no account
No sign-up, no daily limit and no intrusive ads.
What this tool gives you
Full Multidirectional Solving
Solve for pressure, volume, moles, temperature, or mass seamlessly by switching the target variable with a single click.
Universal Unit Compatibility
Work freely in atmospheres, bars, pascals, torr/mmHg, liters, cubic meters, degrees Celsius, Fahrenheit, or Kelvin.
Automatic Molar Mass & Density
Parses chemical formulas to extract exact molar mass and determine gas density in g/L and kg/m³.
Built-in STP & SATP Standards
Directly benchmark your values against Standard Temperature and Pressure (STP 0 °C, 1 atm) and Standard Ambient conditions (SATP 25 °C, 1 bar).
Real-world examples
Standard physical constants and benchmark conditions used in solving the ideal gas equation of state.
Calculating the volume of 1 mole of gas at 0 °C and 1 atm (STP)
Given n = 1 mol, T = 0 °C = 273.15 K, and P = 1 atm = 101,325 Pa: V = (n × R × T) / P = (1 × 8.31446 × 273.15) / 101,325 = 0.022414 m³ = 22.414 L. This is the classical standard molar volume.
Calculating the mass of CO₂ inside a 10 L cylinder at 25 °C and 5 bar
With P = 5 × 10⁵ Pa, V = 0.010 m³, T = 298.15 K, and M(CO₂) = 44.01 g/mol: n = (500,000 × 0.010) / (8.31446 × 298.15) = 2.017 mol. The contained mass is m = n × M = 2.017 × 44.01 = 88.77 g.
How to use Ideal Gas Law Calculator (PV = nRT)
Select your target variable
Choose the physical property to determine: Pressure (P), Volume (V), Amount of substance (n), Temperature (T), or Mass (m).
Specify the gas formula or molar mass
Enter the chemical formula (e.g., CO2, He, N2) to automatically populate molar mass and calculate density.
Enter known parameters and unit preferences
Input known values using your preferred units for pressure (bar, atm, Pa, psi, mmHg), volume (L, mL, m³), and temperature (°C, K, °F).
Examine thermodynamic results and copy summary
Review calculated values, molar volume (Vm), and gas density (ρ), then copy the full summary directly to your clipboard.
Tips and mistakes to avoid
Always use absolute temperature in Kelvin
Thermodynamic equations require temperature in Kelvin: T(K) = T(°C) + 273.15. Calculations using Celsius produce meaningless results near 0 °C.
Consistent units in manual calculations
When using R = 0.082057 L·atm·mol⁻¹·K⁻¹, pressure must be in atmospheres and volume in liters. In SI units (Pa and m³), use R = 8.31446 J·mol⁻¹·K⁻¹.
STP vs SATP definitions
STP refers to 0 °C (273.15 K) and 1 atm (101.325 kPa) with Vm ≈ 22.414 L/mol. SATP corresponds to 25 °C (298.15 K) and 1 bar (100 kPa) with Vm ≈ 24.789 L/mol.
Avoid : Omitting Celsius-to-Kelvin conversion
Plugging 0 °C directly into PV = nRT yields an erroneous volume of 0 L. The true physical lower bound is absolute zero (0 K = -273.15 °C).
Avoid : Applying ideal gas equations at high pressures
Above 5–10 bar or near liquefaction temperatures, molecular covolume and intermolecular attractions require real gas models like the Van der Waals equation.
Frequently asked questions
Answers to the questions people ask about Ideal Gas Law Calculator (PV = nRT).
Related tools
Tools people open right after this one.
Updated on August 2026. See all tools