Calculate volume and surface area for common 3D shapes, then review the result in a conversion sheet covering cubic metres, cubic feet, litres, and gallons.
Last updated
Solid geometry
Calculate volume for common 3D shapes and convert it to litres or gallons
Use one general volume calculator for boxes, spheres, cylinders, cones, hemispheres,
pyramids, and right triangular prisms, then compare the result as cubic units, litres,
and both US and UK gallons.
Shape
Rectangular prism
Use this for boxes, bins, rooms, and any straight-sided rectangular container.
For irregular pools, barrels, tanks, and jobsite pours, switch to the specialist
calculator once the general geometry stops matching the real object.
Result
384 ft³
Volume of the rectangular prism using V = L × W × H, with capacity
conversions added for planning, packaging, and fill estimates.
Volume calculator: box, sphere, cylinder, cone, pyramid, and prism formulas
A volume calculator helps when you need one fast answer for the space inside a 3D shape and then need that answer in practical capacity units such as litres or gallons. This page covers the common solid-shape formulas used for boxes, cubes, spheres, hemispheres, cylinders, cones, square pyramids, and right triangular prisms, then shows the result as a volume-and-capacity sheet in cubic metres, cubic feet, litres, and both US and UK gallons.
Volume formulas by shape
The rectangular prism — any box-shaped solid with six rectangular faces — is the simplest case because volume is just length × width × height. A cube is the special case where every edge is equal, so the formula simplifies to side length cubed.
Curved shapes bring in π. A sphere depends only on radius, while a hemisphere is exactly half of that sphere volume. Cylinders and cones both start from a circular base; the cone has one-third of the volume of the matching cylinder because the cross-section tapers to a point instead of staying constant through the whole height.
General-purpose volume pages also need at least a few non-round solids. A square pyramid uses a square base and a vertical height, while a right triangular prism starts from a triangular cross-section and extends it through a fixed prism length. Those shapes are common in packaging, roofs, hoppers, wedges, and classroom geometry problems.
Surface area is related but different. It measures how much exterior material is exposed, not how much space is enclosed. That distinction matters because a shipping carton, tank shell, insulated container, or coated part often needs both values at the same time.
Rectangular prism: V = L x W x H
Multiply length, width, and height to get the volume of any box-shaped solid.
Cube: V = s³
For a cube, volume is the side length raised to the power of three.
Sphere: V = (4/3) x π x r³
Volume of a sphere depends only on its radius, multiplied by 4π/3.
Cylinder: V = π x r² x h
Multiply π by the square of the base radius and by the height to get the cylinder volume.
Cone: V = (1/3) x π x r² x h
A cone has one-third the volume of a cylinder with the same base and height.
Hemisphere: V = (2/3) x π x r³
A hemisphere encloses exactly half of the corresponding sphere volume.
Square pyramid: V = (1/3) x b² x h
Multiply the square-base area by height, then divide by three.
Right triangular prism: V = (1/2) x b x h x L
Find the triangular end area first, then multiply by the prism length.
How to move from cubic units to litres and gallons
The geometric formula gives a volume in cubic units that match the original measurements. If you enter metres, the result is in cubic metres; if you enter feet, the result is in cubic feet. A good general volume calculator then adds exact bridges into capacity units so the answer can be compared with fill quantities, packaging specs, and product labels.
The clean metric anchors are exact: 1 cubic centimetre = 1 millilitre, 1 litre = 1,000 cubic centimetres, and 1 cubic metre = 1,000 litres. US and UK gallons then connect back through litres, but they should never be treated as interchangeable because a US gallon and an imperial gallon are different units.
This is why the same cylinder might be described as 0.5 m³ on an engineering drawing, 500 L on a tank label, 132.09 US gallons on a US supplier sheet, or 109.98 UK gallons in an imperial-capacity workflow. The shape has not changed; only the reporting convention has.
1 cm³ = 1 mL
Exact metric bridge between geometric volume and liquid capacity.
1 m³ = 1,000 L
Core metric capacity relationship used for large containers and spaces.
1 US gal = 3.785411784 L; 1 imperial gal = 4.54609 L
Exact gallon relationships used to keep US and UK capacity labels separate.
Worked examples for box and cylinder volume
Suppose a storage box measures 12 ft × 8 ft × 4 ft. The rectangular-prism formula gives 384 ft³. That same space is about 10.87 m³, 10,873.7 L, 2,872.6 US gallons, or 2,391.3 UK gallons. Seeing the same answer in both cubic and liquid-style units is useful when a shape is structural but the planning question is really about fill capacity.
For a cylinder with radius 3 ft and height 8 ft, the formula V = πr²h gives about 226.19 ft³. That is roughly 6.41 m³ or 6,405.4 litres. A user searching for a cylinder volume calculator usually cares about that second step as much as the raw geometry, because tanks, drums, and vertical containers are typically discussed in litres or gallons rather than in cubic feet alone.
The same reasoning applies to the other supported shapes. A cone or square pyramid may appear in a hopper, funnel, roof form, or mould, while a hemisphere may describe a dome or bowl. The volume formula tells you the enclosed space; the converted units make the answer easier to use outside a maths exercise.
When this general calculator is enough and when to use a specialist tool
For packaging and shipping, both volume and surface area matter. Volume determines how much product fits inside a box. Surface area determines how much exterior material is needed to make, line, coat, or insulate that shape. A sphere minimises surface area for a given volume, which is why it often appears in theoretical efficiency comparisons even though most real containers are easier to manufacture in other shapes.
This page is strongest when the object really is one of the supported solids and the dimensions are clean. It is less appropriate once the real object adds taper, wall thickness, irregular profiles, rounded corners, or mixed-depth geometry. A pool, barrel, pipe, trench, or concrete footing usually benefits from its own specialist calculator because those workflows add assumptions that a simple general-shape page should not fake.
Use inside measurements whenever the question is capacity. Outside measurements describe the overall size of the object, but usable volume depends on the interior dimensions. For material ordering, keep a separate allowance for waste, overfill, spillage, or unusable headspace instead of treating the ideal geometric volume as the purchase quantity.
Further reading
NIST — SI Units: Volume — NIST reference for exact metric volume relationships linking cubic units, litres, and millilitres.
Math Is Fun — Volume — Plain-language reference covering what volume means and how it connects to cubic units and litres.
How do I calculate the volume of a rectangular box?
Multiply length × width × height. All dimensions must be in the same units. For example, a box 2 m × 1.5 m × 1 m has a volume of 3 cubic metres. If the measurements are in centimetres, the result is in cubic centimetres; if the measurements are in feet, the result is in cubic feet. After that, convert the cubic result into litres or gallons only if you need a capacity-friendly label.
What is the formula for the volume of a cylinder?
Volume = π × radius² × height. Use the inner radius if you are calculating the capacity of a container rather than the outer physical size. For example, a cylinder with radius 0.5 m and height 2 m has a volume of π × 0.25 × 2 ≈ 1.571 cubic metres, which is about 1,571 litres.
How do I convert between cubic units and litres?
1 litre equals 1 cubic decimetre, or 0.001 cubic metres. To convert cubic metres to litres, multiply by 1,000. To convert cubic centimetres to litres, divide by 1,000 because 1 cm³ = 1 mL and 1,000 mL = 1 L. To convert litres to US or UK gallons, divide by the correct gallon size rather than assuming both gallon systems match.
When should I use a specialist tank, barrel, pool, or concrete calculator instead?
Use a specialist calculator when the real object is not one clean solid. Pools may have variable depth, barrels bulge at the middle, pipes need inside diameter, and concrete jobs often need cubic-yard ordering plus waste allowance. A general volume calculator is best for standard geometry; a specialist tool is better once the workflow depends on real-world construction details.
Guides
Featured in articles
Step-by-step guides that use this calculator to solve real problems.