Skip to content

Volume Calculator for 3D Shapes

Volume of a cube, box, cylinder, cone, sphere, pyramid, prism, capsule or frustum, in cm³, m³, litres or gallons.

Your details

Unit system

Half the diameter. For a frustum: the radius of the larger (bottom) base.

Perpendicular height. For a capsule: the length of the straight cylindrical part only.

Results update as you type

Volume

603.1858 cu in

Capacity
2.6112 US gal
Base area
50.2655 in²

Step-by-step solution
  1. Formula: V = πr²h
  2. h = 12 in, r = 4 in
  3. Base area: 50.2655 in²
  4. Volume: V = 603.1858 cu in = 2.6112 US gal

Volume measures how much space a solid takes up — or how much it can hold. This calculator covers twelve shapes: the cube, the rectangular box (cuboid), the cylinder, the cone, the sphere and hemisphere, the square or rectangular pyramid, the triangular pyramid, the triangular prism, the trapezoidal prism, the capsule and the frustum of a cone (a cone with its tip cut off, like a bucket or a flower pot).

Enter the dimensions in mm, cm, dm, m, inches, feet or yards and the volume appears in cubic units of your choice. A second result gives the capacity directly in millilitres, litres, cubic metres or US and UK gallons, so you can answer "how many litres does this tank hold?" without a separate conversion. For prisms, cylinders, pyramids and cones the base area is shown too, since every one of their formulas starts from it.

It is useful for homework, but also for real jobs: sizing a water tank or an aquarium, the amount of concrete for a cylindrical column, the soil for a tapered planter, or the content of a capsule-shaped tank. For the outside area of the same solids, see the surface area calculator; for earthworks and shipping volumes in m³ or cubic yards, the cubic volume calculator.

How to use this calculator

  1. Choose the solid from the list.
  2. Enter the requested dimensions. Radii are half the diameter; heights are measured perpendicular to the base.
  3. For a prism, give the shape of the end face (triangle or trapezoid) and the length of the prism.
  4. Read the volume, and switch its unit if needed (cm³, m³, in³, ft³…).
  5. Read the capacity in litres or gallons, and open the steps to see the formula with your numbers.

The formula

Solid Volume
Cube, edge aa V=a3V = a^3
Rectangular box V=L×W×HV = L \times W \times H
Cylinder V=πr2hV = \pi r^2 h
Cone V=13πr2hV = \frac{1}{3}\pi r^2 h
Sphere V=43πr3V = \frac{4}{3}\pi r^3
Hemisphere V=23πr3V = \frac{2}{3}\pi r^3
Rectangular pyramid V=13LWhV = \frac{1}{3} L W h
Triangular pyramid V=13⋅b ht2⋅hV = \frac{1}{3} \cdot \frac{b\,h_t}{2} \cdot h
Triangular prism V=b ht2⋅LV = \frac{b\,h_t}{2} \cdot L
Trapezoidal prism V=a+b2 ht⋅LV = \frac{a + b}{2}\,h_t \cdot L
Capsule V=πr2(43r+h)V = \pi r^2 \left(\frac{4}{3} r + h\right)
Frustum of a cone V=13πh(R2+Rr+r2)V = \frac{1}{3}\pi h \left(R^2 + R r + r^2\right)

Two ideas cover almost all of them. A prism or cylinder has the same cross-section all along, so V=B×hV = B \times h (base area times height). A pyramid or cone narrows to a point, and its volume is exactly one third of the prism with the same base and height: V=13BhV = \frac{1}{3} B h. Units: 1 L = 1 dm³ = 1000 cm³, and 1 m³ = 1000 L.

Worked example

Volume of a cylinder in litres. A cylindrical tank has a radius of 10 cm and a height of 30 cm:

V=π×102×30≈9,424.78 cm3V = \pi \times 10^2 \times 30 \approx 9{,}424.78 \text{ cm}^3

Dividing by 1000 gives 9.42 litres.

Other quick checks, all in centimetres: a cube of edge 3 holds 27 cm³; a 5 × 3 × 4 box, 60 cm³; a cone of radius 3 and height 4, 12π≈37.7012\pi \approx 37.70 cm³; a square pyramid with a 6 × 6 base and a height of 4, 13×36×4=48\frac{1}{3} \times 36 \times 4 = 48 cm³; a triangular pyramid with a base triangle of 6 by 4 and a height of 10, 40 cm³; a triangular prism on a triangle of base 3 and height 4, 10 long, 60 cm³; a trapezoidal prism with parallel sides 3 and 5, trapezoid height 4 and length 10, 160 cm³; a sphere of radius 3, 113.10 cm³; a capsule of radius 1 with a 2 cm straight part, 10.47 cm³; and a frustum with radii 3 and 2 and a height of 4, 79.59 cm³.

Volume of a cylinder in litres

Tanks, barrels, pipes and saucepans are cylinders, and the question is usually how many litres they hold. Compute πr2h\pi r^2 h in centimetres and divide by 1000 (1 L = 1000 cm³), or work in decimetres, where one cubic decimetre is one litre. In metres, multiply the m³ result by 1000. A drum 60 cm across (radius 30 cm) and 90 cm high holds π×302×90≈254 469\pi \times 30^2 \times 90 \approx 254\,469 cm³, about 254 L. Measure the inside diameter when the walls are thick, and remember that a horizontal tank that is partly full needs a different calculation. The capacity output above does the conversion for you in litres, millilitres or US and UK gallons.

Pyramids and cones: the one-third rule

Every pyramid and every cone has a volume equal to one third of base area times height, whatever the shape of the base. For a pyramid with a square or rectangular base, the base area is L×WL \times W. For a pyramid with a triangular base (a tetrahedron when all faces are equilateral), it is 12b ht\frac{1}{2} b\,h_t, where hth_t is the height of the base triangle — not to be confused with the height hh of the pyramid, measured from the apex straight down to the base. For a cone, the base is a disc of area πr2\pi r^2. A quick way to remember the factor: three identical pyramids of water fill the prism with the same base and height. A frustum is what remains when the top of a cone is cut off parallel to the base; its formula averages the two bases in a special way, R2+Rr+r2R^2 + Rr + r^2.

Prisms: cube, box, triangular and trapezoidal prisms

A prism is a solid with two identical parallel faces joined by rectangles, and its volume is always base area × length. The cube (a3a^3) and the rectangular box (L×W×HL \times W \times H) are prisms with square or rectangular ends. A triangular prism — a tent, a Toblerone box, a roof void — has a triangle at each end: volume =12b ht×L= \frac{1}{2} b\,h_t \times L. If you only know the three sides of the triangle, find its area first with Heron’s formula in the area calculator. A trapezoidal prism — a ditch, a dam, a sloping-sided trough — has a trapezoid at each end: volume =a+b2 ht×L= \frac{a+b}{2}\,h_t \times L, where aa and bb are the two parallel sides.

Frequently asked questions

How do I calculate the volume of a cube or a rectangular box?

Multiply the three dimensions. For a cube, that is the edge cubed: a cube of 3 cm holds 27 cm³. For a box, V = L × W × H: 5 × 3 × 4 cm gives 60 cm³.

How do I find the volume of a cylinder in litres?

Compute V = πr²h with lengths in centimetres, then divide by 1000. A cylinder of radius 10 cm and height 30 cm holds about 9,424.78 cm³, or 9.42 litres.

What is the volume of a cone?

One third of the cylinder with the same base and height: V = πr²h / 3. A cone of radius 3 cm and height 4 cm has a volume of 12π ≈ 37.70 cm³.

How do I calculate the volume of a pyramid with a triangular base?

Find the area of the base triangle (½ × base × height of the triangle), multiply by the height of the pyramid and divide by 3. With a 6 × 4 triangle and a height of 10: 12 × 10 / 3 = 40.

What is the volume of a triangular prism?

Area of the triangular end times the length of the prism: V = ½ × b × hₜ × L. A triangle of base 3 and height 4 on a 10-unit prism gives 6 × 10 = 60 cubic units.

How do I calculate the volume of a trapezoidal prism?

Multiply the area of the trapezoid, (a + b) / 2 × hₜ, by the length of the prism. Parallel sides of 3 and 5, a trapezoid height of 4 and a length of 10 give 16 × 10 = 160 cubic units.

Sources

Last updated:

More Math calculators

People also use