On this page
- Quick answer: how to calculate pipe volume
- What pipe volume measures
- Choose the correct diameter
- Step-by-step calculation
- Pipe-volume formulas by measurement system
- Volume conversions: liters, cubic meters, cubic feet and gallons
- Worked example 1: metric pipe capacity in liters
- Worked example 2: imperial pipe capacity in cubic feet and US gallons
- Volume per meter or per foot
- Calculating several pipes or different diameters
- Common mistakes and practical limitations
- Practical checklist before using the result
- Frequently asked questions
- Technical reference and calculation basis
Quick answer: how to calculate pipe volume
To calculate the internal capacity of a circular pipe, multiply its internal cross-sectional area by its length:
V = π × (d ÷ 2)² × L = πd²L ÷ 4
Here, V is internal volume, d is actual inside diameter, and L is pipe length. Use compatible units: meters with meters produce cubic meters; feet with feet produce cubic feet.
- Liters, using diameter in millimeters and length in meters: V = π × d² × L ÷ 4,000.
- US gallons, using diameter in inches and length in feet: V = π × d² × L ÷ 77.
For example, a pipe with a 50 mm inside diameter and a 10 m length holds approximately 19.635 liters when completely full. For a quick calculation, use the Calcavera Pipe Volume Calculator. The guide below explains which dimensions to enter and how to check the result.
What pipe volume measures
Internal pipe volume is the space available inside a pipe. For a full pipe, that space is also the volume of water or another liquid it contains. The basic calculation treats the internal passage as a cylinder with a constant circular cross-section.
This calculation is useful for estimating the water needed to fill a pipe run, the liquid inventory in a system, or the amount that could be drained from an isolated, fully filled section. Actual retained or drained quantities can differ because of trapped air, low points, fittings and connected equipment.
Capacity is not flow rate or pressure
| Quantity | What it describes | Example units |
|---|---|---|
| Volume or capacity | How much fluid the pipe can contain | Liters, cubic meters, cubic feet, US gallons |
| Flow rate | How much fluid passes a point per unit of time | Liters per second, cubic meters per hour, US gallons per minute |
| Pressure | Force per unit area within the system | Pascals, bar, pounds per square inch |
A capacity calculation does not establish a suitable pipe size, pump duty or pressure rating. Hydraulic sizing requires additional information, including flow demand, elevation changes, pipe characteristics, fittings and pressure losses.
Choose the correct diameter
Inside diameter
Inside diameter is the diameter of the open passage. It is the dimension required for fluid capacity. Use the manufacturer's dimensional data for the specific product or a reliable measurement of the actual bore.
Outside diameter
Outside diameter measures across the exterior of the pipe, including both walls. Using it in the cylinder formula calculates an external envelope, not the available internal space.
If outside diameter D and uniform wall thickness t are known, the geometric relationship is:
d = D − 2t
Keep all three dimensions in the same unit. For example, an outside diameter of 60 mm and a wall thickness of 5 mm give an inside diameter of 60 − 2 × 5 = 50 mm. This example is geometric, not a specification for a particular commercial pipe.
Nominal pipe size
Nominal size is a product size designation. It is not necessarily the measured inside or outside diameter. The relationship depends on the pipe system, material and wall thickness.
Do not enter a nominal size as though it were a verified inside diameter. A nominal 2-inch pipe does not automatically have an actual 2-inch bore. The imperial examples in this guide use stated, actual inside diameters.
Step-by-step calculation
- Identify the section. Divide the installation into sections with constant inside diameter.
- Find the actual inside diameter. Check product data or measure it where practical.
- Measure the section length. For curved runs, use length along the pipe path, not the straight-line distance between endpoints.
- Make the units compatible. Convert diameter and length into the same unit before applying the basic cylinder formula.
- Calculate volume. Use V = πd²L ÷ 4.
- Convert and total. Convert to the desired volume unit, then add other sections and any separately assessed component volumes.
Keep extra digits during intermediate calculations and round the final result to a precision justified by your measurements.
Pipe-volume formulas by measurement system
| Inside diameter d | Length L | Output | Formula |
|---|---|---|---|
| Meters | Meters | Cubic meters | V = πd²L ÷ 4 |
| Millimeters | Meters | Liters | V = πd²L ÷ 4,000 |
| Feet | Feet | Cubic feet | V = πd²L ÷ 4 |
| Inches | Feet | Cubic feet | V = πd²L ÷ 576 |
| Inches | Feet | US gallons | V = πd²L ÷ 77 |
The mixed-unit formulas already include their conversion factors. Do not convert the diameter again when using them. The US-gallon shortcut follows from 12 inches per foot and exactly 231 cubic inches per US gallon.
Volume conversions: liters, cubic meters, cubic feet and gallons
The conversions below use the international foot and the US liquid gallon. Exact factors are identified; other displayed values are rounded.
| Starting unit | Equivalent volume | Precision |
|---|---|---|
| 1 cubic meter | 1,000 liters | Exact |
| 1 liter | 0.001 cubic meters | Exact |
| 1 cubic foot | 0.028316846592 cubic meters | Exact |
| 1 cubic foot | 28.316846592 liters | Exact |
| 1 US liquid gallon | 3.785411784 liters | Exact |
| 1 US liquid gallon | 0.003785411784 cubic meters | Exact |
| 1 liter | Approximately 0.2641720524 US gallons | Rounded |
| 1 cubic foot | Approximately 7.480519481 US gallons | Rounded |
| 1 cubic meter | Approximately 35.31466672 cubic feet | Rounded |
| 1 cubic meter | Approximately 264.1720524 US gallons | Rounded |
| 1 Imperial gallon | 4.54609 liters | Exact |
US gallons and Imperial gallons are different units. Label the gallon system explicitly in estimates, spreadsheets and translated documents. For example, converting liters to US gallons means dividing by 3.785411784; converting liters to Imperial gallons means dividing by 4.54609.
A common source of error is treating a length conversion as a volume conversion. Because 1 meter equals 100 centimeters, 1 cubic meter equals 100³, or 1,000,000, cubic centimeters—not 100 cubic centimeters.
Worked example 1: metric pipe capacity in liters
A pipe has an actual inside diameter of 50 mm and a length of 10 m. Assume it has a constant circular bore and is completely full.
- Convert diameter to meters: d = 50 ÷ 1,000 = 0.05 m.
- Calculate radius: r = 0.05 ÷ 2 = 0.025 m.
- Calculate volume: V = π × 0.025² × 10 = approximately 0.019634954 m³.
- Convert to liters: 0.019634954 × 1,000 = approximately 19.634954 liters.
Result: approximately 19.635 liters, or 5.187 US gallons.
Check with the mixed-unit shortcut: π × 50² × 10 ÷ 4,000 gives the same result in liters.
Worked example 2: imperial pipe capacity in cubic feet and US gallons
A pipe has an actual inside diameter of 2 inches and a length of 40 feet. The 2-inch measurement is the bore, not a nominal size.
- Convert diameter to feet: d = 2 ÷ 12 = 1/6 ft.
- Calculate radius: r = 1/12 ft.
- Calculate volume: V = π × (1/12)² × 40 = approximately 0.872664626 ft³.
- Convert to US gallons: 0.872664626 × 7.480519481 = approximately 6.527985 US gallons.
Result: approximately 0.873 cubic feet, or 6.528 US gallons.
Check directly with the gallon formula: π × 2² × 40 ÷ 77 = approximately 6.527985 US gallons.
Volume per meter or per foot
For a fixed inside diameter, capacity is proportional to length. Calculate the volume of one meter or one foot, then multiply by the total length in that same unit.
Liters per meter
For inside diameter d in millimeters:
Liters per meter = πd² ÷ 4,000
| Actual inside diameter | Capacity per meter |
|---|---|
| 20 mm | 0.314159 liters |
| 25 mm | 0.490874 liters |
| 32 mm | 0.804248 liters |
| 50 mm | 1.963495 liters |
| 100 mm | 7.853982 liters |
US gallons per foot
For inside diameter d in inches:
US gallons per foot = πd² ÷ 77
| Actual inside diameter | Capacity per foot |
|---|---|
| 1 inch | 0.040800 US gallons |
| 2 inches | 0.163200 US gallons |
| 4 inches | 0.652798 US gallons |
These tables describe ideal circular bores at the stated actual diameters. They are not nominal pipe-size tables. Values are rounded; use the formula when accumulating many sections.
Calculating several pipes or different diameters
Calculate each constant-diameter section separately, then add its volume to the total:
Total volume = V₁ + V₂ + V₃ + …
For n identical pipes, total volume = n × volume of one pipe. Identical means the same inside diameter and length.
Worked example: two pipe sizes in one installation
| Section | Actual inside diameter | Total length | Calculated volume |
|---|---|---|---|
| A | 25 mm | 20 m | 9.817477 liters |
| B | 50 mm | 10 m | 19.634954 liters |
| Total | Two different bores | 30 m | 29.452431 liters |
Total straight-pipe capacity: approximately 29.452 liters. Add the internal volumes of relevant valves, fittings and connected equipment if estimating the whole system.
Do not average different diameters and apply that average to the combined length. Volume depends on diameter squared, so that shortcut generally gives the wrong answer.
Common mistakes and practical limitations
- Using radius as diameter, or diameter as radius. The formula uses d ÷ 2 as the radius. Using the full diameter as the radius makes the result four times too large.
- Using outside or nominal diameter. Verify the actual bore, especially when comparing products with different wall thicknesses.
- Mixing millimeters with meters in the basic formula. Convert first or use a shortcut explicitly designed for those units.
- Assuming diameter errors have only a small effect. A diameter entered 10% too high produces a volume 21% too high at the same length, because 1.1² = 1.21.
- Counting fittings twice or not at all. Define the boundaries of each measured section and account for component cavities consistently.
- Using hydraulic equivalent length as physical length. Equivalent lengths used for friction calculations are not measurements of internal storage volume.
- Assuming the pipe is completely full. Air pockets and partial filling reduce the amount of liquid actually present.
- Ignoring changes to the bore. Linings, deposits, corrosion and deformation can make a clean, circular-bore estimate less representative of an existing pipe.
- Rounding too early. Retain precision through the calculation, but do not present a rough field measurement as an exact capacity.
When the cylinder model is not enough
For a noncircular passage, use its actual internal cross-sectional area multiplied by length. For a changing cross-section, calculate suitable separate sections or use a model that accounts for the changing area.
A partially filled circular pipe requires the area occupied by liquid, not the full circle. A level pipe with constant liquid depth can be modeled using a circular segment; sloping runs or varying liquid levels need additional information.
For detailed system inventories, seek internal-volume data for components such as valves, strainers, pumps and vessels rather than assuming each one is an equivalent straight cylinder. Capacity alone is also not a complete basis for chemical dosing or operating procedures.
Practical checklist before using the result
- Is the entered diameter the actual inside diameter?
- Are the diameter and length units correctly matched?
- Does the calculation represent full capacity or actual liquid content?
- Have all pipe sizes and branches been included once?
- Are fittings and equipment included or explicitly excluded?
- Are gallons clearly labeled as US or Imperial?
- Does the reported precision match the quality of the measurements?
Frequently asked questions
What is the easiest way to calculate pipe capacity in liters?
Use the actual inside diameter in millimeters and the length in meters: liters = π × diameter² × length ÷ 4,000. For a 50 mm bore and a 10 m length, the result is approximately 19.635 liters.
How much water does a 1-inch pipe hold per foot?
If the actual inside diameter is exactly 1 inch, the capacity is approximately 0.04080 US gallons per foot. A nominal 1-inch product may have a different bore, so verify its dimensions before using that value.
Can I use outside diameter if I know wall thickness?
Yes, if the dimensions describe a circular pipe with uniform wall thickness. First calculate inside diameter as outside diameter minus twice the wall thickness, then use that inside diameter in the volume formula.
Does doubling the diameter double the capacity?
No. At the same length, doubling the inside diameter makes capacity four times as large. Doubling only the length doubles capacity.
Can I calculate fill time from pipe capacity?
A simple ideal estimate is fill time = required volume ÷ constant net filling flow rate, using compatible units. Actual filling time can differ when flow varies, air must escape or liquid leaves the system during filling.
Can this calculation be used for liquids other than water?
Yes. Geometric capacity does not depend on which liquid fills the space. Calculating mass requires the liquid's density at the relevant conditions, and pressure or temperature changes may matter for more precise engineering work.
Technical reference and calculation basis
Volume conversions are based on the NIST Guide to SI, Appendix B.9: Factors for Units Listed Alphabetically, including its entries for cubic feet and US and Imperial gallons. The exact conversion relationships above are distinguished from rounded decimal reciprocals.
Worked examples and capacity tables use the circular-cylinder formula with π retained through the calculation and results rounded for display. All examples assume the stated actual inside diameter, constant circular cross-section and full internal capacity unless noted otherwise.
Frequently asked questions
What is the formula for the volume of water in a pipe?
For a straight, circular pipe filled completely with water, use V = π × (inside diameter ÷ 2)² × length. Use compatible units for diameter and length, then convert the resulting cubic units into liters or gallons if needed.
Do I use inside diameter, outside diameter or nominal pipe size?
Use the actual inside diameter to calculate fluid capacity. Outside diameter includes the pipe wall, while nominal size is a size designation that does not necessarily equal the measured inside diameter. Check product dimensions for the specific pipe material and wall thickness.
How do I calculate pipe capacity in liters?
With inside diameter d in millimeters and length L in meters, volume in liters = π × d² × L ÷ 4,000. For example, a pipe with a 50 mm inside diameter and a 10 m length holds approximately 19.635 liters when completely full.
How do I calculate pipe capacity in US gallons?
With inside diameter d in inches and length L in feet, volume in US gallons = π × d² × L ÷ 77. A pipe with an actual 2-inch inside diameter and a length of 40 feet holds approximately 6.528 US gallons.
How much water does a 1-inch pipe hold per foot?
A pipe with an actual inside diameter of exactly 1 inch holds approximately 0.04080 US gallons per foot. This is not automatically the capacity of a nominal 1-inch pipe, whose actual inside diameter depends on the product.
How do I calculate the total volume of several pipes?
Calculate each section using its own inside diameter and length, then add the volumes in the same unit. For identical sections, calculate one section and multiply by the number of sections. Account for fittings, valves and equipment separately when their internal volumes matter.
Does pipe volume tell me the flow rate or pressure?
No. Pipe volume describes how much fluid a pipe can contain. Flow rate describes how much fluid passes a point per unit of time, and pressure is a different quantity. Hydraulic sizing also requires information such as flow demand, elevation, friction losses and fittings.
Does the cylinder formula work for a partially filled pipe?
It gives the full internal capacity, not the amount actually present in a partially filled pipe. For a level circular pipe with a known, constant liquid depth, calculate the liquid's circular-segment area and multiply by length. Sloping pipes or changing depths require a more detailed approach.