Guide

Volume of solids: formulas, litres and gallons

Reviewed 23 November 2026 · 7 min read · Written and maintained by Toolnexo

Volume tells you how much space a solid takes up, and for a container it tells you how much it can hold. You need it for a water tank, a pool, a bag of soil or a concrete slab. This guide gives the formula for the common solids with worked examples, explains the useful one-third rule for cones and pyramids, and shows how to move between cubic units, litres and gallons. The figures come from the volume calculator on this site, which runs in your browser, so nothing you enter is uploaded.

Boxes and cubes

A box, or cuboid, has volume length × width × height. A cube is the case where all three are equal, so volume is side × side × side. A cube with sides of 3 has a volume of 27 and a surface area, the total of its six faces, of 6 × 9 = 54. A box that measures 4 × 3 × 2 has a volume of 24 and a surface area of 2 × (12 + 8 + 6) = 52.

Doubling the sides changes volume much more than area. A cube with a side of 6 has a volume of 216, which is eight times the volume of the cube with a side of 3, while its surface area of 216 is four times as large. That is why a container that looks only a little bigger can hold far more.

Cylinders

The volume of a cylinder is π × radius² × height, which is the area of the circular base times the height. A cylinder with a radius of 3 metres and a height of 10 metres has a volume of π × 9 × 10 = 282.7433 cubic metres. Its surface area, 2 × π × radius × (radius + height), is 245.0442 square metres.

A small round water tank makes a more everyday example. With a radius of 0.5 metres and a height of 1.2 metres, the volume is π × 0.25 × 1.2 = 0.9425 cubic metres, which is 942.5 litres or about 248.98 US gallons.

Cones and pyramids: the one-third rule

A cone holds exactly one third of the cylinder with the same base and height, and a pyramid holds one third of the box with the same base and height. For a cone with a base radius of 3 and a height of 9 the volume is π × 9 × 9 ÷ 3 = 84.823, while the cylinder with the same base and height is 254.469, and 254.469 ÷ 3 is 84.823. For a rectangular pyramid with a base of 6 by 4 and a height of 9 the volume is 6 × 4 × 9 ÷ 3 = 72.

In both cases the height is the straight distance from the base up to the tip, not the length of the slanted side. The slanted side matters only for the surface area, and the calculator works that out for you: the cone above has a surface area of 117.6856.

Spheres, hemispheres and capsules

  • Sphere: 4 ÷ 3 × π × radius³. A radius of 5 gives a volume of 523.5988 and a surface area of 314.1593.
  • Hemisphere, half a sphere: 2 ÷ 3 × π × radius³. A radius of 5 gives 261.7994, exactly half the sphere.
  • Capsule, a cylinder with a half sphere on each end: π × radius² × height + 4 ÷ 3 × π × radius³, where the height is the straight part only. With a radius of 2 and a straight part of 6 the volume is 75.3982 + 33.5103 = 108.9085.
  • Hollow cylinder, such as a pipe: π × (outer radius² − inner radius²) × length. With radii of 5 and 4 and a length of 100 the volume of the wall material is 2,827.4334.

Cubic units, litres and gallons

One cubic metre is 1,000 litres, and one litre is 1,000 millilitres, which is the same as 1,000 cubic centimetres. So a swimming pool that measures 8 by 4 metres and is 1.5 metres deep holds 8 × 4 × 1.5 = 48 cubic metres, which is 48,000 litres.

In the United States one gallon is 3.785 litres, and in the United Kingdom the gallon is larger at 4.546 litres, so always check which gallon a number refers to. One cubic foot is 28.3168 litres, which is 7.4805 US gallons. The cylinder from earlier, 282.7433 cubic metres, is 282,743 litres or about 74,693 US gallons.

As with area, cubic conversions use the cube of the length factor. One metre is 100 centimetres, so one cubic metre is 100 × 100 × 100 = 1,000,000 cubic centimetres.

Common mistakes

  • Radius against diameter. Using the diameter as the radius makes a cylinder's volume four times too large and a sphere's eight times too large, because the radius is squared or cubed.
  • Mixed units. A radius in centimetres and a height in metres give a result that is wrong by a large factor. Convert everything to one unit first.
  • Capacity against volume. The inside size of a container is what it holds. Walls, linings and the space left between the water and the rim all reduce the real capacity, so treat the figure as the most it could hold.

Using the calculator

  • Choose a solid and the unit of your measurements, then fill in the boxes. The formula is shown beside them.
  • Read the volume, the surface area where there is a simple formula, and the volume in litres and US gallons.
  • The table lists the volume in the other cubic units, litres, millilitres and UK gallons, and the copy button saves the result. The ellipsoid has a volume formula but no simple surface formula, and the calculator says so.
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 →