
Rex says
The fast lane for the math you almost remember from school. Type the numbers, get the answer, move on with your day.
Try a scenario
Click to load — tweak from there.Inputs
Result
Moles (n)
0.9993
Mass (g)
28.941
Density (g/L)
1.2920
Temperature (°C)
0.00

Psst — share this and help Rex grow
One click, a permanent link with your numbers baked in.
How to use this
- 1Enter pressure (atm).
- 2Enter volume (L).
- 3Enter temperature (K).
- 4Enter molar mass (optional) (g/mol).
- 5Read your moles (n) on the right — it updates as you type.
- 6Hit Share to keep the scenario or send it to someone.
About this calculator
PV = nRT with R = 0.08206 L·atm/(mol·K). Enter three variables and get the fourth, plus density if you supply a molar mass.
Worked example
Using the values the calculator loads with:
Inputs
- Pressure: 1 atm
- Volume: 22.4 L
- Temperature: 273.15 K
- Molar mass (optional): 28.96 g/mol
Results
- Moles (n): 0.9993
- Mass (g): 28.941
- Density (g/L): 1.292
- Temperature (°C): 0
What each field means
Inputs
- Pressure (atm)
- The pressure used in the calculation, measured in atm. Starts at 1 atm so you have a working example on load.
- Volume (L)
- The volume used in the calculation, measured in L. Starts at 22.4 L so you have a working example on load.
- Temperature (K)
- The temperature used in the calculation, measured in K. Starts at 273.15 K so you have a working example on load.
- Molar mass (optional) (g/mol)
- The molar mass (optional) used in the calculation, measured in g/mol. Starts at 28.96 g/mol so you have a working example on load.
Results
- Moles (n)
- Returned as a decimal number and shown as the headline result. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
- Mass (g)
- Returned as a decimal number. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
- Density (g/L)
- Returned as a decimal number. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
- Temperature (°C)
- Returned as a decimal number. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
FAQ
How does the ideal gas law (pv = nrt) calculator work?
PV = nRT with R = 0.08206 L·atm/(mol·K). Enter three variables and get the fourth, plus density if you supply a molar mass. The underlying maths is: PV = nRT
What do I need to enter?
4 values: pressure, volume, temperature, and molar mass (optional). Each field starts with a sensible default, so you can change one number at a time and watch the result move.
What does the moles (n) result mean?
It is returned as a decimal number and updates live as you edit the inputs, so you can compare two or three versions of a scenario in a few seconds.
Is this calculator free, and do I need an account?
Yes, it's free, and no account is required. Nothing you type is stored on our servers — the maths runs entirely in your browser.
How accurate is the result?
It applies the standard formula exactly, so the arithmetic is precise. Results are rounded for display; the underlying calculation keeps full precision.
Who is this tool for?
It's built for students, developers, and anyone who needs the answer right now without setting up a spreadsheet.
Accuracy and limitations
- Results are rounded for display; the underlying calculation keeps full precision.
- Very large or very small inputs may hit floating-point limits in the browser.
- Inputs outside the accepted range are clamped rather than rejected.
Cite this calculator
Writing about this topic? Grab a citation — every link helps keep these tools free.
RevenueLab. (2026). Ideal Gas Law Calculator. Retrieved from https://www.revenuelab.fyi/toolbox/ideal-gas-law
<p>Source: <a href="https://www.revenuelab.fyi/toolbox/ideal-gas-law" target="_blank" rel="noopener">Ideal Gas Law Calculator — RevenueLab</a> (2026).</p>
Source: [Ideal Gas Law Calculator — RevenueLab](https://www.revenuelab.fyi/toolbox/ideal-gas-law) (2026).
