Volume Calculator
The formulas, shape by shape
| Shape | Volume | Measurements needed |
|---|---|---|
| Cube | a³ | side a |
| Cuboid | l × w × h | length, width, height |
| Cylinder | π r² h | radius, height |
| Sphere | (4/3) π r³ | radius |
| Hemisphere | (2/3) π r³ | radius |
| Cone | (1/3) π r² h | radius, height |
| Pyramid | (1/3) × base side² × h | base side, height |
Two patterns organise the whole table. Prisms and cylinders — solids with the same cross-section all the way up — are just base area × height: a cuboid is a rectangle extruded, a cylinder is a circle extruded (π r² × h). Pointed solids — cones and pyramids — are exactly one third of the prism or cylinder on the same base and height, a fact you can feel by filling a cone with water and pouring it into the matching cylinder: it takes three conefuls. The sphere’s 4/3 π r³ sits between the two families; a hemisphere is simply half of it.
Worked examples
Cylinder, r = 5, h = 10: π × 5² × 10 = 250π ≈ 785.40. A drinks can is roughly this shape scaled down; in centimetres that is 785 ml, close to a real can’s proportions doubled.
Sphere, r = 5: (4/3) × π × 125 ≈ 523.60. Note it is exactly two thirds of the cylinder that wraps it (same radius, height = diameter = 10): 523.60 ÷ 785.40 = 0.667. Archimedes was so pleased with this 2:3 ratio that he had the sphere-in-cylinder carved on his tomb.
Cone, r = 5, h = 10: a third of the cylinder = 261.80. Cube, side 4: 4³ = 64. Cuboid 3 × 4 × 5: 60 — the simplest formula of the set, and the one behind every “how much fits in this box” question.
Pyramid, base side 6, height 4: (1/3) × 6² × 4 = 48 — a third of the 144 the same base and height would give as a straight box. Hemisphere, r = 5: (2/3) × π × 125 ≈ 261.80, half the sphere, and the shape to reach for when a tank or silo ends in a dome.
Units, and converting the answer
The calculator is unit-agnostic: feed it centimetres and the answer is cubic centimetres; inches give cubic inches; metres give cubic metres. The conversions worth memorising: 1 litre = 1,000 cm³ (so divide a cm³ answer by 1,000 for litres — the cylinder above is 0.785 litres if its units were centimetres); 1 m³ = 1,000 litres; 1 US gallon = 231 cubic inches; 1 cubic foot = 1,728 cubic inches. For real-world capacities, this site has dedicated tools that build on the same formulas: the Pool Volume Calculator for swimming pools in gallons and litres, the Concrete Calculator for slabs and footings in cubic yards, and the Board Foot Calculator for lumber. Where a container is not a standard solid, the practical method is to split it into standard pieces, work out each, and add — an L-shaped tank is two cuboids, and a silo is a cylinder plus a hemisphere.
Frequently asked questions
How do you calculate the volume of a cylinder?
Multiply the area of the circular base by the height: V = π r² h. With radius 5 and height 10 that is π × 25 × 10 = 785.40 cubic units. Use the radius, not the diameter — if you are given a diameter, halve it first (a 10-wide cylinder has r = 5). The same base-area-times-height idea covers every prism: triangles, hexagons and boxes all follow it, with their own base-area formula in place of π r².
Why is a cone exactly a third of a cylinder?
For a cone and cylinder sharing the same base and height, the ratio is exactly 3:1 — pour three conefuls of water into the cylinder and it fills. The calculus reason: the cone’s cross-sections shrink with the square of the remaining height, and integrating that square gives the ⅓. The same third appears for pyramids over any base shape, which is why this calculator’s pyramid formula also starts with ⅓ × base area × height.
What is the volume of a sphere with radius 5?
(4/3) × π × 5³ = (4/3) × π × 125 ≈ 523.60 cubic units. If you are given the diameter instead, halve it to get the radius first — a sphere of diameter 10 is the same sphere. A memorable check: the sphere is exactly two thirds of the smallest cylinder that contains it (radius 5, height 10, volume 785.40), so any sphere answer far from two thirds of its wrapping cylinder signals a slipped digit.
How do I convert cubic units to litres or gallons?
Litres belong with metric lengths: 1 litre = 1,000 cm³ = 0.001 m³, so a volume of 785.40 cm³ is 0.785 litres and 785.40 litres would need the dimensions in decimetres. For US gallons with inches: 1 gallon = 231 in³, so divide cubic inches by 231. Cubic feet to gallons: multiply by about 7.48. The calculator reports in the cubic unit matching your inputs, so convert the inputs to the length unit that pairs with your target capacity before you start.
What if my container is not a standard shape?
Split it into standard shapes, calculate each piece, and add or subtract. An L-shaped planter is two cuboids; a bottle is a cylinder plus a cone frustum-ish neck (approximate it as a smaller cylinder); a room with a vaulted ceiling is a cuboid plus a triangular prism. This decomposition is how professionals estimate everything from aquarium capacity to excavation volumes — the error comes from the approximating, not the arithmetic, and it is usually within a few percent.
Related tools
Worked examples verified in Node on 24 November 2026. Everything is calculated in your browser — nothing you type is sent anywhere.