InputTestHub

Ideal Gas Law Calculator

Solves PV = nRT for pressure, volume, moles or temperature in the units you actually use, with the molar volume at both definitions of STP.

Calculators Nothing uploaded No sign-up Free, unlimited
Calculators tool
Optional — adds the mass and density of the gas.
Enter your figures and press Calculate.
In short PV = nRT relates the four things you can measure about a gas, and R is 8.314462618 joules per mole per kelvin — exact since 2019, when the kelvin was redefined from the Boltzmann constant. Give any three and the fourth follows. Temperature must be in kelvin, because the law needs a scale where zero means zero: at −273.15 °C an ideal gas would have no volume at all, and below it the arithmetic returns a negative one. The most quoted consequence is the molar volume, and this is where two right answers exist. One mole of an ideal gas at 0 °C and 100 kPa occupies 22.711 litres, which has been the IUPAC standard since 1982. At 0 °C and 1 atmosphere — the older definition — it occupies 22.414 litres, and that 22.4 is what most people were taught. The two differ by 1.32%, so a question about molar volume at STP has two defensible answers depending on which textbook you learned from, and it is worth saying which you mean. At 25 °C and 1 atm, closer to an actual bench, a mole fills 24.465 litres. The law is called ideal because it assumes molecules take up no space and do not attract one another. Real gases do both, so near room conditions the law is typically good to about 1%, and near condensation or at high pressure it drifts by tens of per cent. That is the point at which the van der Waals equation or a compressibility factor is worth reaching for.

How to use the Ideal Gas Law Calculator

  1. Choose the variable you want.
  2. Enter the other three in whatever units suit you.
  3. Read the answer, plus the molar volume at both definitions of STP.

About the Ideal Gas Law Calculator

PV = nRT solved for any variable, with molar volume at both STP definitions.

What people use it for

  • Finding the volume a known amount of gas will occupy.
  • Working out how many moles are in a cylinder at a measured pressure.
  • Converting between the two molar volumes at STP.

Details

R8.314462618 J/(mol·K), exact since 2019
Molar volume at IUPAC STP22.711 L/mol at 0 °C and 100 kPa
Molar volume at 1 atm22.414 L/mol at 0 °C — the older standard
The gap between them1.32%
At 25 °C and 1 atm24.465 L/mol
Temperaturemust be in kelvin — zero has to mean zero
PrivacyEverything runs in your browser. Nothing you enter is sent anywhere
Both STP molar volumes are shown on every result, because which one is "correct" depends entirely on which definition your course or standard uses.

Where this tool stops

These are the ideal, dilute-solution equations taught everywhere and used on every bench, and each of them has a range. Molarity and pH assume concentration behaves like activity, which stops being true above roughly 0.1 M. The ideal gas law ignores molecular volume and attraction, so it drifts near condensation. None of this replaces a safety data sheet: check compatibility, protective equipment and disposal before you mix anything.

Frequently asked questions

What is the molar volume of a gas at STP?
It depends which STP. At the IUPAC standard of 0 °C and 100 kPa it is 22.711 L/mol. At the older 0 °C and 1 atm it is 22.414 L/mol — the familiar 22.4. The two differ by 1.32%, so say which you mean.
Why must temperature be in kelvin?
Because the law is proportional to temperature, and a proportionality needs a scale whose zero means zero. On the Celsius scale, doubling from 10 °C to 20 °C does not double anything physical.
What is the value of R?
8.314462618 J/(mol·K), or 0.08205737 L·atm/(mol·K). It has been exact since 2019, when the kelvin was defined from the Boltzmann constant rather than from the triple point of water.
How accurate is the ideal gas law?
Usually within about 1% for ordinary gases near room temperature and pressure. It gets worse as the gas approaches condensation or as pressure rises, because it ignores the volume the molecules occupy and the attraction between them.
How do I find the density of a gas?
Enter the molar mass and it is calculated for you. Density is molar mass divided by molar volume, so it depends only on what the gas is and the conditions it is in — an ideal gas has no size of its own.
Can I use it below absolute zero?
No, and the tool refuses rather than returning a number. A temperature below −273.15 °C has no physical meaning in this equation.
Is there a limit on how often I can use the Ideal Gas Law Calculator?
It is free, with no account, no trial and no daily cap. Every calculators tool on inputtesthub.com works the same way: open the page and use it.
Is my data uploaded anywhere?
No. The Ideal Gas Law Calculator runs entirely in your browser using JavaScript. Your input never reaches inputtesthub.com or any third party — open your browser's Network tab while you use it and you will see no request go out.
What is the Ideal Gas Law Calculator used for?
The most common reasons people reach for it: finding the volume a known amount of gas will occupy. Working out how many moles are in a cylinder at a measured pressure. Converting between the two molar volumes at STP. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
What are the limits of the Ideal Gas Law Calculator?
These are the ideal, dilute-solution equations taught everywhere and used on every bench, and each of them has a range. Molarity and pH assume concentration behaves like activity, which stops being true above roughly 0.1 M. The ideal gas law ignores molecular volume and attraction, so it drifts near condensation. None of this replaces a safety data sheet: check compatibility, protective equipment and disposal before you mix anything. Knowing where a tool stops being trustworthy matters more than the cases where it works.
What are the reference figures here?
R is 8.314462618 J/(mol·K), exact since 2019. Molar volume at IUPAC STP is 22.711 L/mol at 0 °C and 100 kPa. Molar volume at 1 atm is 22.414 L/mol at 0 °C — the older standard. These are printed on the page itself, so you do not have to take them on trust.
Can I rely on this for exact work?
The calculation runs in double precision and the result is shown to ten significant figures, so converting a value and converting it back returns the original. What is displayed is rounded for readability; what is copied is not.

Related calculators tools

All 382
01

Loan Calculator

Works out the monthly payment, total interest and full repayment schedule for any loan from…

02

EMI Calculator

Calculates your Equated Monthly Instalment with a full principal-versus-interest breakdown and…

03

Mortgage Calculator

Estimates a full monthly housing payment including principal, interest, property tax…

04

Car Loan Calculator

Calculates a car finance payment from the price, deposit, trade-in, interest rate and term…

05

Personal Loan Calculator

Works out instalments and total cost for an unsecured personal loan, including any processing…

09

SIP Calculator

Projects the maturity value of a monthly Systematic Investment Plan, showing invested amount…