Compressibility Factor Calculator

Enter a gas's pressure, volume, amount, and temperature to compute the compressibility factor Z = PV / (nRT) and see how far it deviates from ideal-gas behavior.

Quick Facts

Definition
Z = PV / (nRT)
P = absolute pressure, V = volume, n = moles, R = 8.314 J/(mol·K), T = absolute temperature.
Ideal gas baseline
Z = 1
PV = nRT holds exactly only for a hypothetical gas with no molecular volume or intermolecular forces.
Z < 1
Attractive forces dominate
Gas occupies less volume than ideal predicts — common at moderate pressure, especially near the critical point.
Z > 1
Repulsive forces dominate
Gas resists compression more than ideal predicts — typical at very high pressure.

Your Results

Calculated
Compressibility Factor (Z)
-
Z = PV / (nRT), dimensionless
Ideal Gas Volume
-
V if the gas behaved ideally at this P and T
Deviation from Ideal
-
(Z − 1) × 100%
Molar Volume
-
Actual volume per mole (V / n)

Ready

Enter pressure, volume, moles, and temperature, then press Calculate.

Formula and Method for the Compressibility Factor

The compressibility factor Z is the standard way engineers and chemists quantify how far a real gas departs from ideal-gas behavior at a given pressure, volume, temperature, and amount of substance. It is defined as Z = PV / (nRT), where P is absolute pressure, V is the actual measured volume the gas occupies, n is the number of moles, R is the universal gas constant (8.314462618 J/(mol·K)), and T is absolute temperature in kelvin. For an ideal gas, PV = nRT holds exactly, so Z = 1. Any real gas deviates from that relationship to some degree, and Z tells you the size and direction of that deviation.

How the calculation works

Enter the measured pressure, volume, amount of gas, and temperature — the calculator converts each to SI units (pascals, cubic meters, moles, and kelvin) internally. It multiplies pressure by volume to get PV (in joules), multiplies the gas constant, moles, and temperature to get nRT (also in joules), and divides: Z = PV / (nRT). The tool also reports the volume the same gas would occupy if it behaved ideally at this pressure and temperature (Videal = nRT / P), the percentage deviation (Z − 1) × 100%, and the molar volume V/n so you can compare against tabulated reference values.

Reading the result

Z ≈ 1.00 means the gas is behaving essentially like an ideal gas — common at low pressure and moderate-to-high temperature, where molecules are far apart and interactions are negligible. Z < 1 means attractive intermolecular forces are pulling the gas into a smaller volume than the ideal law predicts; this is typical for gases like CO₂ or steam at moderate pressure, especially as you approach the critical point. Z > 1 means repulsive forces dominate — at very high pressure, gas molecules are packed closely enough that their own finite size resists further compression, pushing the actual volume above the ideal prediction.

Common mistakes

  • Using gauge pressure instead of absolute pressure: Z requires absolute pressure (gauge reading plus atmospheric pressure), not a gauge-pressure reading alone.
  • Forgetting to convert temperature to kelvin: T must be an absolute temperature — plugging °C or °F directly into Z = PV/(nRT) gives a meaningless result.
  • Mixing unit systems: pressure must be in pascals and volume in cubic meters when paired with R = 8.314 J/(mol·K); this calculator converts for you, but hand calculations require consistent SI units throughout.
  • Treating Z as a constant for a gas: Z changes with pressure and temperature — a value calculated at one state does not apply to the same gas at a different pressure or temperature.

Where Z comes from and its limits

Generalized compressibility charts (such as the Nelson-Obert charts) let engineers estimate Z from reduced pressure Pr = P/Pc and reduced temperature Tr = T/Tc using the principle of corresponding states, without needing a direct volume measurement. This calculator instead computes Z directly from a measured or given P, V, n, and T — the most accurate approach when you already have that data, since it makes no assumption about which specific gas you're working with.

Frequently Asked Questions

What is the compressibility factor (Z) in physics and engineering?
The compressibility factor Z measures how far a real gas's behavior deviates from an ideal gas at the same pressure, volume, and temperature. It is defined as Z = PV / (nRT), where P is absolute pressure, V is volume, n is the amount of gas in moles, R is the universal gas constant (8.314 J/(mol·K)), and T is absolute temperature in kelvin. For an ideal gas Z = 1 exactly; real gases have Z ≠ 1 because their molecules occupy space and interact through intermolecular forces.
What does it mean if Z is less than 1 or greater than 1?
Z < 1 means the gas is more compressible than an ideal gas — attractive intermolecular forces pull molecules closer together, shrinking the actual volume below the ideal prediction. This is common at moderate pressure, especially near a gas's critical point. Z > 1 means the gas is less compressible than ideal — at very high pressure, the finite size of the gas molecules resists further compression and pushes the volume above the ideal prediction.
Why isn't the compressibility factor exactly 1 for real gases?
The ideal gas law (PV = nRT) assumes molecules have zero volume and no intermolecular forces. Real gas molecules occupy physical space and attract or repel one another, so real gases deviate from ideal behavior — especially at high pressure or low temperature, where molecules are packed closer together. Z quantifies exactly how large that deviation is.
What units does this calculator use for pressure, volume, and temperature?
Enter pressure in Pa, kPa, atm, bar, or psi, volume in m³, L, mL, or ft³, and temperature in K, °C, or °F. The calculator converts everything to SI units (pascals, cubic meters, kelvin) internally before computing Z = PV / (nRT), so the result is unaffected by which units you pick.