About this tool
The Volume Calculator computes the volume of common 3D shapes: cube, rectangular prism, sphere, cylinder, cone, and pyramid. Select a shape, enter dimensions, and get the volume with the formula.
About 3D volume calculations
Volume is the amount of three-dimensional space enclosed by a solid figure, measured in cubic units (cubic centimetres, cubic metres, cubic inches, cubic feet). Every closed 3D shape has an exact volume formula derived from integral calculus, but for the eight shapes on this page the formulas reduce to simple algebra. The eight covered (cube, rectangular box, sphere, cylinder, cone, rectangular pyramid, ellipsoid, capsule) handle 95 percent of real-world volume problems: rooms, water tanks, swimming pools, packaging, fuel cans, pills, propane cylinders, footballs, planets approximated as ellipsoids, and prilled-tip capsule warheads.
Volume problems arise everywhere. Shipping a parcel uses dimensional weight (length x width x height divided by 5000 for international air freight). Concrete pours need cubic metres of mix. Aquariums and pool fill times depend on capacity. Pharmaceutical dosing converts tablet volume to mass. The capsule shape (cylinder with hemispherical end caps) shows up in propane tanks, vitamin capsules, and sailboat hulls. The ellipsoid covers eggs, melons, American footballs, and approximations of human organs in radiology.
How the formulas work
Every formula on this calculator can be derived by slicing the solid into thin horizontal disks (or boxes), computing the area of each slice, and integrating that area along the height axis. For shapes with constant cross-section (cube, rectangular box, cylinder) the integral collapses to area times height. For tapered shapes (cone, pyramid) the cross-section shrinks linearly so the integral picks up a factor of one-third.
Cube V = s^3 Rectangular box V = L x W x H Sphere V = (4/3) x pi x r^3 Cylinder V = pi x r^2 x h Cone V = (1/3) x pi x r^2 x h Pyramid (rect) V = (1/3) x L x W x H Ellipsoid V = (4/3) x pi x a x b x c Capsule V = pi x r^2 x h + (4/3) x pi x r^3
- s = side length of the cube (all six faces identical).
- r = radius (half the diameter) for sphere, cylinder, cone, capsule.
- h = height (cylinder, cone, pyramid) or cylinder-section height (capsule).
- a, b, c = the three semi-axes of an ellipsoid (radius along each axis).
Worked example: cylindrical water tank
You need to size a vertical rainwater tank for a 4-person household. Each person uses 80 litres per day, you want 7 days of buffer, and you have a 1.5 m diameter spot on the roof.
- Target capacity: 4 people x 80 L x 7 days = 2,240 litres = 2.24 cubic metres.
- Radius: 1.5 m diameter, so r = 0.75 m.
- Base area: pi x r squared = 3.1416 x 0.5625 = 1.767 square metres.
- Required height: Volume divided by base area = 2.24 / 1.767 = 1.27 metres.
- Round up: Buy a 1.5 m tall, 1.5 m diameter tank with volume pi x 0.75 squared x 1.5 = 2.65 cubic metres (2,650 L), giving a comfortable margin.
Volume unit conversions
| From | To | Multiply by |
|---|---|---|
| cubic centimetres (cm cubed) | litres (L) | 0.001 |
| cubic metres (m cubed) | litres | 1,000 |
| litres | US gallons | 0.2642 |
| litres | UK gallons | 0.2200 |
| cubic inches | US gallons | 0.004329 |
| cubic feet | US gallons | 7.481 |
| cubic feet | litres | 28.317 |
| millilitres (mL) | cubic centimetres | 1 (exact) |
Pitfalls to avoid
- Confusing radius and diameter. Sphere, cylinder, and capsule formulas take the radius (half the diameter). Plugging in the diameter gives 8x the correct answer for a sphere.
- Mixing units mid-formula. A cylinder calculated as pi x (5 cm) squared x (2 m) returns nonsense. Convert all dimensions to the same unit before computing.
- Forgetting wall thickness. Container capacity uses internal dimensions; volume calculators give external geometry unless you subtract wall thickness from each dimension.
- Treating an oval as a sphere. A rugby ball or an egg is an ellipsoid (three different semi-axes). Using sphere volume understates the long-axis case.
- Cone tip versus base orientation. The formula does not care which end is up, but if you want partial fill (cone half full of liquid), the volume from the tip is r squared x h cubed proportional, not linear.
- Rounding errors in pi. Using pi = 3.14 for a 1 cubic metre sphere costs you 0.05 percent accuracy; for engineering use pi to at least 5 decimals (3.14159) or the language constant.
Related tools on 3Tej
Frequently asked questions
How do you calculate the volume of a sphere?
Volume of a sphere equals four-thirds times pi times radius cubed. A sphere with radius 5 cm has volume (4/3) x pi x 125 = 523.6 cubic cm. For a ball with diameter 10 cm, use radius 5 cm (half the diameter).
What is the difference between volume and capacity?
Volume is the three-dimensional space an object occupies, measured in cubic units (cm cubed, m cubed). Capacity is how much liquid a container can hold, measured in litres or gallons. One litre equals exactly 1000 cubic cm; one US gallon equals 3,785 cubic cm. A cylinder with internal volume 1000 cm cubed has capacity exactly 1 litre.
Which formula should I use for a swimming pool or fish tank?
A standard rectangular pool or aquarium is a rectangular box: V = length x width x height. A round above-ground pool is a cylinder: V = pi x radius squared x depth. Convert cubic metres to litres by multiplying by 1000 (1 m cubed = 1000 L). A pool 6 m x 3 m x 1.5 m holds 27,000 litres.
How do I convert cubic centimetres to litres or gallons?
Divide cubic cm by 1000 to get litres. Multiply litres by 0.2642 for US gallons, or by 0.2200 for UK (Imperial) gallons. 5000 cm cubed = 5 litres = 1.32 US gal = 1.10 UK gal. Cubic metres to litres is x 1000, and cubic feet to US gallons is x 7.481.
Why is the cone formula one-third the cylinder formula?
A cone with the same base radius and height as a cylinder takes exactly one-third the volume. This is provable by integral calculus (integrating pi x r(y) squared from 0 to h with r(y) = r x (1 - y/h)) or experimentally by pouring water from three cone-shaped cups into a matching cylinder. The same one-third relationship holds for pyramids versus rectangular prisms.
