Ideal Gas Law Calculator
Solve PV = nRT for pressure, volume, moles, or temperature. Enter any three quantities in any common units and get the fourth, plus molar volume, density, and a full unit-converted breakdown.
🧪Real Gas Law Presets
📝Gas Conditions
The chosen variable is computed from the other three.
Used when amount mode is moles.
Used when amount mode is mass.
O2 = 32.00, CO2 = 44.01, N2 = 28.02, He = 4.003.
🔢Formula Snapshot
⚖Gas Constant R by Unit System
| R Value | Units | When To Use | Notes |
|---|---|---|---|
| 0.082057 | L·atm / (mol·K) | P in atm, V in liters | Most common in chemistry class |
| 8.31446 | J / (mol·K) | SI units, P in Pa, V in m³ | Also used for energy terms |
| 62.3637 | L·mmHg / (mol·K) | P in mmHg (torr), V in liters | Handy for gas collected over water |
| 0.083145 | L·bar / (mol·K) | P in bar, V in liters | 1 bar is close to 1 atm |
| 10.7316 | ft³·psi / (lbmol·°R) | US engineering units | Rankine temperature scale |
This calculator converts every input to atm, liters, moles, and Kelvin, then uses R = 0.082057 L·atm/(mol·K) internally for consistency.
🌡STP and NTP Reference Conditions
| Standard | Temperature | Pressure | Molar Volume |
|---|---|---|---|
| STP (IUPAC 1982) | 273.15 K (0 °C) | 1 atm (101.325 kPa) | 22.414 L/mol |
| STP (IUPAC 1997+) | 273.15 K (0 °C) | 100 kPa (1 bar) | 22.711 L/mol |
| NTP | 293.15 K (20 °C) | 1 atm (101.325 kPa) | 24.055 L/mol |
| SATP | 298.15 K (25 °C) | 100 kPa (1 bar) | 24.790 L/mol |
| Room (this preset) | 298.15 K (25 °C) | 1 atm (101.325 kPa) | 24.465 L/mol |
🔄Pressure and Temperature Conversions
| Pressure | = atm | = kPa | = mmHg | = psi | = bar |
|---|---|---|---|---|---|
| 1 atm | 1.0000 | 101.325 | 760.00 | 14.696 | 1.01325 |
| 1 kPa | 0.009869 | 1.0000 | 7.5006 | 0.14504 | 0.01000 |
| 1 mmHg | 0.001316 | 0.13332 | 1.0000 | 0.019337 | 0.001333 |
| 1 psi | 0.068046 | 6.8948 | 51.715 | 1.0000 | 0.068948 |
| 1 bar | 0.98692 | 100.00 | 750.06 | 14.504 | 1.0000 |
| Description | Kelvin | Celsius | Fahrenheit | Rankine |
|---|---|---|---|---|
| Absolute zero | 0.00 K | -273.15 °C | -459.67 °F | 0.00 °R |
| Freezing / STP | 273.15 K | 0.00 °C | 32.00 °F | 491.67 °R |
| Room / NTP | 293.15 K | 20.00 °C | 68.00 °F | 527.67 °R |
| SATP / lab | 298.15 K | 25.00 °C | 77.00 °F | 536.67 °R |
| Body temp | 310.15 K | 37.00 °C | 98.60 °F | 558.27 °R |
| Water boiling | 373.15 K | 100.00 °C | 212.00 °F | 671.67 °R |
⚙Full Formula Breakdown
🧬Common Gas Reference Table
| Gas | Formula | Molar Mass | Density at STP | Typical Use |
|---|---|---|---|---|
| Hydrogen | H2 | 2.016 g/mol | 0.0899 g/L | Fuel cells, lifting gas |
| Helium | He | 4.003 g/mol | 0.1786 g/L | Balloons, cryogenics |
| Nitrogen | N2 | 28.02 g/mol | 1.2506 g/L | 78% of air, inert purge |
| Oxygen | O2 | 32.00 g/mol | 1.4290 g/L | Respiration, combustion |
| Carbon dioxide | CO2 | 44.01 g/mol | 1.9768 g/L | Dry ice, carbonation |
| Dry air (avg) | mix | 28.96 g/mol | 1.2929 g/L | Reference mixture |
💡Practical Gas Law Tips
When we put a balloon into a fridge, what happens? It gets smaller! Why? Because the molecules within are slowed down and no longer bang into the wall so hard.
That is described by the ideal gas law in a single equation: The equation is PV = nRT. This equation relates temperature, amount of substance, volume and pressure. No need to be a physicist here; all you have to do is work out which variable you’re looking for and then let your calculator do the rest.
How to Use the Ideal Gas Law Correctly
But first you need to know what it’s measuring. Weight is force divided by some surface area. That means Pressure is not Weight. Moles are the number of particles, scaled up to match humans. Volume is space. Temperature is average kinetic energy. When you change one, the others must adjust to keep the balance.
For example: when you heat air, its temperature increases while its pressure stays roughly constant, so its volume must expand and its density drops. This makes the density drop so it floats up. That is why hot air rise!
Most students mess up the units. They just plug in Fahrenheit or Celsius straight into equation without converting them first. Those are not compatible unit of measurement for an equation like that. Fahrenheit and Celsius can take on negative numbers (zero degrees Celsius is not zero energy; absolute zero is). Energy cannot be negative; absolute zero represents no energy.
Before plugging any kind of temperature into the equation, you need to convert it to Kelvins by adding 273.15 to Celsius. Doing so moves you from a scale where zero refers to an arbitrary point to one where zero means nothing is moving at all. Doing this helps prevent mental mistakes, but the calculator will also do this conversion for you.
So if you get an improbable number for pressure or even for volume, look at how you entered the temperature. Chances are that’s what went wrong. You can also choose your own units for volume and pressure. Depending on which ones you pick, the gas constant R will be different. For example, R = 0.08206 when you use atmospheres and liters, but R = 8.314 if you use cubic meters and Pascals. If you mix your units, it silently ruins the answer.
You don’t need to remember this because the reference table on the page spells it all out. Just decide what units you’re going to use and stick with them. It’s a lot more convenient than having to recalculate everything.
Take the scuba tank, for instance. There is a certain volume (V) of steel, into which we pump additional air (n). As we increase n, the pressure (P) must also rise because the steel volume is immovable. Plug in the variables, and the calculator solves for any one of them.
Need to know how much oxygen remains if the pressure decreases half-way? Enter the remaining pressure (P), along with the original volume (V). By solving for n, you’ll instantly know just how many moles are left. That’s valuable knowledge that can save a life, or at least a lab experiment. It translates abstract symbols into useful data.
Sometimes it’s all about mass and that’s where density comes into play. Helium is light, which is why a helium balloon flies. Hydrogen is even lighter, but it is also flammable. Because of this, they typicaly use helium for safety reasons. The tool shows density as well which is based off the ratio of molar mass to molar volume under the conditions you’ve entered.
Density is the key number for lifting systems and whether gas layers might settle to the floor of a mine, for example. Lighter gases ascend; heavier ones descend (e.g., carbon dioxide).
There’s also the standard temperature and pressure (STP), which gives us a common starting point to compare against. When scientists present their findings, they do so in an agreed-upon set of conditions that allow other people to repeat it. In STP, we consider a pressure of one atmosphere (roughly sea level) and a temperature of zero Celsius. In these conditions, one mole of all ideal gases occupies 22.414 liters of space. That makes STP a helpful anchor point.
Gases will be slightly expanded at room temperatures, typically somewhere above twenty-five degrees Celsius. The calculator has presets for these typical conditions so you don’t have to set it up from scratch each time.
At very low temperatures (near their liquefaction point) or extremely high pressure, real gases behave differently then the ideal. The simple PV equals nRT formula neglects the fact that molecules attract one another and have some volume. In reality, molecules take up space and attract each other. This works well enough for everyday engineering work, and for the majority of problems in the classroom. Complex corrections become necessary if you’re cooling down a gas or squeezing it into small volumes.
Ultimately, the ideal gas law is a story of balance: heat something up and it expands; squeeze a gas and it increases in pressure. Take away some molecules and things will relax. This understanding of the give-and-take can help you make predictions without having to guess. A sensor calibration? An inflated tire? An ever-shrinking balloon? Same deal. It’s straightforward, it makes sense, and if you have the right tool, it doesn’t require any effort at all.
You should of checked the units first.

