How the volume calculator works
Pick a 3D shape and enter its measurements to get its volume, its surface area, and how much it holds in liters, US gallons and cubic feet. Nine shapes are covered, from boxes and cylinders to cones, capsules and pyramids.
Formula
Cube: s³. Box: l × w × h. Cylinder: πr²h. Cone: ⅓πr²h. Sphere: 4/3 πr³. Hemisphere: 2/3 πr³. Pyramid: ⅓ × l × w × h. Capsule: 4/3 πr³ + πr²a. Triangular prism: ½ × b × h × length.
- 1
Multiply the three sides
A box 50 cm long, 30 cm wide and 20 cm high holds 50 × 30 × 20 = 30,000 cm³.
- 2
Convert to liters
1 liter is 1,000 cm³, so 30,000 cm³ is 30 L.
- 3
Convert to US gallons
1 US gallon is 3.785411784 L, so 30 L is 7.92516 gal, or 1.05944 ft³.
- 4
Add the faces for the surface
2 × (50 × 30 + 50 × 20 + 30 × 20) = 2 × 3,100 = 6,200 cm² of outer surface.
Worked example
The calculator opens with these values
- Shape
- Box (rectangular prism)
- Length
- 50
- Width
- 30
- Height
- 20
- Unit of the lengths
- Centimeters (cm)
Volume of the box (rectangular prism)
30,000 cm³
Cubic units in liters and gallons
A cube 10 cm on each side holds exactly 1 liter, which is how the liter is defined. A cubic foot holds about 7.5 US gallons, a handy figure for tanks, freezers and moving boxes.
| Cube | Liters | US gallons |
|---|---|---|
| 1 cubic centimeter (1 cm³) | 0.001 L | 0.000264172 gal |
| 1 cubic inch (1 in³) | 0.0163871 L | 0.004329 gal |
| 1 cubic foot (1 ft³) | 28.3168 L | 7.48052 gal |
| 1 cubic yard (1 yd³) | 764.555 L | 201.974 gal |
| 1 cubic meter (1 m³) | 1,000 L | 264.172 gal |
How much a round pipe or tank holds
Volume grows with the square of the diameter, so a pipe twice as wide holds four times as much. For a length other than 1 m, multiply the figure by the length in meters.
| Inside diameter | Liters per meter | US gallons per meter |
|---|---|---|
| 2 cm | 0.314159 L | 0.0829921 gal |
| 5 cm | 1.9635 L | 0.518701 gal |
| 10 cm | 7.85398 L | 2.0748 gal |
| 15 cm | 17.6715 L | 4.66831 gal |
| 20 cm | 31.4159 L | 8.29921 gal |
| 30 cm | 70.6858 L | 18.6732 gal |
| 50 cm | 196.35 L | 51.8701 gal |
| 100 cm | 785.398 L | 207.48 gal |
Measuring for volume
The formula is only as good as the measurements that go into it.
- Use inside measurements for what a container holds. Outside measurements include the walls.
- For a tank that is not full, measure the depth of the liquid, not the height of the tank.
- Measure a pipe's inside diameter. The size printed on a pipe is often a nominal size, not the actual bore.
- For an odd-shaped object, sink it in a measuring jug of water: the rise in milliliters is its volume in cm³.
- Keep one unit for every length. Mixing centimeters and meters gives an answer off by a factor of 1,000,000.
Common questions
How many liters does a fish tank hold?
Measure the inside length, width and water depth in centimeters, choose Box, and read the liters. A 60 × 30 × 35 cm tank holds 63 L. Gravel and decorations take up some of that space.
Why is a cone exactly one third of a cylinder?
A cone with the same base and height as a cylinder holds one third as much, a result known since Archimedes. The same is true of a pyramid and the box around it.
Why is there no surface area for a triangular prism?
The volume needs only the triangle's base and height, but the surface also needs the two slanted sides of the triangle, which those measurements do not fix.
Are these US or UK gallons?
US gallons of 3.785 L. A UK (imperial) gallon is about 4.546 L, so the same volume is fewer UK gallons.
Related calculators
Volume Converter
Convert between liters, gallons, cups, and more
Area Calculator
Area and perimeter of rectangles, triangles, circles, polygons and more
Concrete Calculator
Calculate concrete volume needed for projects
Circle Calculator
Calculate area, circumference, and diameter of circles