Plumbing Pipe Size Calculator
Pipe sizing starts with the continuity equation: flow rate equals velocity times cross-sectional area. This calculator takes a flow rate in gallons per minute, a target maximum velocity in feet per second, and an actual pipe inside diameter, then returns the velocity in your chosen pipe, its cross-sectional area, and the minimum diameter needed to keep velocity at or below your target. The relationships are exact physics, so use it to understand sizing and sanity-check designs, then confirm against the plumbing code that applies to your project.
Continuity equation and conversions
Flow (cubic ft/s) = gpm / 448.831
Area (sq ft) = pi * (diameter inches / 12 / 2) ^ 2
Velocity (ft/s) = flow (cubic ft/s) / area (sq ft)
Min diameter (inches) = sqrt(4 * flow / (pi * target velocity)) * 12
The continuity equation, flow equals velocity times area, is exact. The factor 448.831 converts gallons per minute to cubic feet per second, since one cubic foot is 7.48052 US gallons and a minute is 60 seconds.
Pipe sizing context
- One cubic foot holds 7.48052 US gallons by the international definition.
- Codes commonly cap supply velocity near 5 to 8 feet per second.
- Smaller pipe means higher velocity for the same flow, raising noise and wear.
- Always size to the plumbing code in your jurisdiction for real work.
- Inside diameter, not nominal size, drives the actual velocity.
Pipe sizing: frequently asked questions
How does pipe size relate to flow and velocity?
By the continuity equation, flow rate equals velocity times the pipe's cross-sectional area. For a round pipe, area is pi times the radius squared. So for a given flow rate, a smaller pipe forces a higher velocity, and a larger pipe allows a lower velocity. This is exact fluid mechanics, not an estimate.
What velocity is recommended for water pipes?
Plumbing codes and engineering guidance commonly suggest keeping water velocity in supply pipes below about 5 to 8 feet per second to limit noise and erosion. The exact limit depends on the material and code that applies, so this calculator lets you enter a target velocity and reports the diameter it requires.
How do I find the minimum pipe diameter for a flow?
Rearrange the continuity equation: the required area is flow rate divided by target velocity, and the diameter is the square root of four times that area divided by pi. The calculator does this and returns the minimum inside diameter to keep velocity at or below your target.
What units does this calculator use?
Enter the flow rate in gallons per minute and the target velocity in feet per second. The calculator converts internally and returns velocity in feet per second, area in square inches, and the minimum inside diameter in inches. Keep flow and velocity in the stated units for correct results.
Does this replace a plumbing code calculation?
No. It applies the exact continuity relationship, but real pipe sizing must follow the plumbing code in your jurisdiction, which accounts for fixture units, pressure loss, and pipe material. Use this tool to understand the physics and as a sanity check, then confirm against the applicable code.
Official sources
- U.S. National Institute of Standards and Technology: Units of volume, length and flow.
- U.S. Geological Survey: Water flow units and terms.
Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.