How to calculate volume of water in a pipe, step by step
Five steps cover every case, from a 3 ft dishwasher tailpiece to a mile of transmission main. The only place people go wrong is step 1 — everything after it is arithmetic.
Step 1 — Find the true inner diameter
The nominal size on the label is a name, not a measurement. "4 inch" Sch 40 pipe has a 4.026 in bore; the same nominal size in Sch 80 has a 3.826 in bore; a 4 in cement-lined ductile-iron main may deliver closer to 4.0 in after lining. Read the bore off a dimension table (the calculator above fills it from NPS and Schedule), or measure it. Guessing Di = 4.000 in for a nominal 4 in is a 1.3% error — forgivable; guessing it for Sch 80 is a 9.4% error; guessing it for a 1 in line is a 10% error, because wall proportionally dominates small pipe.
Step 2 — Put both dimensions in one unit system
Cubic math only works when diameter and length share units. Working in inches makes gallons easy because a gallon is defined as 231 in³. Working in millimetres makes litres easy because a litre is a 1,000,000 mm³ cube. Mixed inputs — a 105 mm bore with a 20 ft length — are where factors of 25 and 1,000 sneak in. Convert first, multiply second.
Step 3 — Apply V = π/4 × Di² × L
Square the diameter, multiply by π/4 (0.7854) to get the bore area, then multiply by length. For a 6.065 in bore and 20 ft of run: 0.7854 × 36.78 = 28.89 in²; 28.89 × 240 in = 6,933.8 in³. Keep full precision through the multiplication and round only at the end — squaring a rounded diameter is how small errors become big ones.
Step 4 — Convert cubic units to gallons or litres
Imperial: divide in³ by 231 for US gallons, or by 1,728 for cubic feet (then × 7.48052 for gallons). Metric: divide mm³ by 1,000,000 for litres. The 20 ft example above is 6,933.8 ÷ 231 = 30.0 gal, or 6,933.8 ÷ 1,728 = 4.01 ft³. In litres that is 30.0 × 3.785 = 113.6 L.
Step 5 — Scale by runs, add fill time, then add water weight
Multiply by the number of identical runs if you are filling more than one line. Divide total gallons by your pump rate for fill time: 150.1 gal at 20 GPM is 7.5 minutes; at a 5 GPM garden hose it is 30 minutes — plan the workday around the second number. Finally, if the line will be full while it is hanging, add 8.34 lb for every gallon: the 20 ft stick of 6 in gains 250.3 lb of water on top of its 379 lb of steel, and the hangers were only ever sized for one of those.