Ideal Gas Law

A formula-first engineering guide to using \(PV=nRT\) for gas pressure, volume, temperature, and amount-of-gas calculations.

By Turn2Engineering Editorial Team Updated April 24, 2026 8 min read

Key Takeaways

  • Definition: The Ideal Gas Law relates pressure, volume, moles, and absolute temperature for a gas modeled as ideal.
  • Main use: Engineers use \(PV=nRT\) for gas storage, HVAC, thermodynamics, pneumatic systems, combustion estimates, and state-property checks.
  • Watch for: Temperature must be absolute, pressure must be absolute, and the gas constant \(R\) must match the selected units.
  • Outcome: You can solve for \(P\), \(V\), \(n\), or \(T\), then judge when ideal-gas assumptions are no longer reliable.
Table of Contents

    Pressure, volume, moles, and temperature in \(PV=nRT\)

    The Ideal Gas Law relates gas pressure, volume, amount, and absolute temperature so engineers can estimate one property when the others are known.

    Ideal Gas Law infographic showing pressure, volume, moles, temperature, and the gas constant in the PV equals nRT equation
    The diagram shows the four state variables in the Ideal Gas Law: pressure \(P\), volume \(V\), amount of gas \(n\), and absolute temperature \(T\), connected by the gas constant \(R\).

    Notice the balance: if the amount of gas is fixed, pressure tends to rise when temperature rises or volume decreases. That physical trend is often more important than the algebra because it helps you catch impossible answers before trusting a calculation.

    What is the Ideal Gas Law?

    The Ideal Gas Law is a thermodynamic state equation that connects the pressure, volume, temperature, and amount of a gas. In engineering work, it is used when a gas behaves closely enough to an ideal gas that molecular volume and intermolecular forces can be neglected.

    The practical problem is usually simple: you know three properties and need the fourth. For example, you may need to estimate the pressure inside a compressed air tank after heating, the volume occupied by a gas at a new temperature, or the number of moles in a sealed vessel.

    The Ideal Gas Law is especially useful as a first-pass model in thermodynamics, HVAC analysis, pneumatic systems, gas storage checks, combustion calculations, and classroom problem solving. It is not a perfect description of every gas, but it gives a fast and physically meaningful estimate when conditions are reasonable.

    The Ideal Gas Law formula

    The most common engineering form of the Ideal Gas Law is:

    $$ PV = nRT $$

    This equation says that the pressure-volume product of a gas equals the amount of gas multiplied by the universal gas constant and absolute temperature. If \(n\) is fixed, the equation also shows why pressure, volume, and temperature are tightly linked.

    A second useful form uses mass instead of moles. This is common in mechanical engineering and fluid systems when gas quantity is known as mass:

    $$ PV = mR_sT $$

    In this form, \(m\) is gas mass and \(R_s\) is the specific gas constant for that gas. For air, \(R_s\) is commonly used in calculations involving density, HVAC airflow, and compressible flow estimates.

    Physical meaning

    The Ideal Gas Law is not just algebra. It is a compact way to describe how gas particles respond to confinement, heating, cooling, and changes in the amount of gas present.

    Variables and units in the Ideal Gas Law

    The most common errors in \(PV=nRT\) problems come from mixed units, gauge pressure instead of absolute pressure, or temperature entered in Celsius or Fahrenheit instead of kelvin or Rankine.

    Key variables
    • \(P\) Absolute pressure of the gas. SI: pascals \(\text{Pa}\). US customary: \(\text{psia}\), \(\text{lbf/ft}^2\), or atmospheres when paired with the correct \(R\).
    • \(V\) Gas volume. SI: cubic meters \(\text{m}^3\). US customary: cubic feet \(\text{ft}^3\). Laboratory problems may use liters.
    • \(n\) Amount of gas in moles. Use this form when applying the universal gas constant.
    • \(R\) Universal gas constant. A common SI value is \(8.314\ \text{J/(mol·K)}\).
    • \(T\) Absolute gas temperature. SI: kelvin \(\text{K}\). US customary thermodynamics: degrees Rankine \(\text{°R}\).
    • \(R_s\) Specific gas constant for mass-based calculations, often in \(\text{J/(kg·K)}\) or \(\text{ft·lbf/(lbm·°R)}\).
    Unit tip

    Use absolute pressure and absolute temperature. Convert \(^{\circ}\text{C}\) to kelvin with \(T_K = T_{^\circ C} + 273.15\), and convert gauge pressure to absolute pressure before solving.

    VariableMeaningCommon SI unitCommon US / alternate unitCommon mistake
    \(P\)Absolute pressure\(\text{Pa}\)\(\text{psia}\), \(\text{atm}\)Using gauge pressure directly
    \(V\)Gas volume\(\text{m}^3\)\(\text{ft}^3\), LMixing liters with \(R\) in joules
    \(n\)Amount of gas\(\text{mol}\)\(\text{lbmol}\)Confusing moles with mass
    \(R\)Universal gas constant\(8.314\ \text{J/(mol·K)}\)\(0.08206\ \text{L·atm/(mol·K)}\)Using an \(R\) value from a different unit system
    \(T\)Absolute temperature\(\text{K}\)\(\text{°R}\)Using Celsius or Fahrenheit directly
    Rule of thumb

    At the same volume and amount of gas, absolute pressure is proportional to absolute temperature. Doubling \(T\) in kelvin roughly doubles \(P\), if ideal-gas behavior still applies.

    How to rearrange the Ideal Gas Law

    Rearranging \(PV=nRT\) is straightforward, but the engineering check is to make sure the isolated variable has the right units and the result follows the expected trend.

    $$ P = \frac{nRT}{V} $$
    $$ V = \frac{nRT}{P} $$
    $$ n = \frac{PV}{RT} $$
    $$ T = \frac{PV}{nR} $$
    Senior engineer check

    Before accepting the result, ask whether the trend makes sense. Increasing \(V\) should lower \(P\) if \(n\) and \(T\) are fixed. Increasing \(T\) should raise \(P\) if \(n\) and \(V\) are fixed.

    Worked example: pressure in a heated gas cylinder

    Example problem

    A sealed rigid cylinder contains \(2.50\ \text{mol}\) of air at a volume of \(0.080\ \text{m}^3\). The gas temperature rises to \(325\ \text{K}\). Estimate the absolute pressure using the Ideal Gas Law.

    Because the cylinder is rigid, \(V\) is fixed. Because the cylinder is sealed, \(n\) is fixed. Assuming air behaves approximately as an ideal gas under these conditions, solve for pressure:

    $$ P = \frac{nRT}{V} $$
    $$ P = \frac{(2.50\ \text{mol})(8.314\ \text{J/(mol·K)})(325\ \text{K})}{0.080\ \text{m}^3} $$
    $$ P \approx 84{,}439\ \text{Pa} = 84.4\ \text{kPa} $$

    The result is an absolute pressure. If you need gauge pressure, subtract local atmospheric pressure. At standard sea-level atmosphere, this value would be below atmospheric pressure, which means the sealed cylinder would be under vacuum relative to the surroundings.

    Interpretation tip

    The arithmetic is only half the check. A pressure below atmospheric can be reasonable only if the sealed gas amount is low enough for the cylinder volume and temperature.

    Where engineers use the Ideal Gas Law

    Engineers use the Ideal Gas Law whenever a quick gas-state estimate is needed and the gas is far enough from highly non-ideal behavior. It is often the first relationship used before moving into a more detailed thermodynamic property table, compressible-flow model, or real-gas equation of state.

    • HVAC and ventilation: estimating air density changes with temperature and pressure for air movement and comfort analysis.
    • Pneumatic systems: checking pressure, stored gas quantity, and volume relationships in compressed-air equipment.
    • Thermodynamic cycles: modeling idealized compression, expansion, and heat-addition processes in gas power cycles.
    • Combustion and engines: estimating gas states during simplified intake, compression, and expansion calculations.
    • Laboratory and testing work: converting measured pressure, volume, and temperature into amount of gas or gas density.
    Field reality

    In real systems, sensor location matters. A pressure gauge, thermocouple, or volume estimate may not represent the same gas state if the system has temperature gradients, leakage, rapid transients, or poor mixing.

    Assumptions behind the Ideal Gas Law

    The Ideal Gas Law works because it treats the gas as a collection of particles with negligible molecular volume and negligible intermolecular attraction or repulsion. That is a useful approximation, but it is still an approximation.

    Assumptions checklist
    • 1 Gas molecules occupy negligible volume compared with the container volume.
    • 2 Intermolecular forces are small enough to ignore for the desired accuracy.
    • 3 The gas is not close to condensation, saturation, or a phase-change region.
    • 4 The gas state is reasonably uniform, so one pressure and one temperature describe the system.

    Neglected factors

    Basic \(PV=nRT\) calculations ignore compressibility-factor deviations, molecular attraction, molecular size, humidity effects unless water vapor is modeled separately, strong temperature gradients, chemical reaction, and rapid transient behavior.

    • Compressibility: at high pressure or low temperature, use \(PV=ZnRT\) or a real-gas model.
    • Mixtures: gas mixtures may require partial pressures, molar fractions, and mixture gas constants.
    • Humidity: moist air calculations often need psychrometric relationships rather than dry-air idealization alone.

    When the Ideal Gas Law breaks down

    The Ideal Gas Law becomes less reliable when gas molecules are crowded together, strongly interacting, or close to phase change. Those conditions often occur at high pressure, low temperature, or near saturation.

    Breakdown warning

    Do not rely on \(PV=nRT\) for high-pressure gas storage, near-critical fluids, refrigerants near saturation, cryogenic conditions, or precision calculations where real-gas behavior affects safety or performance.

    A common engineering upgrade is the compressibility-factor form:

    $$ PV = ZnRT $$

    Here, \(Z\) is the compressibility factor. If \(Z \approx 1\), the ideal-gas model is usually reasonable. If \(Z\) differs significantly from 1, a real-gas equation of state or property data should be used.

    Ideal Gas Law vs. related gas equations

    The Ideal Gas Law connects several simpler gas relationships. Boyle’s Law, Charles’s Law, and Gay-Lussac’s Law can be viewed as special cases where some variables remain constant.

    Equation / methodBest used forKey assumptionMain limitation
    \(PV=nRT\)General ideal-gas state calculationsGas behaves ideallyLess accurate at high pressure, low temperature, or near phase change
    Boyle’s LawPressure-volume changes at constant temperature\(n\) and \(T\) are constantDoes not handle temperature or amount changes
    Charles’s LawVolume-temperature changes at constant pressure\(n\) and \(P\) are constantRequires absolute temperature and fixed pressure
    \(PV=ZnRT\)Real-gas correction when ideal behavior is questionableCompressibility factor is known or estimatedNeeds property data or correlation for \(Z\)

    Common mistakes and engineering checks

    \(PV=nRT\) looks simple, so many mistakes are not algebra mistakes. They are setup mistakes. The best way to avoid them is to define the state clearly before substituting values.

    • Using gauge pressure instead of absolute pressure.
    • Using Celsius or Fahrenheit instead of kelvin or Rankine.
    • Using \(R = 8.314\) with volume in liters and pressure in atmospheres.
    • Confusing moles \(n\) with mass \(m\).
    • Assuming ideal behavior for refrigerants, high-pressure gases, or near-condensing vapors.
    • Mixing dry-air and moist-air assumptions in HVAC calculations.
    Sanity check

    At fixed \(n\) and \(V\), pressure should scale with absolute temperature. If the gas warms by 10% in kelvin, pressure should also rise by about 10% under ideal-gas assumptions.

    Check itemWhat to verifyWhy it matters
    Pressure basisConfirm \(P\) is absolute pressureGauge pressure can make the result dramatically wrong
    Temperature basisConfirm \(T\) is kelvin or RankineThe gas laws depend on absolute temperature
    Gas constantMatch \(R\) to the chosen unitsDifferent \(R\) values belong to different unit systems
    Physical trendCheck whether pressure, volume, and temperature move in the expected directionTrend checks catch many setup errors before finalizing the answer

    Frequently asked questions

    The Ideal Gas Law calculates the relationship between gas pressure, volume, amount of gas, and absolute temperature. If three of those values are known, the fourth can be estimated.

    Use a consistent unit system. In SI, use pascals, cubic meters, moles, kelvin, and \(R = 8.314\ \text{J/(mol·K)}\). Other unit systems are valid only when \(R\) is changed to match.

    Start with \(PV=nRT\), then divide both sides by \(nR\). The rearranged equation is \(T = PV/(nR)\). The temperature result is absolute temperature, usually kelvin.

    Air is often modeled as an ideal gas for ordinary engineering temperatures and pressures. Accuracy decreases at high pressures, low temperatures, near condensation, or when moisture and real-gas effects matter.

    It becomes less reliable at high pressure, low temperature, near the critical point, near phase change, or when intermolecular forces and molecular volume are no longer negligible.

    Summary and next steps

    The Ideal Gas Law, \(PV=nRT\), is the core equation for estimating the state of an idealized gas. It connects pressure, volume, moles, and absolute temperature in a form that is easy to rearrange and useful across thermodynamics, HVAC, pneumatic systems, combustion estimates, and gas storage checks.

    The most important engineering judgment is knowing when the ideal approximation is good enough. Use absolute pressure, absolute temperature, and a gas constant that matches your units. Then check whether high pressure, low temperature, humidity, phase change, or real-gas behavior may require a more detailed model.

    Where to go next

    Continue your learning path with these curated next steps.

    Scroll to Top