Back to Physics calculators

Ideal gas · PV = nRT · Density

Ideal gas law calculator (PV = nRT & gas laws)

Solve PV = nRT, the combined gas law, and gas density and molar mass problems with automatic unit conversions.

All calculations run in your browser; nothing is uploaded.

Other languages 日本語 | English | 简体中文 | Español | Português (Brasil) | Bahasa Indonesia | Français | हिन्दी | العربية

How to use (3 steps)

  1. Select the mode: ideal gas (PV = nRT), combined gas law, or density & molar mass.
  2. Choose the “Solve for” target, then fill the other fields with their units.
  3. Tap Compute to solve and see the steps. Copy URL shares the exact setup with units.

The page preloads a standard-state example and computes it automatically so you can review outputs immediately.

Use Ideal for one state (PV = nRT). Use Combined gas law for before/after conditions. Use Density & molar mass when relating ρ, M, P, and T with ρ = PM/(RT).

Inputs

If you enter °C, the tool converts to K automatically. You can mix units, and the solver runs in SI internally.

Ideal gas (PV = nRT)

mol

Results

How it's calculated

    FAQ

    Can I enter temperature in °C?

    Yes. Choose °C for the temperature unit and the calculator converts it to kelvin internally before solving.

    Which mode should I choose?

    Choose Ideal to solve PV = nRT for one variable. Choose Combined gas law to compare two states. Choose Density & molar mass to relate ρ, M, P, and T for one state.

    Which units are used in the calculation?

    The solver first converts inputs to SI units (Pa, m³, K, mol). It then selects the matching gas constant R for your chosen unit system.

    Is this valid for real gases?

    This tool assumes an ideal gas. Many gases follow it near room conditions, but at high pressure or low temperature real-gas corrections may be needed.

    Comments

    Click to load the discussion. Comments are powered by Giscus and load only when requested.