Chemical Engineering · Fluid Mechanics
Continuity equation calculator icon showing a pipe narrowing from a wide to a small section

Continuity equation calculator

This continuity equation calculator applies conservation of mass to pipe flow: it solves A₁v₁ = A₂v₂ for the velocity or diameter after a reducer or nozzle, handles gases with the compressible form ρ₁A₁v₁ = ρ₂A₂v₂, and finds the unknown branch flow in a header with up to three outlets.

Diameters are inside diameters. The example is 20 m³/h of water going from 3-inch to 2-inch schedule 40 pipe (77.9 mm to 52.5 mm).

Incompressible flow: A₁v₁ = A₂v₂

Liquids, and gases at small pressure changes. Section 1 is upstream, section 2 downstream.
Adds the mass flow and the frictionless (Bernoulli) pressure change between the sections.

Compressible flow: ρ₁A₁v₁ = ρ₂A₂v₂

Gas flow where the density changes between the sections, from known densities or from pressure and temperature (ideal gas).
Air 28.96; only needed for the mass flow (the velocity ratio depends on P and T alone).

Branch or manifold: unknown outlet flow

One inlet header feeding two or three outlet branches (incompressible, steady). The last outlet is the unknown.

How to use the continuity equation calculator

The first panel is for liquids: enter the upstream inside diameter and velocity and the downstream diameter, and the continuity equation calculator returns the downstream velocity; switch the “Solve for” menu to find the diameter that gives a target velocity, or to work backwards from the downstream velocity. Add the density to also see the mass flow and the ideal pressure change between the two sections. The second panel handles gases, where density changes with pressure and temperature, and the third balances a header that splits into two or three branches. Every result has a “Show the working” list with the numbers substituted.

The formula behind the continuity equation calculator

In steady flow nothing accumulates between two cross-sections of a pipe, so the mass entering per second equals the mass leaving per second. Writing the mass flow at each section as density times area times mean velocity gives the general form; when the density is constant it cancels and leaves the familiar volumetric form:

ρ₁ · A₁ · v₁ = ρ₂ · A₂ · v₂ = ṁ (incompressible: A₁ · v₁ = A₂ · v₂ = Q)

For round pipes A = π·D²/4, so the velocity ratio equals the square of the diameter ratio: v₂ = v₁·(D₁/D₂)². Going from a 3-inch to a 2-inch line raises the velocity by a factor of (77.9/52.5)² = 2.20. The continuity equation calculator applies this to any reducer, expander, nozzle or orifice throat. OpenStax University Physics, section 14.5 derives the equation from the volume swept through each section, and NASA Glenn’s mass flow rate page gives the compressible form used for gas ducts and nozzles.

Assumptions of the continuity equation calculator

The continuity equation calculator assumes steady flow (no accumulation, so no filling or draining between the sections), a pipe that runs full, and mean velocities over each cross-section. The incompressible form holds for liquids and, to within a few percent, for gases whose pressure changes by less than about 10 % between the sections. It says nothing about energy: to find the pressure change you need the Bernoulli Equation Calculator (frictionless) or the Pressure Drop Calculator (with friction and fittings).

Continuity equation calculator worked example: 3-inch to 2-inch reducer

Water at 20 °C flows at 20 m³/h in 3-inch schedule 40 pipe (D₁ = 77.9 mm), where the velocity is v₁ = 1.166 m/s. After a concentric reducer the line continues in 2-inch schedule 40 (D₂ = 52.5 mm). The continuity equation gives v₂ = 1.166 × (77.9/52.5)² = 2.567 m/s. The flow is unchanged at 0.005557 m³/s (20.0 m³/h) and the mass flow is 5.547 kg/s. If there were no friction and both sections were at the same height, Bernoulli would give a pressure fall of ρ(v₂² − v₁²)/2 = 998.2 × (2.567² − 1.166²)/2 = 2.61 kPa, which is recovered only partly if the line later expands again. These are the defaults of the first panel of the continuity equation calculator. In “Downstream diameter” mode, a target of 2.567 m/s returns 52.5 mm, closing the loop.

Worked example: gas in a constant-diameter line

Air (M = 28.96 g/mol) enters a 6-inch schedule 40 line (154.1 mm) at 15 m/s, 8 bar absolute and 20 °C, and leaves at 6 bar absolute and 15 °C. The densities are ρ₁ = 8×10⁵ × 0.02896 / (8.314 × 293.15) = 9.506 kg/m³ and ρ₂ = 7.253 kg/m³. With equal areas, v₂ = v₁·ρ₁/ρ₂ = 15 × 9.506 / 7.253 = 19.66 m/s. The mass flow, 2.66 kg/s, is the same at both ends, but the actual volumetric flow rises from 1007 to 1320 m³/h. This is the default case in the second panel of the continuity equation calculator. Treating the gas as incompressible would have kept the velocity at 15 m/s, a 24 % error.

Manifolds, headers and branches

For a junction the continuity equation becomes a balance over all connections: the sum of inflows equals the sum of outflows. In the third panel of the continuity equation calculator, a 4-inch header (102.3 mm) carries 50 m³/h; outlet 1 (3-inch, 77.9 mm) takes 20 m³/h and outlet 2 (2-inch, 52.5 mm) takes 12 m³/h, so outlet 3 (2½-inch, 62.7 mm) must carry 50 − 20 − 12 = 18 m³/h. The velocities are 1.69 m/s in the header, 1.17 m/s, 1.54 m/s and 1.62 m/s in the branches. This is the same balance as the splitter in the Mass Balance Calculator, written in volumetric units. Continuity tells you how much must leave in total; how the flow actually divides between parallel branches depends on their pressure drops.

Velocity ratios for common reducers

The table gives v₂/v₁ = (D₁/D₂)² for concentric reducers between schedule 40 sizes (ASME B36.10M inside diameters), the quickest way to estimate the velocity jump without running the continuity equation calculator.

Reducer (schedule 40)D₁ (mm)D₂ (mm)Velocity ratio v₂/v₁
1½ × 1 inch40.926.62.36
2 × 1½ inch52.540.91.65
3 × 2 inch77.952.52.20
4 × 3 inch102.377.91.72
6 × 4 inch154.1102.32.27
8 × 6 inch202.7154.11.73
10 × 8 inch254.5202.71.58
12 × 10 inch303.2254.51.42

Where engineers use the continuity equation

Pump suction and discharge. Suction lines are usually one size larger than the pump inlet; continuity shows how much velocity rises in the eccentric reducer at the nozzle. Nozzles and jets. A spray or tank-cleaning nozzle trades area for velocity; the exit velocity sets the jet reach. Flow meters. Orifice and venturi meters rely on the velocity increase at the throat; continuity plus Bernoulli gives their flow equation. Heat exchangers. The tube-side velocity follows from the total flow divided by the flow area of the tubes in one pass. Gas lines. As the compressible panel of the continuity equation calculator shows, in long gas pipelines the velocity rises toward the outlet as the pressure falls, even at constant diameter, which is why velocity limits are checked at the low-pressure end.

Common mistakes with a continuity equation calculator

Using the diameter ratio instead of its square. Velocity scales with area, so halving the diameter quadruples the velocity. Nominal instead of inside diameters. The ratio of nominal sizes (3/2 = 1.5, squared 2.25) is close to but not equal to the true 2.20 for schedule 40 pipe. Applying A₁v₁ = A₂v₂ to gases with large pressure changes. Use mass flow; the second panel of the continuity equation calculator does this. Mixing standard and actual gas flows in a branch balance; a continuity equation calculator only balances like with like. Assuming continuity fixes pressure. It only fixes velocities; pressure needs an energy balance.

Related calculators

Turn the velocity change into a pressure change with the Bernoulli equation calculator, or start from the flow rate with the flow rate calculator and the fluid velocity calculator.

Frequently asked questions

What does a continuity equation calculator solve?

The continuity equation is conservation of mass for a flowing fluid: in steady flow the mass flow ρ·A·v is the same at every cross-section. For an incompressible fluid it reduces to A₁v₁ = A₂v₂, so the volumetric flow is constant.

Why does velocity increase when a pipe gets smaller?

The same volume per second has to pass through a smaller area, so it must move faster. With round pipes the velocity rises with the square of the diameter ratio.

Does the continuity equation apply to gases?

Yes, in its mass form ρ₁A₁v₁ = ρ₂A₂v₂. The volumetric form A₁v₁ = A₂v₂ is only acceptable when the density change is small, roughly when the pressure changes by less than 10 %.

Can the continuity equation calculator give the pressure after a reducer?

It shows the frictionless pressure change ρ(v₂² − v₁²)/2 when you enter a density. For a realistic value add the reducer loss coefficient, or use the Bernoulli equation calculator with a head loss term.

Is this continuity equation calculator free?

Yes. It runs in your browser, needs no sign-up and does not store or send the values you enter.