Enter the pressure, volume, number of moles, and temperature into the calculator to determine the compressibility factor (Z) of a real (non-ideal) gas.
Compressibility Formula
The following formula is used to calculate the compressibility factor (Z) of a gas.
Z = P * V / (n * R * T)
- Where Z is the compressibility factor (dimensionless)
- P is the pressure (pascals, Pa)
- V is the volume (m³)
- n is the amount of substance (moles, mol)
- R is the universal gas constant (8.314462618 J/(mol·K))
- T is the absolute temperature (K)
Pressure is the force applied per unit area, measured in pascals (Pa) in SI units.
Volume is a measure of the amount of space occupied by a three-dimensional object.
A mole (mol) is the SI unit for amount of substance and contains exactly 6.02214076 × 1023 specified entities (Avogadro’s constant). For a pure substance, the number of moles can be found from n = m/M, where m is mass and M is molar mass.
The gas constant is a physical constant used in the ideal gas law to relate the properties of gases, such as pressure, volume, and temperature.
Temperature (K) measures the thermal state of a system using an absolute scale (Kelvin). Absolute temperature must be greater than 0 K.
What is the Compressibility Factor (Z)?
The compressibility factor Z is a dimensionless number that describes how much a real gas deviates from ideal-gas behavior:
– If Z = 1, the gas behaves ideally.
– If Z < 1, attractive intermolecular forces tend to dominate (gas is “more compressible” than ideal under those conditions).
– If Z > 1, repulsive effects/finite molecular volume tend to dominate (gas is “less compressible” than ideal under those conditions).
Note: This is different from thermodynamic “compressibility” (such as isothermal compressibility, κT), which is defined using derivatives like κT = – (1/V)(∂V/∂P)T. This page’s equation and calculator are specifically for the compressibility factor Z.
Compressibility Example
How to calculate compressibility?
- First, determine the pressure.
Measure the pressure of the gas.
- Next, determine the volume.
Measure or calculate the volume occupied by the gas at that pressure.
- Next, determine the number of moles.
Determine the amount of substance (moles) of the gas.
- Next, determine the temperature.
Measure the absolute temperature of the gas (in K, or convert to K).
- Finally, calculate the compressibility factor (Z).
Calculate Z using Z = (P × V) / (n × R × T).
FAQ
Compressibility describes how a material’s volume changes under pressure. In thermodynamics, it is often expressed as isothermal compressibility κT = −(1/V)(∂V/∂P)T.
The compressibility factor Z is a dimensionless measure of real-gas deviation from ideal-gas behavior. It is defined as Z = (P × V)/(n × R × T); for an ideal gas, Z = 1.
This calculator computes the compressibility factor by rearranging the ideal gas law: Z = (P × V)/(n × R × T). (Thermodynamic compressibility, such as κT, is calculated differently.)

