# What does the ideal gas law give?

Solves the ideal gas law PV = nRT for pressure, volume, moles or temperature, from moles or from a mass and molar mass, in atm, kPa, torr, liters, °C and kelvins.

- Page: https://www.acalculator.org/chemistry/ideal-gas-law-calculator
- JSON spec: https://www.acalculator.org/chemistry/ideal-gas-law-calculator.json
- Version: 22338ce85320

## Default answer

Example with the default inputs (Find Volume, Pressure (P) 0.980263157894737 atm, Amount as Mass, Mass of gas 655 g, Molar mass, g/mol 16.04, Temperature (T) 76.9999999999999 °F): The answer is V = 1019.17 L.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| find | Find | Which of pressure, volume, amount and temperature to work out from the other three. |
| P | Pressure (P) | The absolute pressure of the gas, not a gauge reading. |
| V | Volume (V) | The volume the gas fills. |
| as | Amount as | Type the amount of gas in moles, or as a mass and its molar mass. |
| n | Amount (n), mol | The amount of gas in moles. |
| m | Mass of gas | The mass of the gas. |
| M | Molar mass, g/mol | The molar mass of the gas in grams per mole (16.04 for methane, 28.01 for nitrogen gas). |
| T | Temperature (T) | The gas temperature; above absolute zero. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| result | Answer | The value worked out, to 6 significant figures. |
| atm | Pressure (atm) | The pressure in standard atmospheres. |
| kpa | Pressure (kPa) | The pressure in kilopascals. |
| liters | Volume (L) | The volume in liters. |
| moles | Amount (mol) | The amount of gas in moles. |
| grams | Mass (g) | The mass of gas in grams: moles × molar mass. |
| kelvin | Temperature (K) | The absolute temperature in kelvins. |
| celsius | Temperature (°C) | The temperature in degrees Celsius. |

## Method

PV = nRT with R = 8.31446261815324 J/(mol·K) (0.0820574 L·atm/(mol·K)). P = nRT ÷ V; V = nRT ÷ P; n = PV ÷ RT; T = PV ÷ nR. From a mass: n = mass ÷ molar mass.

## Assumptions

- The gas behaves as an ideal gas: a fair model at ordinary pressures and temperatures, less so near condensation or at high pressure.
- Pressure is absolute pressure; temperature is absolute (K = °C + 273.15).

## Worked examples

1. find = V, P = 99,325.164474, as = mass, m = 0.655, M = 16.04, T = 298.15 gives liters = 1,019.170025, result = V = 1019.17 L. Source: OpenStax, Chemistry 2e, §9.2 Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law (PV = nRT), https://openstax.org/books/chemistry-2e/pages/9-2-relating-pressure-volume-amount-and-temperature-the-ideal-gas-law, Example 9.9 Using the Ideal Gas Law: 1.02 × 10³ L.
2. find = P, V = 0.01, as = mol, n = 0.0025, T = 308.15 gives atm = 0.006321. Source: OpenStax, Chemistry 2e, §9.3 Stoichiometry of Gaseous Substances, Mixtures, and Reactions, https://openstax.org/books/chemistry-2e/pages/9-3-stoichiometry-of-gaseous-substances-mixtures-and-reactions, Example 9.14 The Pressure of a Mixture of Gases: P(H₂) = 6.32 × 10⁻³ atm.
3. find = n, P = 101,325, V = 0.0224, M = 28.01, T = 273.15 gives n = 0.999377. Source: OpenStax, Chemistry 2e, §9.2 Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law (PV = nRT), https://openstax.org/books/chemistry-2e/pages/9-2-relating-pressure-volume-amount-and-temperature-the-ideal-gas-law (standard molar volume about 22.4 L at STP).
4. find = T, P = 101,325, V = 0.0224, as = mol, n = 1 gives kelvin = 272.979759. Source: OpenStax, Chemistry 2e, §9.2 Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law (PV = nRT), https://openstax.org/books/chemistry-2e/pages/9-2-relating-pressure-volume-amount-and-temperature-the-ideal-gas-law.

## FAQ

### What is the ideal gas law?

PV = nRT links the pressure P, volume V, amount n (in moles) and absolute temperature T of a gas. R is the gas constant, 8.314 J/(mol·K) or 0.08206 L·atm/(mol·K).

### Which value of R should I use?

Any value works if its units match the others. This page works in SI units with R = 8.31446261815324 J/(mol·K), the exact product of the Avogadro and Boltzmann constants, and converts every unit you type.

### How do I find the volume of a gas from its mass?

Divide the mass by the molar mass to get moles, then V = nRT ÷ P. 655 g of methane (16.04 g/mol) at 25 °C and 745 torr fills about 1,019 L.

### Why must the temperature be in kelvins?

The law uses absolute temperature, which starts at absolute zero. 25 °C is 298.15 K. You can type °C or °F; the page converts to kelvins first.

### What is the molar volume at STP?

One mole of an ideal gas at 0 °C and 1 atm fills about 22.4 L. Type 22.4 L, 0 °C and 1 atm and solve for moles to see it.

### When does the ideal gas law not work well?

At high pressure or low temperature, near the point where a gas turns to liquid. There the molecules’ own size and their pull on each other matter, and real gases differ from the ideal model.

## Sources

- OpenStax, Chemistry 2e, section 9.2 Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law: PV = nRT; R = 0.08206 L·atm/(mol·K) = 8.314 kPa·L/(mol·K); Example 9.9. CC BY 4.0, retrieved 2026-10-03. https://openstax.org/books/chemistry-2e/pages/9-2-relating-pressure-volume-amount-and-temperature-the-ideal-gas-law
- OpenStax, Chemistry 2e, section 9.3 Stoichiometry of Gaseous Substances, Mixtures, and Reactions: Example 9.14. CC BY 4.0, retrieved 2026-10-03. https://openstax.org/books/chemistry-2e/pages/9-3-stoichiometry-of-gaseous-substances-mixtures-and-reactions
- NIST, CODATA value of the molar gas constant R = 8.314462618... J/(mol·K), exact. Retrieved 2026-10-03. https://physics.nist.gov/cgi-bin/cuu/Value?r
