BCTheBuildingCode

How to calculate pipe volume (litres and gallons)

Pipe volume formula: V = π × r² × L, where r is the inside radius and L is the pipe length. For a 22 mm pipe 40 metres long: V = π × (0.011 m)² × 40 m = 0.0152 m³ = 15.2 litres. The calculator below does this instantly — enter any diameter and length in imperial or metric and it returns the volume in gallons and litres.

Open the pipe volume calculator → Switch between imperial (inches, feet, US gallons) and metric (millimetres, metres, litres) with the unit toggle. It also shows the volume in cubic feet and cubic metres.

1. The formula

A pipe is a cylinder, so its internal volume is the area of the circular cross-section multiplied by the length:

V = π × r² × L

where:
  r = inside radius  (= inside diameter ÷ 2)
  L = length of the pipe run
  π ≈ 3.14159265

You can also write it using the full diameter instead of the radius:

V = (π ÷ 4) × D² × L

The result of the formula is in cubic units — cubic feet if you used feet, cubic metres if you used metres. From there:

  • Cubic feet → US gallons: multiply by 7.4805 (exact: 1 ft³ = 1728 ÷ 231 gal)
  • Cubic metres → litres: multiply by 1,000 (exact)
  • US gallons → litres: multiply by 3.7854 (exact: 1 US gal = 3.785411784 L)

2. Inside diameter vs nominal diameter

The formula uses the inside diameter, not the outside diameter or the nominal (label) size. Nominal pipe sizes are historical labels that do not directly equal either inside or outside dimensions — they exist so fittings line up on site.

For water-volume calculations the difference between nominal and actual inside diameter is usually small (a few percent), so the nominal size is a reasonable starting point. For precision work — commissioning a large system, calculating chemical doses for a boiler loop, or checking water hammer — use the actual inside diameter from the pipe manufacturer's data sheet. Wall thickness varies by schedule (Sch 40, Sch 80) and material (copper type L vs type M, PVC, HDPE).

In practice: enter the diameter you know (the label on the pipe) and treat the result as an estimate accurate to within a few percent. The tables below are computed on the nominal diameter, which is also what the calculator defaults to.

3. Worked examples

Example A — 22 mm pipe, 40 m run (metric)

A typical 22 mm domestic supply pipe, 40 metres long:

r = 22 mm ÷ 2 = 11 mm = 0.011 m
V = π × (0.011)² × 40
V = π × 0.000121 × 40
V = π × 0.00484
V = 0.01521 m³
V = 15.2 litres

So 15.2 litres of water sit in that pipe run — useful for estimating how long to flush the system before taking a water sample.

Example B — 15 mm pipe, 12 m run (metric)

A short branch in 15 mm copper, 12 metres from the manifold to a bathroom:

r = 15 mm ÷ 2 = 7.5 mm = 0.0075 m
V = π × (0.0075)² × 12
V = π × 0.00005625 × 12
V = 0.002121 m³
V = 2.12 litres

About 2.1 litres — the volume you would drain before cutting into that run.

4. Quick-reference table

Volumes are computed on the nominal diameter as entered. Actual inside capacity is slightly less (by wall thickness), so treat these as close estimates.

Metric sizes — litres per metre and per 10 m

Nominal diameterLitres per metreLitres per 10 m
15 mm0.1771.77
22 mm0.3803.80
28 mm0.6166.16
42 mm1.38513.9
54 mm2.29022.9
76 mm4.53645.4
108 mm9.16191.6

Formula check (28 mm): r = 0.014 m → V/m = π × (0.014)² = 0.000616 m³/m = 0.616 L/m ✓

The pipe volume calculator handles any diameter and length combination and shows all units at once — gallons, litres, cubic feet, and cubic metres.

5. Why pipe volume matters

Draining a pipe run before cutting

Before cutting into any pressurised pipe, a plumber isolates it and drains the water out. Knowing the volume tells you how big a bucket to have ready, whether you need a wet/dry vacuum, and roughly how long draining will take. A 100-foot run of 1-inch pipe holds over 4 gallons — more than one standard bucket.

Water hammer and surge analysis

Water hammer (the bang when a valve closes fast) depends partly on the volume of water in the pipe system. Larger systems have more momentum, which is why long runs and large diameters need surge arrestors or slow-closing valves. Calculating the system volume is the first step in a surge analysis.

Chemical dosing and water treatment

Boiler and hydronic systems require inhibitors or biocides dosed by system volume. If the total system volume is 60 litres, you add inhibitor for 60 litres, not for the boiler vessel alone. An undersized dose leaves the pipework corrosion-prone; an oversized dose is wasteful and can cause foaming. Pipe volume is usually the majority of a heating system's total water volume.

Flushing and water sampling

Lead and Legionella testing protocols often require flushing a specific number of system volumes before drawing a sample — typically one to three full volumes. For a house with 100 feet of mixed ¾-inch and 1-inch pipe (roughly 6–8 gallons of supply-line volume), a three-volume flush means running at least 18–24 gallons before sampling. Knowing the volume turns a vague “flush the taps” instruction into a measurable step.

Commissioning new systems

When filling a new plumbing or hydronic system for the first time, the total volume tells you how long the fill will take at a given flow rate, how much air you need to bleed, and roughly how much water the expansion vessel or pressure tank needs to accommodate. It is also used in pressure testing: a 100-litre system pressurised to 6 bar and held for 30 minutes is a standard commissioning check for sealed heating circuits.

6. Related plumbing calculations

Pipe volume is one calculation in a broader plumbing design workflow. These calculators handle the steps before and after:

  • GPM / flow rate calculator — measures how fast water is moving through the system; multiply by time to get volume used
  • Pipe water velocity — checks if the flow rate gives a velocity within design limits (typically 2–8 ft/s for cold water)
  • Pipe friction loss — how much pressure the pipe run consumes, using the Hazen-Williams equation
  • Expansion tank sizing — uses the system water volume to size the thermal expansion tank for a closed hydronic loop

Common questions

How many gallons of water does 100 feet of pipe hold?
It depends on the diameter. Using the nominal diameter as the inside measurement: 1/2-inch pipe holds about 1.02 gallons per 100 feet; 3/4-inch holds 2.29 gallons; 1-inch holds 4.08 gallons; 2-inch holds 16.3 gallons. Actual capacity is slightly different because nominal and inside diameters differ by wall thickness.
How do you calculate the volume of a pipe?
Use V = π × r² × L, where r is the inside radius (half the inside diameter) and L is the pipe length. Work in feet for cubic feet, then multiply by 7.48 to convert to US gallons — or work in metres for cubic metres, then multiply by 1,000 for litres.
How much water is in a typical house plumbing system?
A small house with 3/4-inch and 1/2-inch supply lines totalling around 150 feet of pipe holds roughly 3–5 gallons of water in the supply system. Larger homes with 1-inch mains can easily hold 10–20 gallons, and a heated system with a boiler loop holds significantly more.
What is the volume of a 4-inch pipe per foot?
Using 4 inches as the diameter: V = π × (2/12)² × 1 = 0.08727 ft³/ft, which is 0.653 gallons (about 2.47 litres) per foot of pipe. A 10-foot run of 4-inch pipe holds roughly 6.5 gallons.

Reference & education only. Not professional, engineering, or code-compliance advice. Estimates are based on published model codes; local amendments and your Authority Having Jurisdiction (AHJ) govern. Always verify against the current adopted code and a licensed professional before doing work.

Last reviewed 2026-08.

More guides

Keep reading

View all 62 guides →

More free tools

Other tools you might need

View all 56 free tools →All Plumbing tools & guides →