Skip to content
SnapCalculations

How to Calculate Volume (Formulas, Litres and Gallons)

By the SnapCalculations team · Updated 18 Nov 2026

The short answer

Volume is the space inside a 3D shape, in cubic units. Box: length × width × height. Cylinder: π × radius2 × height. Sphere: 4/3 × π × radius3. Cone and pyramid: ⅓ of the matching cylinder or box. 1,000 cm3 is 1 litre.

What volume means

Volume measures how much space a solid takes up, or how much a container holds. It's measured in cubic units: a cube 1 cm on each side has a volume of 1 cubic centimetre (cm3). For liquids we often use litres or gallons instead, and converting between them is straightforward once you have the volume in cubic units.

Volume formulas

  • Cube: V = side3.
  • Rectangular box (cuboid): V = length × width × height.
  • Cylinder: V = π × radius2 × height.
  • Sphere: V = 4/3 × π × radius3.
  • Cone: V = ⅓ × π × radius2 × height.
  • Pyramid (rectangular base): V = ⅓ × base length × base width × height.

A cone holds exactly one third of a cylinder with the same radius and height, and a pyramid holds one third of a box with the same base and height.

Step by step

  1. 1Identify the shape and the measurements its formula needs.
  2. 2Use the inside measurements if you want to know how much a container holds.
  3. 3Put everything in the same unit, and halve any diameter to get the radius.
  4. 4Use the formula. The answer is in cubic units: cm3, m3, in3 or ft3.
  5. 5Convert to litres or gallons if you need capacity (see below).

Worked examples

Example 1: a box

A storage box is 30 cm long, 20 cm wide and 15 cm high inside. How much does it hold?

  1. V = 30 × 20 × 15 = 9,000 cm3.
  2. 1,000 cm3 = 1 litre, so 9,000 cm3 = 9 litres.

Answer: 9,000 cm3, which is 9 litres (about 2.38 US gallons or 1.98 UK gallons)

Try it in the calculator

Example 2: a cylinder

A tin has a radius of 5 cm and a height of 20 cm.

  1. V = π × 52 × 20 = π × 25 × 20 = 500π.
  2. 500 × 3.14159… ≈ 1,570.80 cm3.
  3. In litres: 1,570.80 ÷ 1,000 ≈ 1.57.

Answer: About 1,570.80 cm3, or 1.57 litres

Try it in the calculator

Example 3: a sphere

A ball has a radius of 6 inches.

  1. V = 4/3 × π × 63 = 4/3 × π × 216 = 288π.
  2. 288 × 3.14159… ≈ 904.78 in3.

Answer: About 904.78 in3 (about 14.83 litres)

Try it in the calculator

Example 4: a cone

A cone has a radius of 3 cm and a height of 4 cm.

  1. V = ⅓ × π × 32 × 4 = ⅓ × π × 36 = 12π.
  2. 12 × 3.14159… ≈ 37.70 cm3.

Answer: About 37.70 cm3

Try it in the calculator

Example 5: filling a raised garden bed

A raised bed is 8 ft long, 4 ft wide and 1 ft deep. How much soil does it take?

  1. V = 8 × 4 × 1 = 32 ft3.
  2. Soil is often sold by the cubic yard. 1 yd = 3 ft, so 1 yd3 = 3 × 3 × 3 = 27 ft3.
  3. 32 ÷ 27 ≈ 1.19 cubic yards.

Answer: 32 ft3, about 1.19 cubic yards (about 906 litres)

Try it in the calculator

Turning volume into litres and gallons

  • 1 litre = 1,000 cm3, and 1 m3 = 1,000 litres.
  • 1 in3 = 16.387064 cm3 (an inch is exactly 2.54 cm, and 2.543 = 16.387064).
  • 1 ft3 ≈ 28.317 litres (a foot is exactly 30.48 cm).
  • 1 US gallon = 3.785411784 litres.
  • 1 UK (imperial) gallon = 4.54609 litres, so a UK gallon is about 20% bigger than a US gallon.

Common mistakes to avoid

  • Using the diameter instead of the radius. Halve it first; using the diameter makes a cylinder's volume four times too big.
  • Converting cubic units with the length factor. 1 m = 100 cm, but 1 m3 = 100 × 100 × 100 = 1,000,000 cm3.
  • Mixing US and UK gallons. Check which one your container or recipe uses.
  • Using outside measurements for capacity. Thick walls reduce how much a container holds.

Try your own numbers

Our volume calculator covers cubes, boxes, cylinders, spheres, cones and pyramids, shows the surface area too, and converts the volume to litres, US gallons and UK gallons.

Free, with every step shownOpen the Volume Calculator

Frequently asked questions

How do I calculate cubic feet?

Measure length, width and height in feet and multiply them. A space 8 ft × 4 ft × 1 ft is 32 ft3. If you measured in inches, divide the cubic inches by 1,728 (123).

How many litres are in a cubic metre?

1,000. A cubic metre is 100 cm × 100 cm × 100 cm = 1,000,000 cm3, and each litre is 1,000 cm3.

What's the difference between volume and capacity?

Volume is the space a shape takes up; capacity is how much a container can hold, usually given in litres or gallons. For a container, capacity is the volume of the space inside it.

Why is a cone one third of a cylinder?

It's a result from geometry (it can be proved with calculus): a cone, or any pyramid, has one third of the volume of the prism or cylinder with the same base and height.