Guide

Volume formulas, with litres and gallons explained

Reviewed 29 November 2026 · 6 min read · Written and maintained by Toolnexo

Working out volume is easy once the shape has a name and every length is in the same unit. Most wrong answers come from the second part: a radius typed in centimetres next to a height in metres, or a result read as cubic metres when it was meant as litres. This guide lists the formulas for the common solids, shows the conversions that matter for tanks, pools and pipes, and explains the checks that catch a bad answer before it is used. Every number below can be reproduced in the Volume Calculator, which runs in your browser and stores nothing.

The formulas that cover most jobs

Two shapes are worth remembering as pairs. A cone is one third of the cylinder with the same base and height, and a pyramid is one third of the box with the same base and height. If a result for a cone is bigger than the matching cylinder, something was typed wrong.

  • Cube: side × side × side. A cube with a 2 m side holds 8 m³.
  • Box: length × width × height. A box 2 m by 1.5 m by 0.8 m holds 2.4 m³.
  • Cylinder: π × radius² × height. Radius 3 m and height 10 m gives 282.7433 m³.
  • Cone: π × radius² × height ÷ 3. The same radius and height as above gives 94.2478 m³, exactly a third of the cylinder.
  • Sphere: 4 ÷ 3 × π × radius³. A radius of 5 gives 523.5988 cubic units, and a hemisphere of the same radius is half of that.
  • Rectangular pyramid: base length × base width × height ÷ 3. A 6 by 6 base with a height of 9 gives 108 cubic units.
  • Pipe, or any hollow cylinder: π × (outer radius² − inner radius²) × length.

From cubic metres to litres and gallons

One cubic metre is 1,000 litres, because a litre is a cube 10 cm on each side, or 1,000 cubic centimetres. So the cylinder above, at 282.7433 m³, holds 282,743 litres, or about 74,693 US gallons.

Gallons need care. A US gallon is 3.785 litres and a UK gallon is 4.546 litres, so the same tank has a different number of gallons depending on which one is meant. A fish tank 100 cm long, 40 cm wide and 50 cm deep is 200,000 cm³, which is 200 litres, 52.8 US gallons or 44.0 UK gallons. One cubic foot is 28.32 litres, 7.48 US gallons or 6.23 UK gallons.

To move between the units, the Volume Converter handles the full list, and the Length Converter is useful before you start if your measurements are in mixed units.

The unit slip that changes the answer by 10,000

A water tank has a radius of 30 cm and a height of 1.2 m. Entered as 0.3 and 1.2, so both in metres, the volume is π × 0.09 × 1.2 = 0.3393 m³, or 339.3 litres. Entered as 30 and 1.2, which mixes centimetres and metres, the tool would report 3,392.9 m³: exactly 10,000 times too large, because 30 is 100 times the radius and the radius is squared.

Pick one length unit before typing anything, and convert every measurement to it first. The Volume Calculator asks for a single unit for exactly this reason. A quick sense check also helps: a tank you can stand next to does not hold a thousand cubic metres.

Pools, tanks and pipes

A rectangular pool 8 m long, 4 m wide and 1.5 m deep holds 48 m³, which is 48,000 litres or about 12,680 US gallons. If the pool is only filled to 1.3 m, use 1.3 as the depth, since volume follows the water, not the wall.

A pipe has two volumes, and the question decides which one matters. For a pipe with an outer radius of 0.05 m, an inner radius of 0.04 m and a length of 10 m, the material is π × (0.0025 − 0.0016) × 10 = 0.0283 m³, or 28.3 litres. The water it can carry is the inside only: π × 0.0016 × 10 = 0.0503 m³, or 50.3 litres. The pipe option of the calculator gives the material, and the cylinder option with the inner radius gives the contents.

A capsule is a cylinder with a half sphere on each end. With a radius of 2 and a straight part 6 long, the volume is π × 4 × 6 + 4 ÷ 3 × π × 8 = 108.9 cubic units. The height to enter is the straight part only, not the full length.

Quick checks before you rely on a number

  • Every length must be greater than zero and in the same unit.
  • Radius and diameter are easy to swap. A measurement taken straight across a circle is the diameter, so halve it first.
  • Volume says how much a hollow shape could hold when filled to the top. A tank that is only half full holds half of that.
  • Round at the end, not in the middle. Rounding the radius early changes the answer more than rounding the result.
  • For paint, flooring or tiles, the amount depends on area and not volume. The Area Calculator and the Paint Calculator cover those jobs.
Tools in this guide

Put it into practice

How this guide is maintained

This page is reviewed when the related tools change. It describes what the published tools actually do: the tools run in your browser tab, so your files stay on your device. If you find something inaccurate, email [email protected] and it will be corrected.

Keep reading

Other guides

All guides →