Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Ideal Gas Law Calculator

Ideal Gas Law Calculator

Solve PV = nRT instantly. Calculate pressure, volume, moles, or temperature with flexible unit conversions and standard condition presets.

What Is the Ideal Gas Law?

The Ideal Gas Law is one of the most fundamental equations in chemistry and physics. Expressed as PV = nRT, it describes the relationship between four key properties of an ideal gas:

P (Pressure)

The force the gas exerts on its container walls

V (Volume)

The space the gas occupies

n (Moles)

The amount of gas in moles

T (Temperature)

Measured in absolute units (Kelvin)

The equation is linked by R, the universal gas constant, whose numerical value depends on the units used (e.g., 0.08206 L·atm/(mol·K) or 8.314 J/(mol·K)).

Practical Application: This calculator lets you solve for any one of the four variables when the other three are known, making it a versatile tool for chemistry homework, lab calculations, and engineering problems.

How to Use the Ideal Gas Law Calculator

1

Enter 3 Known Values

Type numbers into any three of the four variable cards (Pressure, Volume, Moles, Temperature).

2

Select Units

Choose the appropriate unit from each dropdown (e.g., atm, L, mol, K).

3

View the Result

The fourth variable is calculated automatically in real time and displayed with a green "Result" badge.

Using Quick Fill Presets

Click the Quick Fill button to choose a standard condition:

STP

Standard Temperature and Pressure
0°C, 1 atm

NTP

Normal Temperature and Pressure
20°C, 1 atm

SATP

Standard Ambient Temperature and Pressure
25°C, 1 bar

After selecting a preset, simply enter one more value (Volume or Moles) to complete the calculation.

Additional Features

  • Decimals — Adjust the number of decimal places (2–6) using the dropdown in the toolbar
  • Unit Conversions — Expand the conversion table to see your result in every available unit
  • Common Gases — View a reference table of common gases and their molar masses
  • Reset — Clear all inputs and start fresh

Key Features

Solve for Any Variable

Enter any three of the four variables — Pressure (P), Volume (V), Moles (n), or Temperature (T) — and the calculator instantly determines the missing one. The smart input system tracks which values you've entered and automatically identifies which variable to solve.

Smart Detection: The calculator automatically recognizes which variable you're solving for based on your inputs — no need to manually select the target variable.

Flexible Unit Support

Each variable supports multiple measurement units with automatic conversion:

Pressure Units

Multiple pressure measurement options

  • atm (atmospheres)
  • Pa, kPa (pascals)
  • bar
  • mmHg (torr)
  • psi

Volume Units

Comprehensive volume measurements

  • L, mL (liters)
  • m³, cm³ (cubic meters)
  • ft³ (cubic feet)
  • gal (US gallons)

Moles Units

Amount of substance options

  • mol (moles)
  • mmol (millimoles)
  • kmol (kilomoles)

Temperature Units

All major temperature scales

  • K (Kelvin)
  • °C (Celsius)
  • °F (Fahrenheit)
  • °R (Rankine)

All conversions are handled internally so you can mix and match units freely without manual calculations.

Gas Constant Display

A dedicated badge shows the value of the gas constant R in units that match your current pressure and volume selections. For example:

Example 1

atm + L

  • R = 0.08206 L·atm/(mol·K)
  • Common in chemistry labs
Example 2

Pa + m³

  • R = 8.314 J/(mol·K)
  • SI unit standard

Formula and Unit Conversion Display

After each calculation, the app shows the rearranged formula used (e.g., P = nRT/V) along with the result in base units. Expand the Unit Conversions section to see the result converted to every supported unit simultaneously.

Instant Conversions: View your calculated result in all available units at once — perfect for cross-referencing or working with different measurement systems.

Common Gases Reference

A built-in reference table lists 10 common gases with their chemical formulas and molar masses for quick lookup:

Gas Name Formula Molar Mass (g/mol) Common Use
Hydrogen H₂ 2.016 Fuel, balloons
Helium He 4.003 Balloons, cooling
Nitrogen N₂ 28.014 Atmosphere (78%)
Oxygen O₂ 31.998 Respiration, combustion
Argon Ar 39.948 Inert atmosphere
Carbon Dioxide CO₂ 44.010 Carbonation, fire extinguishers
Methane CH₄ 16.043 Natural gas, fuel
Ammonia NH₃ 17.031 Fertilizers, refrigerant
Sulfur Dioxide SO₂ 64.066 Preservative, bleaching
Chlorine Cl₂ 70.906 Disinfection, bleaching

Frequently Asked Questions

What is the ideal gas constant R?

R is the universal gas constant that appears in the equation PV = nRT. Its numerical value depends on the units used. Common values include:

  • 0.08206 L·atm/(mol·K) — Most common in chemistry
  • 8.314 J/(mol·K) — SI unit standard
  • 62.364 L·mmHg/(mol·K) — Used with mmHg pressure

The calculator automatically shows the appropriate R value based on your selected units.

Why must temperature be in Kelvin?

The Ideal Gas Law requires an absolute temperature scale. Kelvin starts at absolute zero (−273.15°C), where molecular motion theoretically stops. Using Celsius or Fahrenheit directly would give incorrect results.

Automatic Conversion: This calculator handles the conversion for you — simply enter the temperature in your preferred unit and it converts to Kelvin internally.

What are STP, NTP, and SATP?

STP

Standard Temperature and Pressure
0°C, 1 atm
Classic IUPAC standard

NTP

Normal Temperature and Pressure
20°C, 1 atm
Room temperature standard

SATP

Standard Ambient T&P
25°C, 1 bar
Newer IUPAC recommendation

Use Quick Fill to set any of these conditions instantly.

What is the molar volume of an ideal gas at STP?

At STP (0°C, 1 atm), one mole of an ideal gas occupies approximately 22.414 liters.

Verify It Yourself: Enter P = 1 atm, n = 1 mol, T = 0°C (or 273.15 K) and solve for V to confirm this value.

Does this work for real gases?

The Ideal Gas Law is an approximation that works well for gases at low pressures and high temperatures (far from their condensation point).

Ideal Gas Law

Best For

  • Low pressure conditions
  • High temperatures
  • Classroom calculations
  • Everyday problems
Real Gas Equations

Required For

  • High pressure systems
  • Near condensation point
  • Extreme conditions
  • Precision engineering
Extreme Conditions: For real gases under extreme conditions, more accurate equations like the Van der Waals equation should be used.

For most classroom and everyday calculations, the ideal gas approximation is sufficiently accurate.

Why can't I enter a negative absolute temperature?

Absolute zero (0 K) is the lowest possible temperature in physics. At this point, molecular motion theoretically stops completely.

Physical Limitation: Negative Kelvin values are physically meaningless for classical gas behavior, so the calculator does not produce results when the temperature converts to 0 K or below.

This is a fundamental law of thermodynamics, not a calculator limitation.

P Pressure
V Volume
n Moles
T Temperature
R = 0.08206 L·atm/(mol·K)
Formula Used
Gas Formula Molar Mass (g/mol)
HydrogenH₂2.016
HeliumHe4.003
NitrogenN₂28.014
OxygenO₂31.998
ArgonAr39.948
Carbon DioxideCO₂44.009
MethaneCH₄16.043
AmmoniaNH₃17.031
Sulfur DioxideSO₂64.066
ChlorineCl₂70.906
Find Formula
PP = nRT / V
VV = nRT / P
nn = PV / RT
TT = PV / nR
Enter any 3 values and the calculator automatically solves for the 4th
Use Quick Fill to instantly set standard conditions (STP: 0°C, 1 atm)
The R constant badge updates based on your selected pressure and volume units
Click Unit Conversions to see the result in all available units at once
Change Decimals to adjust precision from 2 to 6 decimal places
All calculations are performed locally in your browser
Want to learn more? Read documentation →
1/7
Can't find it? Build your own tool with AI
Start typing to search...
Searching...
No results found
Try searching with different keywords