How to use the volume calculator
- Choose the shape of the solid.
- Choose the length unit you measured in.
- Enter the measurements the shape asks for, all in that unit. Radius means half the width across a circle; the tube asks for diameters because pipes are usually sold that way.
- Read the volume in cubic units, the working, and the same volume in liters, gallons and other units.
Volume formulas
a is the edge of a cube; l, w and h are length, width and height; r is a radius. A cone and a pyramid each hold exactly one third of the prism or cylinder with the same base and height. A capsule is a cylinder of length L with a half-sphere on each end, so its total length is L + 2r. For a tube, D is the outer diameter, d the inner diameter and L the length; the result is the volume of the wall material, not the space inside.
Worked example
The calculator starts with a box 4 ft long, 3 ft wide and 2 ft high, roughly a large storage chest:
- V = 4 × 3 × 2 = 24 ft³
- One cubic foot is 28.316846592 liters, so 24 ft³ = 24 × 28.316846592 = 679.604 L
- One US gallon is 3.785411784 L, so 679.604 ÷ 3.785411784 = 179.532 US gallons
- In imperial gallons (4.54609 L each): 679.604 ÷ 4.54609 = 149.492
A sphere with a 3 cm radius holds 4⁄3 × π × 27 = 36π = 113.097 cm³, about 113 mL.
Capacity of a tank or pipe
To find how much liquid a container holds, measure the inside of it, not the outside. A plastic tank with walls 1 cm thick that measures 60 cm across on the outside is only 58 cm across inside, and that difference grows with every dimension.
For the water held inside a pipe, use the cylinder with the inner radius. For the amount of material in the pipe wall, use the tube shape. A pipe 100 cm long with a 10 cm outer and 8 cm inner diameter has a wall volume of π ÷ 4 × (100 − 64) × 100 = 2,827.43 cm³, while the space inside holds π × 4² × 100 = 5,026.55 cm³, a little over 5 liters.
| Container shape | Liters per unit of height |
|---|---|
| Cylinder, 1 m across | 785.4 L per meter |
| Cylinder, 1 ft across | 5.875 US gallons per foot |
| Box, 1 m × 1 m | 1,000 L per meter |
| Box, 1 ft × 1 ft | 7.4805 US gallons per foot |
For concrete slabs, footings and columns, the concrete calculator adds bag counts and waste.
Frequently asked questions
How do I convert cubic feet to gallons?
Multiply by 7.48052 for US gallons, or by 6.22884 for imperial gallons. The calculator does this for you and also shows liters: 1 ft³ is 28.3168 L.
How many cubic centimeters are in a liter?
There are exactly 1,000. One cubic centimeter is the same as one milliliter, and a cube 10 cm on each side holds one liter. A cubic meter holds 1,000 liters.
Why do I enter a radius and not a diameter?
The formulas for cylinders, cones and spheres use the radius. If you measured across the widest point, halve it first: a ball 30 cm across has a radius of 15 cm. Only the tube asks for diameters.
Does the shape of the pyramid's base matter?
The formula V = ⅓ × base area × height works for any pyramid. This calculator uses a rectangular base, so the base area is length × width. For a square base, enter the same number twice.
Related calculators
- Surface Area Calculator — Lateral and total surface area of a cube, box, cylinder, cone, sphere, pyramid, capsule or tube.
- Area Calculator — Area of a square, rectangle, triangle, circle, ellipse, trapezoid, parallelogram, sector or regular polygon.
- Concrete Calculator — Concrete for slabs, footings, round columns, circular pads and steps, in cubic yards or m³, plus bags needed.
Results are calculated in your browser. Double-check anything important before you rely on it. See our disclaimer.