Geometry

How to Calculate Volume: Five Common 3D Shapes

Choose the right measurements and formula for five solids, then check cubic units, rounding and container assumptions.

Volume measures three-dimensional space. To estimate the capacity of a box or compare ideal geometric solids, first identify the shape and the dimensions its formula needs. The Volume Calculator supports a rectangular prism, cube, cylinder, sphere and cone.

Measure consistently before calculating

Convert all dimensions to the same length unit first. If you multiply centimeters by meters without converting, the result will not have the cubic unit you expect. A measurement in centimeters produces cubic centimeters (cm³); inches produce cubic inches (in³).

The calculator's unit selector labels the result. It does not convert the values already entered. The Unit Converter can help convert individual lengths; it does not offer a volume-conversion category.

Choose one of these five formulas

Dimensions must be positive and in the same length unit
ShapeMeasurementsVolume
Rectangular prismLength l, width w, perpendicular height hl × w × h
CubeOne edge length aa³
CylinderBase radius r, perpendicular height hπ × r² × h
SphereRadius r(4/3) × π × r³
ConeBase radius r, perpendicular height hπ × r² × h / 3
Radius and perpendicular heightA cylinder and cone. Radius runs from the center to the edge of the circular base. Height runs vertically between the base and top, not along the cone's sloping side.rhrhCylinderCone
Radius is half the diameter. Cone height is perpendicular to the base; the sloping edge is not h.

Worked examples you can reproduce

  1. Rectangular box: 40 cm × 25 cm × 20 cm = 20,000 cm³. If these are internal dimensions of an ideal empty box, that is 20 liters because 1 liter = 1,000 cm³.
  2. Cube: an edge of 5 cm gives 5³ = 125 cm³. Do not use 5 × 3: three dimensions are multiplied, not added.
  3. Cylinder: diameter 6 cm means radius 3 cm. With height 10 cm, π × 3² × 10 = 90π ≈ 282.74 cm³.
  4. Sphere: radius 3 cm gives (4/3) × π × 3³ = 36π ≈ 113.10 cm³.
  5. Cone: radius 3 cm and perpendicular height 10 cm give π × 3² × 10 / 3 = 30π ≈ 94.25 cm³.

The cone in the last example holds one third of the cylinder example because they have the same base radius and height. This comparison does not hold for arbitrary cones and cylinders of different dimensions.

Three errors that change the answer substantially

What an ideal shape estimate cannot tell you

For usable container capacity, use internal dimensions. Wall thickness, a rounded bottom, objects inside, or space intentionally left empty reduce usable capacity. These formulas assume the complete ideal solid; they do not calculate a partially filled horizontal tank or an irregular object.

Keep more digits during calculation and round the final result. Two decimal places in a display do not imply that your ruler measurements are accurate to two decimal places. For checking expressions directly, use the Scientific Calculator.

Unit reference

The cubic-unit and liter relationships follow the BIPM SI Brochure. The scenarios above are original teaching examples, not measurements of a specific product.

Found an error? Contact OnlineCalMaster with the article URL, inputs and expected result. Avoid sending sensitive personal information.