Skip to main content
Construction formula

How to calculate pipe diameter

This circular pipe sizing formula rearranges flow rate equals area times velocity to estimate the inside diameter needed for a target flow speed.

Direct answer
Formula
D = sqrt(4Q / (pi * v))

Use the table below to match each symbol with the right input. Keep units consistent before you start.

Pipe diameter formula
Start here when you only need the equation and variable names.
Formula
D = sqrt(4Q / (pi * v))

This circular pipe sizing formula rearranges flow rate equals area times velocity to estimate the inside diameter needed for a target flow speed.

Variable meanings
Check each symbol, meaning, and unit before you calculate.
SymbolNameDescriptionUnit
DInside diameterRequired internal pipe diameter.length
QFlow rateVolumetric flow through the pipe.volume per time
vVelocityTarget average fluid velocity.length per time
AFlow areaRequired cross-sectional area, equal to Q divided by v.length squared
When to use this formula
Check that your situation matches the formula before you trust the result.
  • Use it for preliminary circular pipe sizing when the design flow rate and target fluid velocity are known.
Step-by-step method
Follow these steps when you are solving it by hand.
  1. 1Convert flow rate to cubic length per unit time.
  2. 2Convert velocity to the matching length per unit time.
  3. 3Divide flow rate by velocity to get required flow area.
  4. 4Use D = sqrt(4A / pi) to convert circular area to diameter.
  5. 5Compare the result with nominal pipe sizes and code requirements.
Examples
These sample numbers show the order of operations and units.
Metric flow
Q
0.010 m^3/s
v
2 m/s
  1. 1.A = Q / v = 0.010 / 2 = 0.005 m^2
  2. 2.D = sqrt(4 * 0.005 / pi)
  3. 3.D = 0.0798 m
Result
The estimated inside diameter is about 79.8 mm.
Imperial flow
Q
50 gpm
v
5 ft/s
  1. 1.Q = 50 * 0.133681 / 60 = 0.1114 ft^3/s
  2. 2.A = 0.1114 / 5 = 0.0223 ft^2
  3. 3.D = sqrt(4 * 0.0223 / pi) = 0.1685 ft
Result
The estimated inside diameter is about 2.02 inches.
Mistakes to avoid
Small input or unit errors can change the answer a lot.
  • Mixing gallons per minute, cubic feet per second, liters per second, and meters per second without converting.
  • Using nominal outside diameter instead of actual inside diameter.
  • Ignoring pressure loss, fittings, pipe roughness, slope, temperature, and code requirements.
  • Treating a preliminary velocity-based size as a complete engineering design.
Open the Pipe Sizing Calculator
Open the calculator for the answer without rewriting the formula.

Enter your values in the related calculator, then compare the output with the hand method above.

Open Pipe Sizing Calculator
FAQs
Short answers for common formula questions.
Can I calculate Pipe diameter by hand?

Yes. Write the units next to each value, convert rates or measurements first, and round only the final answer.

Why does my Pipe diameter result differ from another calculator?

Most differences come from rounding, unit conversions, rate timing, or a slightly different version of the formula.

When is the Pipe Sizing Calculator better than hand math?

Open the Pipe Sizing Calculator to check several scenarios or skip the hand arithmetic.