Xerobit

Volume of a Pipe Calculator

Enter the inside diameter and length of a pipe to find its internal volume. This volume of a pipe calculator returns the capacity in liters, US gallons, UK gallons, cubic inches and cubic feet. All math runs in your browser and nothing is uploaded anywhere.

Result

  • Liters
    24.7111
  • US gallons
    6.528
  • UK gallons
    5.4357
  • Cubic inches
    1,507.9645
  • Cubic feet
    0.8727

How to use the pipe volume calculator

  1. Enter the inside diameter of the pipe and select its unit (mm, cm, inches or feet).
  2. Enter the length of the pipe and select its unit (mm, cm, inches, feet or meters).
  3. The tool instantly computes the internal volume using the cylinder formula.
  4. Read the result in liters, US gallons, UK gallons, cubic inches and cubic feet.

How the pipe volume formula works

A pipe is a hollow cylinder, so its internal volume equals the cross-sectional area multiplied by the length. The formula is:

V = pi x (d / 2)^2 x L

where d is the inside diameter and L is the length. Both measurements must be converted to the same unit before multiplying. For example, a pipe with a 4-inch inside diameter and a length of 10 feet (120 inches) has a radius of 2 inches. The calculation is pi x 2^2 x 120 = 1,507.96 cubic inches. Dividing by 231 (the number of cubic inches in one US gallon) gives about 6.528 US gallons.

Common pipe sizes and volumes per foot

The table below shows the internal volume for standard nominal pipe diameters over a one-foot length. These assume the inside diameter matches the nominal size, which is an approximation for scheduling purposes.

Nominal diameterCubic inches per footUS gallons per foot
1/2 in2.3560.0102
3/4 in5.3010.0229
1 in9.4250.0408
2 in37.6990.1632
4 in150.7960.6528
6 in339.2921.4688

To find the total pipe volume for any run, multiply the per-foot value by the actual length in feet.

Inside diameter versus outside diameter

This volume of a pipe calculator requires the inside diameter (ID), not the outside diameter (OD). Pipes are commonly sold by nominal size and schedule (wall thickness). A 2-inch Schedule 40 steel pipe has an OD of 2.375 inches but an ID of about 2.067 inches. Using the OD instead of the ID will overestimate the capacity because it includes the wall material. Always check the manufacturer specifications or measure the bore directly when precision matters.

Practical uses for pipe volume

Knowing the internal volume of a pipe is essential in plumbing, irrigation and industrial fluid transport. Common applications include:

  • Sizing pumps and determining how much fluid a piping run holds at rest.
  • Calculating chemical dosing for water treatment systems where the dose depends on the total water volume in the pipes.
  • Estimating drainage time for compressed air lines or hydraulic circuits.
  • Determining antifreeze quantities needed to fill heating loops.

For larger enclosed vessels rather than straight pipe runs, you may need a volume calculator for tank shapes, or a fish tank volume calculator for rectangular aquariums.

Unit conversions used in the calculation

All inputs are first converted to inches internally, then the resulting cubic inches are translated into the output units. The exact conversion factors are:

  • 1 inch = 25.4 mm, so 1 mm = 1/25.4 inches.
  • 1 inch = 2.54 cm, so 1 cm = 1/2.54 inches.
  • 1 foot = 12 inches.
  • 1 meter = 100 cm = 100/2.54 inches.
  • 1 US gallon = 231 cubic inches exactly.
  • 1 UK (imperial) gallon = 277.4194327... cubic inches (derived from 4.54609 liters).
  • 1 liter = 1,000 cubic centimeters = 61.0237441 cubic inches.
  • 1 cubic foot = 1,728 cubic inches.

Because these factors are exact or defined by international agreement, the only rounding occurs in the final display.

Worked examples

Each result below was produced by the same code the tool runs, so you can check your own numbers against them.

ExampleInputResult
Half-inch copper tube, 20 feetInside diameter: 0.5; Diameter unit: in; Length: 20; Length unit: ftLiters: 0.7722; US gallons: 0.204; UK gallons: 0.1699; Cubic inches: 47.1239; Cubic feet: 0.0273
4-inch PVC drain, 10 feetInside diameter: 4; Diameter unit: in; Length: 10; Length unit: ftLiters: 24.7111; US gallons: 6.528; UK gallons: 5.4357; Cubic inches: 1,507.9645; Cubic feet: 0.8727
DN50 steel pipe, 6 metersInside diameter: 50; Diameter unit: mm; Length: 6; Length unit: mLiters: 11.781; US gallons: 3.1122; UK gallons: 2.5915; Cubic inches: 718.919; Cubic feet: 0.416
12-inch water main, 100 feetInside diameter: 12; Diameter unit: in; Length: 100; Length unit: ftLiters: 2,223.9999; US gallons: 587.5186; UK gallons: 489.2116; Cubic inches: 135,716.8026; Cubic feet: 78.5398

FAQ

Does this calculate the volume of the pipe material itself?

No. This volume of a pipe calculator finds the internal capacity, meaning the space available for fluid inside the pipe. To find the volume of the pipe wall material, you would also need the outside diameter.

Should I use the inside diameter or the outside diameter?

Always use the inside diameter (ID). The outside diameter includes the wall thickness, which does not hold fluid. Check the pipe schedule chart to convert nominal size to actual ID.

Can I mix units, like millimeters for diameter and meters for length?

Yes. Select the appropriate unit for each field independently. The calculator converts both measurements to a common base unit before applying the formula.

What is the difference between US gallons and UK gallons?

A US liquid gallon is exactly 231 cubic inches (about 3.785 liters). A UK imperial gallon is about 277.42 cubic inches (exactly 4.54609 liters). The imperial gallon is roughly 20 percent larger.

Is the formula accurate for very long pipelines?

The geometric formula is exact for a perfect cylinder regardless of length. In real-world pipelines spanning kilometers, thermal expansion, pressure deformation and elevation changes can slightly alter the effective internal volume.

How do I calculate the weight of the water inside the pipe?

Multiply the volume in liters by the density of water (approximately 1 kg per liter at room temperature). For US gallons, multiply by about 8.34 pounds per gallon.