Solve the Ideal Gas Law Without Mixing Units
Use PV = nRT to find pressure, volume, amount of gas or absolute temperature. Two derived modes also calculate ideal-gas density and molar mass. Every input is converted to an SI basis before the equation is evaluated.
Last updated: August 2, 2026- Six solve modes
- Exact decimal arithmetic
- Absolute-temperature checks
- Metric and imperial units
Ideal Gas Equation Calculator
Choose the unknown, enter the required quantities and select each unit. Pressure inputs must be absolute, and temperature inputs are converted to kelvins before calculation.
Enter the required values and select Calculate.
Equivalent units
All rows use the same unrounded result. Rounding affects display only.
| Unit | Equivalent result |
|---|---|
| — | Calculate to view conversions |
Calculation steps
- Choose a solve mode and enter the required values.
- The calculator will normalize the inputs before applying the equation.
The ideal gas law uses absolute pressure and absolute temperature. Check whether ideal behavior is suitable for your conditions.
How to Use This Ideal Gas Law Calculator
Estimated time: About 2 minutes for a complete entry and result review.
- Choose the unknown. Select pressure, volume, amount, temperature, density or molar mass.
- Use absolute pressure when required. If pressure is an input, convert gauge readings to absolute pressure; Pressure mode returns absolute pressure.
- Use an absolute temperature when required. If temperature is an input, choose K, °C, °F or °R; Temperature mode returns an absolute thermodynamic temperature.
- Select every input unit. Mixed units are converted to Pa, m³, mol, K, kg and kg/mol as required.
- Choose the result unit and precision. Display choices never feed rounded values into another result.
- Calculate and review the steps. Check the normalized inputs, rearranged formula and equivalent-unit table.
- Confirm the model. Use a real-gas equation or measured data when nonideal behavior matters.
Ideal Gas Law Formula
The ideal gas law relates four measurable state variables and the amount of gas:
- P is absolute pressure.
- V is the volume occupied by the gas.
- n is the amount of gas in moles.
- R is the molar gas constant.
- T is absolute thermodynamic temperature in kelvins.
This calculator uses R = 8.31446261815324 J·mol⁻¹·K⁻¹. Because one joule equals one pascal cubic metre, the same constant works directly when pressure is in Pa, volume is in m³, amount is in mol and temperature is in K.
Six Supported Calculation Modes
| Target | Rearranged equation | Required inputs |
|---|---|---|
| Pressure | P = nRT/V | n, T and V |
| Volume | V = nRT/P | n, T and P |
| Amount | n = PV/(RT) | P, V and T |
| Temperature | T = PV/(nR) | P, V and n |
| Density | ρ = PM/(RT) | P, M and T |
| Molar mass | M = mRT/(PV) | m, P, V and T |
The density relation follows from n = m/M and ρ = m/V. The molar-mass mode rearranges the same relationships for a measured gas mass. Both remain ideal-gas estimates and use the mass and volume of the same gas sample.
Worked Example: Volume of One Mole at 25°C
Find the ideal volume of 1.000 mol of gas at 25.00°C and 1.000 atm.
- Convert pressure: 1.000 atm = 101,325 Pa.
- Convert temperature: 25.00°C = 298.15 K.
- Rearrange the equation: V = nRT/P.
- Substitute: V = (1.000 mol × 8.31446261815324 Pa·m³·mol⁻¹·K⁻¹ × 298.15 K) / 101,325 Pa.
- The result is approximately 0.02446540370 m³, or 24.46540370 L, at the displayed precision.
The number is condition-specific. Changing pressure, temperature or both changes the volume. It should not be presented as one universal “molar volume” for every standard condition.
Choosing the Right Solve Mode
Select the variable you do not know. The calculator then shows only the fields required for that equation, so a hidden value never enters the calculation.
- Pressure mode fits a known amount of gas in a known volume at a known temperature. It returns absolute pressure.
- Volume mode estimates how much space the specified amount occupies at one pressure and temperature.
- Amount mode converts a measured P-V-T state into moles. Use molar mass separately if you need mass.
- Temperature mode finds the ideal thermodynamic temperature for a known P-V-n state.
- Density mode estimates mass per volume from pressure, temperature and molar mass. For a mixture, enter a defensible mixture-average molar mass.
- Molar-mass mode works with the measured mass and P-V-T state of one sample. It does not identify the gas automatically.
The four core modes describe one equilibrium state. They do not track a changing process, heat transfer or work. If you compare two states, solve each state separately only when the gas amount is known and unchanged, or use a suitable process relation with its own assumptions.
Pressure, Temperature and Unit Rules
Use absolute pressure
The equation uses pressure measured from a perfect vacuum. If a gauge shows 200 kPa above local atmospheric pressure, the ideal-gas input is the gauge value plus the measured ambient pressure. Do not assume ambient pressure is exactly one standard atmosphere when the distinction matters.
Use an absolute temperature
Kelvin and Rankine start at absolute zero. Celsius and Fahrenheit do not. The calculator converts them before applying the equation and rejects any entry at or below 0 K. A temperature difference is not the same as an absolute temperature reading.
Do not swap Torr and conventional mmHg blindly
One Torr is exactly 1/760 of 101,325 Pa. Conventional millimetres of mercury use a separate conversion. The numerical difference is small, but this page keeps the units separate so the basis remains explicit.
State standard conditions explicitly
IUPAC defines standard temperature and pressure for gases as 273.15 K and 100 kPa and recommends discontinuing the former 1 atm standard-pressure convention. One ideal mole occupies about 22.71095464 L at 273.15 K and 100 kPa, but about 22.41396955 L at 273.15 K and 1 atm. Write both pressure and temperature instead of relying on the label “STP.” A thermodynamic standard state is a separate convention.
When the Ideal Gas Model Is Appropriate
The equation treats gas particles as having negligible volume and no intermolecular forces. Many gases approach this behavior at modest pressure and temperatures well away from condensation. Departures often grow at high pressure, low temperature, near a phase boundary or for strongly interacting gases.
A common real-gas correction introduces the compressibility factor Z:
This calculator fixes Z at 1. If a validated Z value differs materially from 1, use a suitable real-gas equation of state or trusted property data. The page does not estimate Z, condensation, chemical reaction, dissociation, humidity, gas leakage or vessel deformation.
For gas mixtures, the ideal gas law can describe the total state. A component’s share requires mixture information such as amount fraction or partial pressure. Do not infer composition from total P, V, n and T alone.
Accuracy, Significant Figures and Measurement Limits
The calculator keeps entered decimals and defined conversion factors as exact rational values during the calculation. It rounds only the displayed answer. That prevents a rounded litre, atmosphere or Celsius conversion from feeding the next step.
Display precision is not measurement accuracy. Your final reported precision should reflect the least certain input, instrument calibration, temperature uniformity, pressure basis, sample purity and whether the gas follows the model. For example, a pressure known to three significant figures does not support a twelve-digit experimental result.
Density and molar-mass estimates are especially sensitive to mass, volume and temperature measurements. Correct for buoyancy, trapped liquid, water vapor, dead volume and leaks when those effects are relevant to your method.
Common Ideal Gas Calculation Mistakes
- Using gauge pressure directly. The equation requires pressure from vacuum. Add local ambient pressure to a gauge reading.
- Entering Celsius as kelvins. An entry of 25 K is −248.15°C, not room temperature. Select °C when you mean 25°C.
- Mixing sample conditions. Mass, volume, pressure and temperature must describe the same sample and state in molar-mass mode.
- Using solution volume for a gas. The V in PV = nRT is the gas-phase volume under the entered conditions.
- Assuming every “standard” is identical. State the pressure and temperature because 100 kPa and 1 atm produce different ideal molar volumes.
- Reporting excessive precision. Extra digits from a calculator do not remove uncertainty in instruments, conversions or the ideal-gas approximation.
Also check whether the sample is dry. A gas collected over water can include water vapor, so the measured total pressure is not automatically the dry-gas pressure. Mixture corrections belong in a partial-pressure analysis, not in an unqualified single-gas input.
Related Chemistry Calculators
Use these published tools for connected quantities and checks.
Ideal Gas Law Calculator FAQs
What is the ideal gas law formula?
The ideal gas law is PV = nRT. It relates absolute pressure P, volume V, amount n, the molar gas constant R and absolute temperature T for an idealized gas state.
Which value of R does this calculator use?
It uses R = 8.31446261815324 J mol⁻¹ K⁻¹. In the SI calculation basis, one joule equals one pascal cubic metre.
Must pressure be absolute?
Yes. PV = nRT uses absolute pressure measured from a vacuum. Add the measured ambient pressure to a gauge reading before entering it.
Can I enter Celsius or Fahrenheit?
Yes. The calculator converts Celsius and Fahrenheit to kelvins before calculation. The converted temperature must be greater than 0 K.
How do I calculate moles with PV = nRT?
Rearrange the equation to n = PV/(RT). Convert pressure, volume and temperature to a compatible basis before dividing.
How does the calculator find gas density?
It combines PV = nRT with n = m/M and density ρ = m/V, giving ρ = PM/(RT). The result assumes the entered molar mass and ideal behavior.
How does it estimate molar mass from a gas sample?
It uses M = mRT/(PV), where m, P, V and T describe the same sample. Experimental corrections and nonideal behavior can affect the estimate.
Are Torr and mmHg identical?
No. One Torr is exactly 1/760 of a standard atmosphere. Conventional mmHg has a slightly different defined conversion, although the values are close.
When does the ideal gas law become inaccurate?
Departures often matter at high pressure, low temperature, near condensation or for strongly interacting gases. Use validated real-gas data when the difference affects your decision.
Does this calculator predict gas safety or vessel limits?
No. It does not assess reaction, toxicity, flammability, pressure-vessel strength, relief sizing, leakage, phase change or laboratory procedure. Use qualified engineering and safety guidance.
Method and Review Basis
- OpenStax: The Ideal Gas Law, formula, rearrangements and model context.
- NIST CODATA: molar gas constant, value of R.
- NIST SP 811 conversion factors, pressure, volume, mass and temperature units.
- IUPAC Gold Book: ideal gas, terminology and idealized behavior.
- IUPAC Gold Book: standard conditions for gases, 273.15 K and 100 kPa convention.
- BIPM SI Brochure, SI unit definitions and exact constants.
Educational and engineering disclaimer: This calculator applies an ideal-gas equation to the values you enter. It does not validate a gas identity, property model, measurement, vessel, process or safe operating condition. Confirm units, pressure basis, phase, composition, uncertainty, applicable standards and safety requirements independently.