The Volume Calculator computes the volume of five standard solids (a cube, a sphere, a cylinder, a cone, and a rectangular prism) from the dimensions each shape needs. Choose the shape, enter its measurements in one consistent unit, and the result is returned in cubic units of that same unit: cubic centimetres from centimetres, cubic feet from feet, and so on.
How It Works
- Shape selection: You pick one of the five solids. Each shape asks only for the dimensions its formula uses: a side for the cube, a radius for the sphere, radius and height for the cylinder and cone, and length, width, and height for the rectangular prism.
- Validation: Every required dimension must be a positive number. Missing, zero, or negative values return an error naming the field, because a physical solid cannot have a zero or negative edge, radius, or height.
- Formula application: The matching formula below is applied with the mathematical constant pi carried at full precision, so results are accurate to the rounding shown.
- Result: The volume is reported as a single number in cubic units. Converting to litres, gallons, or another unit system is a separate step you do with the converted figure.
Formula
Cube, with side s:
Sphere, with radius r:
Cylinder, with radius r and height h:
Cone, with radius r and height h:
Rectangular prism, with length l, width w, and height h:
The cone and cylinder formulas show a useful relationship: a cone holds exactly one third of the volume of a cylinder with the same base radius and height, a fact you can check in the worked example below.
Input Parameters
| Parameter | Unit | Typical range | Notes | |---|---|---|---| | Shape | Choice | Cube, sphere, cylinder, cone, rectangular prism | Decides which dimensions are required | | Side | Length unit | Above 0 | Cube only | | Radius | Length unit | Above 0 | Sphere, cylinder, and cone | | Height | Length unit | Above 0 | Cylinder, cone, and rectangular prism | | Length | Length unit | Above 0 | Rectangular prism only | | Width | Length unit | Above 0 | Rectangular prism only |
All dimensions for one calculation must use the same unit. Mixing metres and centimetres without converting first is the most common source of wrong answers, because the error is cubed in the result.
Worked Example
For a cylinder, such as a storage tank, with radius 3 units and height 5 units:
- Square the radius:
3 x 3 = 9. - Multiply by the height:
9 x 5 = 45. - Multiply by pi:
45 x pi = 141.37cubic units, to two decimal places.
A cone with the same radius and height gives 141.37 / 3 = 47.12 cubic units, confirming the one-third relationship. For the other shapes: a cube of side 3 gives 3 x 3 x 3 = 27 cubic units, a sphere of radius 3 gives 113.10 cubic units, and a rectangular prism of 2 by 3 by 4 gives 24 cubic units.
Interpreting the Results
Volume grows fast because dimensions are cubed or squared. Doubling the radius of a sphere multiplies its volume by eight, and doubling every edge of a box also multiplies its volume by eight, which is why small measurement errors in the radius matter more than the same error in a height. Keep significant figures sensible: if your inputs are measured to the nearest centimetre, reporting a volume to six decimal places adds no real accuracy. If you need capacity in litres, remember that one litre is exactly 1,000 cubic centimetres, and one cubic metre is 1,000 litres.
Choosing the Right Tool
Use the Area Calculator when you need the flat surface measure of a shape rather than the space it occupies. Use the Circumference Calculator when the question is the distance around a circle, often the step before finding a radius from a measured wrap-around length. Use the Percentage Calculator when you need to work out what share of a tank or container a given volume represents. Stay on this page whenever the question is how much three-dimensional space a standard solid takes up or holds.
Questions
What is the difference between radius and diameter?
The radius is the distance from the centre to the edge; the diameter is twice that, all the way across. These formulas use the radius, so if you measured across the whole circle, halve the number before entering it.
Can I mix units, like feet for height and inches for radius?
Not directly. Convert every dimension to one unit first, calculate, and only then convert the cubic result if you need another unit. A volume found from mixed units has no meaningful unit at all.
Why does the sphere of radius 3 hold less than the cylinder of radius 3 and height 5?
Because the shapes genuinely differ: the sphere's volume depends only on its radius cubed, giving 113.10, while the cylinder stacks its circular base through a height of 5, giving 141.37. The numbers are consistent with the formulas, not an error.
Limitations
The calculator models perfect geometric solids. Real containers have wall thickness, rounded corners, domed or sloped ends, and internal fittings, so usable capacity is usually a little lower than the ideal figure. It also handles only the five listed shapes; pyramids, frustums, and irregular objects need other formulas or displacement methods. Results assume exact inputs, so measurement error flows straight through to the volume.
Sources and Methodology
The formulas are the standard Euclidean volume formulas for these solids as found in any standard mathematics reference: the cube and prism from repeated multiplication of orthogonal dimensions, the cylinder as base area times height, and the cone and sphere from classical results attributed to Archimedes, who proved the cone is one third of its cylinder and the sphere is two thirds of its circumscribing cylinder. Pi is applied at full calculator precision throughout.