Gas Flow Calculation Formula: A Practical How-To
In this article
The most common gas flow calculation uses the ideal gas law rearranged to solve for volumetric flow: Q = (n·R·T) / P, where Q is flow in cubic metres per second, n is molar flow in moles per second, R is 8.314 J/(mol·K), T is absolute temperature in kelvin, and P is absolute pressure in pascals. For practical pipe sizing, the Darcy-Weisbach equation combined with a friction factor gives pressure drop for a known flow, or you can invert it to find flow from a measured pressure drop. This guide walks through both approaches with worked numbers, so you can pick the one that matches what you actually have measured.
What You'll Need
- A calculator or spreadsheet (the arithmetic is simple but repetitive).
- The gas's molar mass or specific gravity (for example, natural gas is roughly 0.6 to 0.7 relative to air; air is 28.97 g/mol).
- Absolute pressure and absolute temperature at the measurement point (add 101.325 kPa to gauge pressure, add 273.15 to Celsius).
- Pipe internal diameter and length, plus the pipe material's roughness, if you are doing pressure-drop work.
- A flow meter reading, or a measured pressure drop, depending on which direction you are solving.
Step-by-Step
- Decide which formula fits your data. If you know molar flow or mass flow and want volume flow at a given condition, use the ideal gas law. If you know the pipe and the pressure drop and want flow, use Darcy-Weisbach. If the gas is at high pressure or near its dew point, the ideal gas law will be off by several percent and you should use a compressibility factor Z from a gas table.
- Convert everything to absolute units first. Gauge pressure plus atmospheric pressure gives absolute pressure. Celsius plus 273.15 gives kelvin. This is the single most common source of wrong answers, because a gauge reading of 200 kPa is actually about 301 kPa absolute at sea level.
- Work the ideal gas version. Suppose you have 0.05 mol/s of methane at 20 °C and 150 kPa gauge. Absolute temperature is 293.15 K, absolute pressure is 251.325 kPa. Q = (0.05 × 8.314 × 293.15) / 251325 = 0.000485 m³/s, or about 0.485 L/s. Multiply by 3600 to get 1.75 m³/h.
- Convert mass flow to molar flow if needed. Divide mass flow in grams per second by molar mass in grams per mole. For methane at 16.04 g/mol, 0.8 g/s is 0.0499 mol/s, which matches the example above.
- Set up Darcy-Weisbach for pipe flow. The pressure drop is ΔP = f × (L/D) × (ρv²/2), where f is the Darcy friction factor, L and D are length and internal diameter in metres, ρ is density in kg/m³, and v is velocity in m/s. To find flow from a measured ΔP, rearrange for v, then Q = v × cross-sectional area.
- Estimate the friction factor. For smooth pipes at Reynolds numbers below about 2,000, f = 64/Re. For turbulent flow, use the Colebrook equation iteratively or a Moody chart. If you are within 10 percent, the Swamee-Jain approximation is usually good enough for home and light-commercial work.
- Check the Reynolds number. Re = (ρ × v × D) / μ, where μ is dynamic viscosity in Pa·s. If Re comes out below 2,000 the flow is laminar and the friction factor formula changes; if it is above 4,000 it is turbulent. Between those values the answer is uncertain and you should treat the result as an estimate.
- Sanity-check the result. Compare the calculated velocity against typical practice: below about 20 m/s for low-pressure gas in small pipes, and well below the speed of sound. A velocity that comes out at 200 m/s in a domestic pipe means a unit conversion went wrong.
- Record the conditions with the answer. A flow number without its temperature and pressure is meaningless, because gas volume changes with both. Write "1.75 m³/h at 20 °C and 251 kPa absolute" rather than just "1.75 m³/h".
Common Mistakes
Using gauge pressure where absolute pressure is required is the classic error, and it understates flow by roughly 40 percent at typical domestic pressures. Mixing units is the second: pascals with kilopascals, millimetres with metres, or Celsius with kelvin will all produce nonsense. Forgetting that density changes with pressure and temperature leads to using a single density figure across a system with a large pressure drop. Finally, applying the ideal gas law to a gas near liquefaction, or to a mixture with a high compressibility factor, gives results that look plausible but are wrong by several percent.
Tips
Keep a small conversion sheet next to your calculator: 1 bar = 100 kPa, 1 m³ = 1,000 L, 1 hour = 3,600 s. Do the calculation twice with the units written out each time; most errors show up as a factor of 1,000 or 3,600. If you are sizing a pipe rather than solving a physics problem, use the manufacturer's or utility's flow tables first and treat the formula as a cross-check. For natural gas appliances, always confirm against the appliance's rated input and the local code, because the formula does not know about derating or altitude.
Troubleshooting
If your calculated flow is wildly different from a meter reading, check pressure and temperature units first, then confirm the pipe internal diameter rather than the nominal size. If the pressure drop is larger than expected, look for a partially closed valve, a clogged filter, or a pipe size reduction you missed. If the Reynolds number lands in the transitional range, the friction factor is genuinely uncertain; use a conservative value and note the range. If the result changes a lot when you adjust temperature by a few degrees, you are probably working at low absolute pressure where small errors matter more. If the gas is a mixture, use the mixture's molar mass and, where available, its compressibility factor rather than treating it as pure methane.
Frequently Asked Questions
What is the simplest gas flow formula?
For volumetric flow from molar flow at known conditions, Q = nRT/P. For pipe flow from pressure drop, Darcy-Weisbach rearranged for velocity, then multiplied by pipe area.
Do I use gauge or absolute pressure?
Always absolute. Add atmospheric pressure (about 101.3 kPa at sea level) to the gauge reading before substituting into any gas formula.
Can I use the ideal gas law for natural gas?
For low pressures and moderate temperatures it is usually within a few percent. At high pressure or near the dew point, include a compressibility factor Z from a gas table.
Why does my flow change when temperature changes?
Because gas volume is proportional to absolute temperature. A 10 °C rise increases volume by roughly 3.4 percent at constant pressure.
What units should the answer be in?
Whatever your meter uses, but state the conditions. Cubic metres per hour at standard conditions and at actual conditions are different numbers.
Is this formula safe for sizing a gas line?
It is a cross-check, not a substitute for local code and a licensed installer. Gas line sizing involves safety factors and appliance ratings the formula does not capture.