Ideal Gas Law Calculator
Solve PV = nRT for pressure, volume, moles or temperature
Enter Gas Details
Your Results
Fill in three known values and press Calculate to see the pressure zone for this gas.
Pressure vs Volume (Boyle's Law view)
At constant temperature and moles, pressure and volume trace this curve (P = nRT / V). Your calculated point is marked in red.
Quick Navigation
How ideal gas law calculator works

An ideal gas law calculator uses the equation PV = nRT, linking pressure (P), volume (V), moles (n) and temperature (T). Enter any three known values and it solves for the missing fourth one, using R as the universal gas constant.
Limitations of the ideal gas law
- Assumes gas molecules have no volume or attraction
- Less accurate at very high pressure
- Less accurate at very low temperature
- Real gases deviate near condensation points
Online calculators
Ideal Gas Law Calculator: Solve PV = nRT Instantly
Whether you’re a chemistry student working through a gas problem, an engineer checking thermodynamic conditions, or simply curious about how gases behave under different pressures and temperatures, the ideal gas law calculator gives you an instant, accurate answer for any of the four variables in the equation PV = nRT.
The ideal gas law is one of the most fundamental equations in physical chemistry and thermodynamics. It connects four measurable properties of a gas — pressure, volume, temperature, and the number of moles — into a single, elegant equation. Instead of manually rearranging and solving, Webequa’s calculator does the algebra for you in seconds, in any unit system you choose.
In this guide, we’ll explain exactly what the ideal gas law is, walk through every variable and unit clearly, show step-by-step worked examples across real-world scenarios, and help you understand when the ideal gas law applies and when it doesn’t.
What is an Ideal Gas Law Calculator?
An ideal gas law calculator is a tool that solves the equation PV = nRT for any one of its four variables — pressure (P), volume (V), number of moles (n), or temperature (T) — when the other three are known. It also handles unit conversions automatically, so you can work in atmospheres or pascals, liters or cubic meters, Kelvin or Celsius, without manual conversion.
What is an ideal gas?
An ideal gas is a theoretical model of a gas in which molecules have no intermolecular forces and occupy no volume themselves. Real gases behave approximately like ideal gases at low pressures and high temperatures. At extreme pressures or very low temperatures, real gas behavior deviates from the ideal model, and more advanced equations (like the Van der Waals equation) are needed.
For most everyday chemistry and engineering problems, the ideal gas law gives accurate and reliable results.
Why Use an Ideal Gas Law Calculator?
The ideal gas law appears in a wide range of scientific, educational, and practical contexts:
- Chemistry coursework and exams — solve gas law problems quickly and verify manual calculations
- Laboratory work — calculate expected gas volumes or pressures under experimental conditions
- Engineering and thermodynamics — model gas behavior in systems like engines, compressors, and HVAC
- Meteorology — understand atmospheric pressure and temperature relationships
- Scuba diving physics — calculate how gas volumes change with depth and pressure
- Pharmaceutical manufacturing — control gas conditions in sterile processing environments
- Food science — understand gas behavior in carbonated beverages and modified atmosphere packaging
Understanding the Four Variables
Before solving, it’s important to understand what each variable in PV = nRT represents.
Pressure (P)
Pressure is the force a gas exerts per unit area on its container walls. It can be expressed in several units:
| Unit | Symbol | Equivalent |
|---|---|---|
| Atmosphere | atm | 1 atm = 101,325 Pa |
| Pascal | Pa | SI base unit |
| Kilopascal | kPa | 1 kPa = 1,000 Pa |
| Bar | bar | 1 bar = 100,000 Pa |
| Millimeters of mercury | mmHg (torr) | 1 atm = 760 mmHg |
| Pounds per square inch | psi | 1 atm ≈ 14.696 psi |
Volume (V)
Volume is the space occupied by the gas. Common units:
| Unit | Symbol | Equivalent |
|---|---|---|
| Liter | L | 1 L = 0.001 m³ |
| Cubic meter | m³ | SI base unit |
| Milliliter | mL | 1 mL = 0.001 L |
| Cubic centimeter | cm³ | 1 cm³ = 1 mL |
Temperature (T)
Temperature must always be expressed in Kelvin when using the ideal gas law. Converting from Celsius:
T (Kelvin) = T (Celsius) + 273.15⚠️ Critical Warning: Using Celsius directly in PV = nRT gives completely wrong results. Always convert to Kelvin first. This is one of the most common errors in gas law calculations.
Number of Moles (n)
Moles measure the quantity of gas molecules. One mole contains approximately 6.022 × 10²³ molecules (Avogadro’s number). Moles are related to mass by:
n = Mass (g) ÷ Molar Mass (g/mol)The Ideal Gas Constant (R)
R is a fixed constant whose value depends on the units used for pressure and volume:
| Units | Value of R |
|---|---|
| L·atm / (mol·K) | 0.08206 |
| J / (mol·K) | 8.314 |
| Pa·m³ / (mol·K) | 8.314 |
| cal / (mol·K) | 1.987 |
| L·kPa / (mol·K) | 8.314 |
Tip: Always match the value of R to the units used for P and V. Using mismatched units with R is the second most common error in ideal gas calculations.
Formula
Webequa’s calculator uses the standard Ideal Gas Law Equation, one of the most important equations in physical chemistry.
The Core Equation
PV = nRTSolved for Each Variable
Pressure: P = nRT ÷ V
Volume: V = nRT ÷ P
Moles: n = PV ÷ (RT)
Temperature: T = PV ÷ (nR)Related Gas Laws (Special Cases of PV = nRT)
| Law | Formula | What’s Constant |
|---|---|---|
| Boyle’s Law | P₁V₁ = P₂V₂ | n and T |
| Charles’s Law | V₁/T₁ = V₂/T₂ | n and P |
| Gay-Lussac’s Law | P₁/T₁ = P₂/T₂ | n and V |
| Avogadro’s Law | V₁/n₁ = V₂/n₂ | P and T |
| Combined Gas Law | P₁V₁/T₁ = P₂V₂/T₂ | n only |
Each of these is a simplified version of PV = nRT with two variables held constant. Webequa’s calculator applies the full ideal gas law, which covers all of these cases and more.
How to Use This Calculator
- Select the variable you want to solve for — P, V, n, or T.
- Enter the known values for the other three variables.
- Select the unit for each input (atm, Pa, kPa, L, m³, K, °C, mol).
- Click Calculate.
- Review the result in the unit of your choice.
Tip: If your temperature is in Celsius, select °C in the unit dropdown and the calculator will convert to Kelvin automatically before solving.
Step-by-Step Worked Examples
Example 1: Find the Pressure of a Gas
Problem: A container holds 2.5 moles of gas in a 10-liter volume at 300 K. What is the pressure?
| Known Variable | Value |
|---|---|
| n (moles) | 2.5 mol |
| V (volume) | 10 L |
| T (temperature) | 300 K |
| R | 0.08206 L·atm/(mol·K) |
Formula:
P = nRT ÷ V
P = (2.5 × 0.08206 × 300) ÷ 10
P = 61.545 ÷ 10
P = 6.15 atmInterpretation: The gas exerts a pressure of approximately 6.15 atmospheres — about 6 times standard atmospheric pressure.
Example 2: Find the Volume of a Gas
Problem: How many liters does 1 mole of an ideal gas occupy at standard temperature and pressure (STP: 273.15 K, 1 atm)?
| Known Variable | Value |
|---|---|
| n (moles) | 1 mol |
| P (pressure) | 1 atm |
| T (temperature) | 273.15 K |
| R | 0.08206 L·atm/(mol·K) |
Formula:
V = nRT ÷ P
V = (1 × 0.08206 × 273.15) ÷ 1
V = 22.41 litersInterpretation: This is the famous molar volume of an ideal gas at STP — 22.4 liters per mole. This result is a widely used reference value in chemistry.
Example 3: Find the Number of Moles
Problem: A gas occupies 5 liters at 2 atm and 350 K. How many moles are present?
| Known Variable | Value |
|---|---|
| P (pressure) | 2 atm |
| V (volume) | 5 L |
| T (temperature) | 350 K |
| R | 0.08206 L·atm/(mol·K) |
Formula:
n = PV ÷ (RT)
n = (2 × 5) ÷ (0.08206 × 350)
n = 10 ÷ 28.721
n ≈ 0.348 molInterpretation: There are approximately 0.348 moles of gas present in the container under these conditions.
Example 4: Find the Temperature (Real-World Scenario)
Problem: A scuba tank holds 0.012 m³ of air at 200 bar pressure and contains 98 moles of gas. What is the temperature of the gas inside the tank?
| Known Variable | Value |
|---|---|
| P (pressure) | 200 bar = 20,000,000 Pa |
| V (volume) | 0.012 m³ |
| n (moles) | 98 mol |
| R | 8.314 J/(mol·K) |
Formula:
T = PV ÷ (nR)
T = (20,000,000 × 0.012) ÷ (98 × 8.314)
T = 240,000 ÷ 814.772
T ≈ 294.6 K (approximately 21.5°C)Interpretation: The gas inside the tank is at approximately room temperature — consistent with a freshly filled tank stored in a normal environment.
Standard Conditions Reference
| Condition | Temperature | Pressure |
|---|---|---|
| STP (IUPAC, 1982 onward) | 273.15 K (0°C) | 100 kPa (1 bar) |
| STP (older IUPAC definition) | 273.15 K (0°C) | 101.325 kPa (1 atm) |
| NTP (Normal Temperature and Pressure) | 293.15 K (20°C) | 101.325 kPa (1 atm) |
| SATP (Standard Ambient) | 298.15 K (25°C) | 100 kPa (1 bar) |
Note: Different textbooks and institutions use different definitions of “standard conditions.” Always check which definition applies to your problem or data source.
When Does the Ideal Gas Law Apply?
The ideal gas law gives reliable results under these conditions:
✔ Low to moderate pressure (below ~10 atm for most gases) ✔ High temperature (well above the gas’s boiling point) ✔ Low gas density (molecules are far apart) ✔ Non-polar gases (H₂, O₂, N₂, He, Ne, Ar) follow ideal behavior most closely
The ideal gas law becomes less accurate under these conditions:
✘ Very high pressure — molecules are forced close together and intermolecular forces matter ✘ Very low temperature — approaching the condensation point of the gas ✘ Polar gases (NH₃, H₂O vapor) — stronger intermolecular forces cause deviation ✘ Heavy gases — larger molecules deviate more than smaller ones
Benefits of Using an Ideal Gas Law Calculator
- Free and instant results
- Solves for any of the four variables — P, V, n, or T
- Handles all common unit systems automatically
- Converts Celsius to Kelvin automatically
- Eliminates algebraic rearrangement errors
- Supports all six related gas laws as special cases
- Useful for chemistry students, engineers, and researchers
- Displays the ideal gas constant R in the correct unit for your inputs
- Works for any ideal gas scenario — laboratory, industrial, or academic
- No signup or registration required
- Available on any device, anywhere
- Results are immediately usable for coursework, lab reports, and engineering calculations
Limitations
- Ideal gas assumption — real gases deviate from ideal behavior at high pressures and low temperatures
- No Van der Waals correction — for real gas calculations, additional parameters are required
- Assumes pure gas — mixtures are handled by Dalton’s Law of Partial Pressures separately
- Kelvin requirement — temperatures must be in Kelvin; entering Celsius without converting gives wrong results (the calculator converts automatically, but manual calculations often miss this)
- Unit consistency — R must match the units used for P and V
- Does not model phase changes — the equation is for gases only, not liquids or solids
Disclaimer: This calculator provides mathematical results based on the ideal gas model. For precision engineering applications involving real gases at extreme conditions, consult a qualified engineer or use equations of state appropriate for those conditions.
Common Mistakes
- Using Celsius instead of Kelvin for temperature
- Using the wrong value of R for the chosen pressure and volume units
- Mixing unit systems (e.g., pressure in atm and volume in m³ with R = 0.08206)
- Forgetting that n must be in moles, not grams
- Rounding intermediate values too early in multi-step calculations
- Confusing molar mass with number of moles
- Applying the ideal gas law to gases near their condensation point
- Forgetting to convert bar to atm or Pa when needed
- Using gauge pressure instead of absolute pressure
- Assuming the ideal gas law applies equally to all gases at all conditions
- Misidentifying which variable to solve for in a word problem
- Forgetting that absolute zero (0 K) means volume and pressure become zero — a physical impossibility in practice
Tips for Accurate Results
- Always convert temperature to Kelvin before solving manually
- Match your value of R to the units used for pressure and volume
- Use absolute pressure (not gauge pressure) in all calculations
- For mass-to-moles conversion, divide mass by the molar mass of the gas
- Keep all intermediate values at full precision and round only the final answer
- Cross-check your answer with a known reference value (e.g., 1 mol at STP ≈ 22.4 L)
- For real gases at high pressure, note that your result is an approximation
- Label every value with its unit throughout your calculation to catch unit mismatches
- Double-check the unit of R used — this single choice affects the entire calculation
- For gas mixtures, use Dalton’s Law and apply the ideal gas law to each component separately
- Use the calculator’s unit dropdown to let the tool handle conversions automatically
- For exam problems, write out PV = nRT in full before substituting values
- Check whether the problem specifies STP, NTP, or SATP — the molar volume differs slightly between them
- Verify that all values are physically reasonable before accepting the result
- For engineering applications, note whether the problem involves gauge or absolute pressure
Why Trust Webequa?
- ✔ Accurate, science-based formula (PV = nRT)
- ✔ Verified calculations
- ✔ Expert-reviewed information
- ✔ All common unit systems supported
- ✔ Automatic Celsius to Kelvin conversion
- ✔ Privacy-first — no data stored
- ✔ No registration required
- ✔ Mobile-friendly design
- ✔ Fast loading, no clutter
- ✔ Free forever
- ✔ Regularly updated content
- ✔ Accessible worldwide
Related Calculators
- Boyle’s Law Calculator
- Charles’s Law Calculator
- Combined Gas Law Calculator
- Molar Mass Calculator
- Stoichiometry Calculator
- Molarity Calculator
- Density Calculator
- Unit Converter
- Temperature Converter
- Pressure Converter
- Avogadro’s Number Calculator
- Chemistry Calculator
Scientific References
- National Institute of Standards and Technology (NIST) — Ideal Gas Properties
- Khan Academy — Ideal Gas Law
- Purdue University — The Ideal Gas Law
- LibreTexts Chemistry — 14.4 Ideal Gas Law
- IUPAC — Standard Conditions and Gas Law Definitions
- NASA — Thermodynamics and Gas Laws in Aerospace Engineering
- Royal Society of Chemistry — Gas Laws and Thermodynamics
Conclusion
The ideal gas law is one of the most powerful and widely used equations in science and engineering. An ideal gas law calculator removes the friction of manual algebra and unit conversion, giving you fast, reliable solutions for any of the four gas variables — pressure, volume, moles, or temperature. Whether you’re tackling a chemistry exam, running a lab experiment, or modeling a real-world engineering system, Webequa’s calculator handles the math so you can focus on understanding the results.
Try Webequa’s free ideal gas law calculator today and solve any PV = nRT problem in seconds.