What Is Volume?
Volume counts how many unit cubes fit inside a shape. Length measures one dimension, area measures two, and volume measures all three at once, which is why its unit is always a cube: cubic metres (m³), cubic centimetres (cm³), cubic feet (ft³) or cubic inches (in³). Every formula on this page is a shortcut for that counting. For box shapes the count is a plain multiplication of the three dimensions. For round shapes pi enters, because the base is a circle whose area is πr², and for pointed shapes such as cones and pyramids a division by three enters, because a point holds exactly one third of the prism or cylinder built on the same base.
This calculator covers the seven solids that cover most school, workshop and everyday capacity questions: the cube, the cuboid, the sphere, the cylinder, the cone, the square pyramid and the capsule. Pick a shape, enter its dimensions in one unit, and the volume comes back in cubic units, litres and US gallons together.
How to Use This Calculator
Step one: choose the shape that matches your solid. Step two: choose the input unit and make sure every measurement you enter is in that unit — mixing metres and centimetres is the most common source of a wrong volume. Step three: enter the dimensions. Round shapes ask for the radius, so halve a diameter first. The capsule asks for the cylinder length, which is only the straight middle part. Step four: read the three results. The headline figure is the volume in your cubic unit; below it are the same volume in litres and in US gallons, plus a breakdown row for each step. Use Copy, Download or Share Link in the workbench to keep or send the result.
Volume Formulas for Every Shape
| Shape | Formula | You enter |
|---|---|---|
| Cube | V = s³ | Side s |
| Cuboid | V = l × w × h | Length, width, height |
| Sphere | V = 4/3 × π × r³ | Radius r |
| Cylinder | V = π × r² × h | Radius r, height h |
| Cone | V = π × r² × h ÷ 3 | Radius r, height h |
| Square pyramid | V = s² × h ÷ 3 | Base side s, height h |
| Capsule | V = π × r² × L + 4/3 × π × r³ | Radius r, cylinder length L |
Two patterns organise the whole table. First, every prism-like solid — cube, cuboid and cylinder — is base area times height, with no division. Second, every pointed solid — cone and pyramid — is base area times height divided by three. The sphere stands alone: it has no base or height, only a radius, and its 4/3 factor comes from calculus, comparing the sphere with the cylinder that just contains it.
Worked Examples
Cube, side 3: V = 3³ = 27 cubic units. Cuboid, 2 × 3 × 4: V = 2 × 3 × 4 = 24 cubic units. Sphere, radius 3: V = 4/3 × π × 3³ = 4/3 × π × 27 = 36π = 113.0973 cubic units. Cylinder, radius 2 and height 5: V = π × 2² × 5 = 20π = 62.8319 cubic units. Cone, radius 2 and height 5: the same base and height as that cylinder, divided by three: 62.8319 ÷ 3 = 20.944 cubic units. Square pyramid, base side 3 and height 4: V = 3² × 4 ÷ 3 = 12 cubic units. Capsule, radius 2 and cylinder length 5: cylinder part π × 4 × 5 = 62.8319, sphere part 4/3 × π × 8 = 33.5103, total 96.3422 cubic units. Every one of these is a default or a type-in check in the workbench above, so you can reproduce each number yourself.
Converting Cubic Units to Litres and Gallons
Cubic units are exact but hard to picture; litres and gallons are how capacity is actually bought and poured. The conversions are fixed definitions, not approximations, except for the gallon figure which is a defined constant. One cubic metre is exactly 1000 litres: 1 m³ = 1000 L. One cubic centimetre is one millilitre: 1 cm³ = 0.001 L, so divide cubic centimetres by 1000 to get litres. One cubic foot is 28.316846592 litres and one cubic inch is 0.016387064 litres. One US gallon is 3.785411784 litres, so divide litres by 3.785411784 to get US gallons.
| From | To litres | Example |
|---|---|---|
| 1 m³ | 1000 L | 27 m³ = 27000 L |
| 1 cm³ | 0.001 L | 24000 cm³ = 24 L |
| 1 ft³ | 28.3168 L | 10 ft³ = 283.1685 L |
| 1 in³ | 0.0164 L | 100 in³ = 1.6387 L |
| 1 US gallon | 3.7854 L | 26.4172 US gal = 100 L |
The calculator applies the conversion that matches the unit you selected, so a result entered in centimetres is not silently treated as metres. Note that these are US gallons; an imperial gallon is larger, about 4.546 litres, and is not used on this page.
Capsule Volume Explained
A capsule is the shape of a typical medicine capsule and of many horizontal tanks: a straight cylinder capped by a hemisphere at each end. The trick is that the two hemispheres are not a new shape at all — put together they make exactly one sphere of the same radius. So the capsule formula is just the cylinder formula plus the sphere formula: V = πr²L + 4/3πr³. The one thing to get right is L: it is the length of the straight cylindrical section only. If you know the total end-to-end length instead, subtract one diameter (2r) from it first, because each hemisphere adds one radius to the total length.
Common Volume Mistakes
Mistake one: diameter where the radius belongs. Sphere and cylinder formulas use the radius; entering the diameter inflates a sphere result eightfold. Mistake two: forgetting the division by three for cones and pyramids, which triples the answer. Mistake three: mixing units — a length in metres with a width in centimetres produces a number that is wrong by a factor of 100 or 10000 with no warning sign. Mistake four: expecting volume to double when dimensions double. It grows eightfold, because all three dimensions are multiplied. Mistake five: using the total capsule length as the cylinder length, which counts the rounded ends twice. Mistake six: reading cubic centimetres as litres. They differ by a factor of 1000: 1 cm³ = 0.001 L.
What This Calculator Cannot Do
Honesty note: this calculator works out the volume of ideal geometric solids only. It assumes a perfect cube, a perfect sphere, straight sides, flat ends and exact dimensions. Real containers differ: walls have thickness, so the inside volume is smaller than the outside dimensions suggest; corners are rounded; tanks slope, dent and bulge; and a container is rarely filled exactly to the brim. For the true capacity of a real tank, jug or box, the reliable method is to fill it with a measured amount of water. This page also does not handle irregular shapes, shapes with holes or cut-outs, or solids it does not list, such as ellipsoids, tori or triangular prisms.
For cylinders in depth — including surface areas, lateral area and open-top and hollow cylinders — use the dedicated Cylinder Volume Calculator. For the circles behind the round shapes, the Circle Calculator covers radius, diameter, circumference and area, and the Density Calculator takes a volume like the ones found here and turns it into mass or density.
Sources & References
- Wolfram MathWorld — Volume (the standard volume formulas for the common solids)
- Wolfram MathWorld — Sphere (the 4/3πr³ volume formula and its derivation outline)
- Wolfram MathWorld — Capsule (a capsule as a cylinder joined to a sphere)
- OpenStax — Prealgebra 2e, Solve Geometry Applications: Volume and Surface Area (volume of rectangular solids, cylinders, cones and spheres)
- NIST — SI Units: Volume (the litre and its relation to the cubic metre)
Every figure in this guide was calculated with this page's own formulas — full-precision pi inside, rounding only for display to 4 decimal places where needed — so you can reproduce each one exactly in the workbench above.