PetroCalcHub
Interactive engineering lesson

Z Factor vs Gas Compressibility Coefficient

Separate dimensionless Z from gas compressibility cg using a synthetic isothermal Z curve, signed pressure derivatives, a worked example and interactive slope controls.

By PetroCalcHub Team | Updated 2026-10-24

Original diagram Interactive example Worked practice 2 technical sources

Related workflow calculators

Engineering context

Gas compressibility factor Z and gas compressibility coefficient cg answer different questions. Z relates a gas state to the ideal-gas equation. The isothermal coefficient cg describes how a fixed amount of gas changes volume with pressure along a constant-temperature, fixed-composition path. Their similar names can hide the difference between a dimensionless state value and a local response with inverse-pressure units.

The example uses a synthetic Z curve near 3,000 psia. It is an arithmetic teaching curve, not measured PVT data or a gas correlation. You can change its local slope while keeping the central Z value fixed at 0.85. Watching cg change at that same point demonstrates why one isolated Z value cannot supply all the information needed for a compressibility calculation.

1 · State value

ZP

Z = 0.85

Dimensionless

At 3,000 psia

2 · Local slope

ZP

dZ/dP = −0.00002

Per psi

At fixed T and composition

3 · Volume response

VP

cg = 0.000356862745

Per psi

1/P − (1/Z)(dZ/dP)

Conceptual sketches: a state value and its local isothermal slope are separate inputs. Their combination determines the volume response. The live curve below supplies numerical axes.
Try the idea

Change one thing and observe the result

Keep P = 3,000 psia and Z = 0.85. Choose a synthetic local slope on the same-temperature, fixed-composition curve. All three choices pass through the central state.

Central Z (unchanged)
0.85 dimensionless
Local dZ/dP
-0.00002 1/psi
Gas compressibility cg
0.000356862745 1/psi
Zero-slope reference 1/P
0.000333333333 1/psi
Z (dimensionless)0.8460.8500.8542,9003,0003,100Absolute pressure (psia)
Synthetic local lines, not measured gas data. The central value stays fixed; the signed slope determines the correction to 1/P.
Live same-temperature, fixed-composition points
Pressure (psia)Z
2,9000.852
3,0000.850
3,1000.848

Practical workflow

  1. 1

    State absolute pressure, temperature and composition for the gas state.

  2. 2

    Obtain Z and its local derivative along a compatible isothermal curve.

  3. 3

    Keep the derivative sign and convert its pressure basis before evaluating cg.

  4. 4

    Check the inverse-pressure units and compare with the zero-slope reference 1/P.

Keep the two quantities and their units separate

The real-gas equation is PV = ZnRT for a fixed amount n. Z has no units because it is the ratio PV/(nRT). A value of 0.85 means that ratio is 0.85 at the specified pressure and temperature. It does not mean the gas loses 85% of its volume for a unit pressure increase, and it is not a coefficient expressed per psi.

Isothermal compressibility is cg = −(1/V)(∂V/∂P) at fixed temperature and composition. The minus sign makes cg positive for the usual local behavior in which increasing pressure reduces volume. If pressure is expressed in psi, cg has units 1/psi. A unit label is therefore a quick way to distinguish the two quantities in a table, calculator input or report.

Z=PVnRT,cg=−1V(∂V∂P)T,n,compositionZ=\frac{PV}{nRT},\qquad c_g=-\frac{1}{V}\left(\frac{\partial V}{\partial P}\right)_{T,n,\mathrm{composition}}

Derive the pressure-slope correction

At fixed amount, temperature and composition, write V = ZnRT/P. Taking a logarithmic derivative gives (1/V)(∂V/∂P) = (1/Z)(∂Z/∂P) − 1/P. Negating that expression gives the gas compressibility relationship below. Both terms have inverse-pressure units, so their difference has the required dimension. Use absolute pressure in the reciprocal term.

The derivative is signed. A falling Z curve has a negative slope, so subtracting its contribution raises cg above 1/P at that point. A rising Z curve lowers cg relative to 1/P. These comparisons hold at the same pressure and Z; they do not say that a negative-slope gas always has a larger coefficient than a different gas at another pressure.

cg=1P−1Z(∂Z∂P)T,compositionc_g=\frac{1}{P}-\frac{1}{Z}\left(\frac{\partial Z}{\partial P}\right)_{T,\mathrm{composition}}

Estimate a local slope from compatible nearby states

For the baseline teaching line, choose Z = 0.852 at 2,900 psia, 0.850 at 3,000 psia and 0.848 at 3,100 psia. All three points represent the same assumed temperature and composition. The centered difference is (0.848 − 0.852)/(3,100 − 2,900) = −0.00002 per psi. It matches the exact slope because this synthetic local curve is linear.

For a curved measured or calculated isotherm, a finite difference is an estimate. Test a suitable pressure spacing, account for measurement noise and compare with a derivative from the underlying model where available. Differencing unrelated temperatures or different compositions follows another path and cannot be inserted as an isothermal derivative. A wide pressure interval may also conceal the local slope at the requested point.

Synthetic baseline isotherm near the calculation state
Pressure (psia)Z (dimensionless)Basis
2,9000.852Same T and composition
3,0000.850Central state
3,1000.848Same T and composition

Compare three slopes at the same central Z

At 3,000 psia, 1/P is 0.000333333333 per psi. The negative baseline slope adds 0.000023529412 per psi to that reference, giving cg = 0.000356862745 per psi. A flat local Z curve makes the derivative correction zero. A positive slope of 0.00002 per psi subtracts the same correction and gives 0.000309803922 per psi.

All three synthetic lines pass through Z = 0.85 at the central pressure, yet they produce different cg values. The explorer changes only that slope and displays the nearby Z points as well as the coefficient. Keep the distinction visible when comparing outputs: the graph's vertical axis is dimensionless Z, while the result card reports cg in 1/psi.

Same P = 3,000 psia and Z = 0.85; different local slopes
dZ/dP (1/psi)cg (1/psi)Relative to 1/P
−0.000020.000356862745Higher
00.000333333333Equal
+0.000020.000309803922Lower

Recognize the ideal-gas limit and derivative basis

An ideal gas has Z = 1 throughout the isotherm, so its Z derivative is zero and cg = 1/P. A flat slope at Z = 0.85 also gives cg = 1/P locally, but that one equality does not make the gas ideal. It only says the local Z correction vanishes. State behavior over a range cannot be inferred from one matching coefficient.

A correlation may use reduced pressure Ppr = P/Ppc instead of absolute pressure. At fixed pseudo-critical pressure, convert its slope using dZ/dP = (dZ/dPpr)/Ppc. The reduced-pressure derivative cannot be pasted unchanged into a field expecting 1/psi. Temperature must also remain fixed along the derivative path; changing reduced temperature while stepping pressure introduces another contribution.

(∂Z∂P)T=1Ppc(∂Z∂Ppr)Tprfor fixed composition and Ppc\left(\frac{\partial Z}{\partial P}\right)_T=\frac{1}{P_{pc}}\left(\frac{\partial Z}{\partial P_{pr}}\right)_{T_{pr}}\quad\text{for fixed composition and }P_{pc}

Choose the tool that matches the available inputs

Use the derivative-based cg calculator when you already have absolute pressure, Z and a compatible local pressure derivative. The gas Z comparison workflow answers a different task: it evaluates supported Z correlations at reduced conditions. It does not turn an isolated Z output into an isothermal derivative automatically. If a derivative is required, document how the surrounding states or underlying model supplied it.

Check the pressure basis before interpreting a coefficient. A derivative per MPa needs conversion to per psi when using pressure in psia. If the evaluated cg is nonpositive for a proposed ordinary stable gas state, revisit the curve, phase region, units and derivative path rather than replacing the sign or clipping the result. The synthetic controls here stay within a small neighborhood that keeps Z and cg positive.

Worked example

Preserve the negative slope in a cg calculation

Use P = 3,000 psia, Z = 0.85 and the synthetic fixed-temperature slope dZ/dP = −0.00002 per psi.

  1. 1. Calculate the local derivative
    (0.848 − 0.852)/(3,100 − 2,900) = −0.00002 per psi.

    The two surrounding points belong to the same synthetic isotherm and composition.

  2. 2. Evaluate the reciprocal-pressure term
    1/P = 1/3,000 = 0.000333333333 per psi.

    Pressure is absolute and the result has inverse-pressure units.

  3. 3. Retain the signed Z correction
    (1/Z)(dZ/dP) = −0.00002/0.85 = −0.000023529412 per psi.

    A negative derivative remains negative before the subtraction in the full relationship.

  4. 4. Subtract the correction
    cg = 0.000333333333 − (−0.000023529412) = 0.000356862745 per psi.

    The two terms share the same pressure basis and can be subtracted directly.

Result

The gas compressibility coefficient is approximately 3.56862745 × 10⁻⁴ per psi; the Z factor remains 0.85.

Interpretation

The negative local Z slope increases cg above 1/P at this state. A Z value alone would not reveal the magnitude or sign of that correction.

Test your understanding

Keep P and Z fixed but change dZ/dP to +0.00002 per psi. Does cg rise or fall?

Show the worked answer

It falls to 1/3,000 − 0.00002/0.85 = 0.000309803922 per psi. The central Z value stays at 0.85; only the local slope changes.

Method selection guide

Match the calculation method to the physical question and the evidence available.

ConditionUseWhy
Z and an isothermal pressure derivative are availableEvaluate the derivative-based cg relationshipThe state and its local response supply all three inputs.
Only reduced conditions and a gas-correlation choice are availableEvaluate Z first and establish a derivative separatelyThe current Z comparison reports state values, not cg.
Only one measured Z value is availableObtain compatible local PVT informationSeveral curves can share the value while having different slopes.

Before using the result

  • Use absolute pressure and identify its unit.
  • State a common temperature and gas composition.
  • Distinguish dimensionless Z from cg in inverse pressure.
  • Preserve the sign of the local Z derivative.
  • Convert reduced-pressure or other pressure-unit slopes before use.
  • Check the derivative spacing, phase region and local plausibility of the coefficient.

Start with these calculators

These links keep the guide close to the working calculator flow.

2 calculators

Continue learning

Formula references in this workflow

Real Gas Isothermal Compressibility with Z-Factor Derivative

Verified sources used for this guide