💨 Ideal Gas Law Calculator

Solve for pressure, volume, temperature, or moles using PV = nRT. Supports 7 common gases with process analysis.

Ideal Gas Molecules PV = nRT P (Pressure)

Ideal Gas Law Solver

Solve for any unknown state variable ($P, V, T, n$) by selecting the target variable, picking a gas preset, and providing the remaining known properties:

  • Equation of State: $PV = nRT$ where $R = 8.314\text{ J/(mol·K)}$.
  • Gas preset: Determines molecular weight $M$ and specific heat ratio $\gamma$.
  • Apparatus Animation: Shows molecular kinetic velocity changes with temperature $T$.
  • PV curves: Visualizes isothermal and isentropic paths starting from the calculated state.

📝 Configuration

Solve For

Gas Selection

Known Values

Ideal Gas Law:
$PV = nRT$

$R = 8.314$ J/(mol·K)
$R_{spec} = R/M$ [J/(kg·K)]

Speed of sound:
$a = \sqrt{\gamma RT}$

Assumptions:
• No intermolecular forces
• Negligible molecular volume
• Valid at low P, high T

📊 Results & Visualization

Configure the inputs and click Calculate to see results.

📘 Calculation Methodology

Mathematical Model & Theory

The Ideal Gas Law relates the state variables of a hypothetical ideal gas. It is a good approximation for real gases under low pressures and high temperatures:

$$P V = n R_u T$$ $$R_u = 8.314 \text{ J/(mol·K)} \quad \text{(Universal gas constant)}$$

Assumptions & Boundary Conditions:

  • The volume occupied by the gas molecules themselves is negligible compared to the total volume of the container.
  • The attractive or repulsive intermolecular forces between gas molecules are negligible.
  • Collisions between molecules and container walls are perfectly elastic (no kinetic energy loss).
  • The gas is in local thermodynamic equilibrium.

Academic References:

  1. Cengel, Y. A., & Boles, M. A. (2015). Thermodynamics: An Engineering Approach (8th ed.). McGraw-Hill.
  2. Moran, M. J., Shapiro, H. N., Boettner, D. D., & Bailey, M. B. (2014). Fundamentals of Engineering Thermodynamics (8th ed.). John Wiley & Sons.

Worked Engineering Example

Problem Statement:
A 50-liter tank contains nitrogen gas at 25°C and 500 kPa. Find the number of moles of nitrogen in the tank.

Step-by-step Solution:
1. Convert units to SI base units:
$$V = 50 \text{ L} = 0.050 \text{ m}^3, \quad P = 500 \text{ kPa} = 500,000 \text{ Pa}$$ $$T = 25 + 273.15 = 298.15 \text{ K}$$ 2. Rearrange and solve Ideal Gas Law for moles ($n$):
$$n = \frac{P V}{R_u T} = \frac{500,000 \times 0.050}{8.314 \times 298.15} = 10.085 \text{ moles}$$
Final Result:
The tank contains 10.09 moles of nitrogen.