About This Tool
Calculating the volume of three-dimensional shapes is essential for tasks ranging from filling a swimming pool to sizing a shipping container, pouring concrete for a foundation, or determining how much soil fits in a raised garden bed. Each 3D shape has its own formula, and confusing radius with diameter or forgetting to divide by three for cones and pyramids are among the most frequent mistakes made in volume calculations. Getting the volume wrong can mean ordering too much material and wasting money, or ordering too little and delaying a project while you wait for more supplies to arrive. This volume calculator covers seven common 3D shapes: sphere, cylinder, cone, cube, rectangular prism (box), pyramid, and triangular prism. Select the shape from the dropdown, enter the required measurements, and get the volume instantly along with the surface area as a bonus output. The formula breakdown displays the exact steps used to arrive at each result so you can verify the math or use it for homework, project planning, or professional documentation. All results are rounded to two decimal places for clarity, and the tool is completely free to use with no account or download required. Input fields adjust dynamically based on the selected shape so you only see the measurements relevant to your geometry.
Sphere and Cylinder Volume Formulas
The sphere and cylinder are two of the most common curved 3D shapes. Their formulas both involve pi and the radius.
Sphere: V = (4/3) x pi x r³
A sphere requires only one measurement: the radius. For a sphere with radius 6, the volume is (4/3) x pi x 216 = 904.78 cubic units. The surface area is 4 x pi x r² = 452.39 square units.
Cylinder: V = pi x r² x h
A cylinder needs the radius of its circular base and the height. For a cylinder with radius 3 and height 10, the volume is pi x 9 x 10 = 282.74 cubic units. Cylindrical shapes appear in pipes, cans, tanks, columns, and silos.
When measuring cylinders, ensure you are using the radius (half the diameter). If you measured across the full circle, divide that measurement by 2 before entering it.
Cone and Pyramid Volumes
Both cones and pyramids share a common trait: their volume is exactly one-third of the corresponding prism with the same base and height.
Cone: V = (1/3) x pi x r² x h
A cone is essentially one-third of a cylinder. For radius 4 and height 9, the volume is (1/3) x pi x 16 x 9 = 150.80 cubic units. Ice cream cones, traffic cones, and funnels are everyday examples.
Pyramid: V = (1/3) x base area x h
This calculator uses a rectangular base (length x width). For a pyramid with base 6 x 8 and height 10, the volume is (1/3) x 48 x 10 = 160 cubic units. The surface area includes the rectangular base plus four triangular faces calculated using slant heights.
The 1/3 factor is what separates these pointed shapes from their flat-topped counterparts. Forgetting this factor is one of the most common volume calculation errors.
Cubes, Rectangular Prisms, and Triangular Prisms
These shapes have flat faces and straight edges, making their volume formulas relatively simple:
- Cube: V = s³. All sides are equal. A cube with side 5 has a volume of 125 cubic units and a surface area of 6 x 25 = 150 square units.
- Rectangular Prism (Box): V = length x width x height. This is the most common volume formula in daily life, used for rooms, boxes, aquariums, and storage containers. A box measuring 10 x 5 x 3 has a volume of 150 cubic units.
- Triangular Prism: V = 1/2 x base x height x length. The cross-section is a triangle, and the prism extends along a length. Roof shapes, Toblerone boxes, and tent cross-sections are common examples. For a base of 6, height of 4, and length of 10, the volume is 120 cubic units.
Surface area for the rectangular prism is 2(lw + lh + wh). For the triangular prism, it combines the two triangular ends plus three rectangular side faces.
Surface Area Calculations
Surface area measures the total area covering the outside of a 3D shape. This is useful for determining how much paint, wrapping paper, or coating material you need.
- Sphere: SA = 4 x pi x r²
- Cylinder: SA = 2 x pi x r x (r + h), covering both circular ends and the curved side
- Cone: SA = pi x r x (r + slant height), where slant = sqrt(r² + h²)
- Cube: SA = 6 x s²
- Rectangular Prism: SA = 2(lw + lh + wh)
Note that the pyramid surface area in this calculator assumes a rectangular base and four triangular lateral faces. The triangular prism assumes a right triangle cross-section for its hypotenuse calculation. For irregular shapes, you may need to measure and calculate each face individually.
Unit Conversions for Volume
Volume results depend on the unit of your input measurements. Common conversions:
- 1 cubic foot = 1,728 cubic inches = 7.481 gallons
- 1 cubic meter = 1,000 liters = 35.315 cubic feet
- 1 cubic yard = 27 cubic feet = 764.55 liters
- 1 gallon = 231 cubic inches = 0.1337 cubic feet
- 1 liter = 61.024 cubic inches = 0.001 cubic meters
For construction projects, concrete is typically ordered in cubic yards. For aquariums and tanks, gallons or liters are standard. Always convert your measurements to a consistent unit before entering them into the calculator to get accurate results.
Frequently Asked Questions
How do I calculate the volume of a shape not listed here?
For composite or irregular shapes, break them into simpler components. For example, a capsule (medicine pill shape) is a cylinder plus two half-spheres. Calculate each part separately and add the volumes together. For truly irregular objects, water displacement (immersing the object and measuring the water level change) provides an accurate volume measurement.
What is the difference between volume and capacity?
Volume measures the space an object occupies, expressed in cubic units (cm³, ft³, m³). Capacity refers to how much a container can hold, typically expressed in liters or gallons. They represent the same physical quantity but use different units. 1 liter = 1,000 cm³, and 1 gallon = 231 in³.
Why is the cone volume one-third of a cylinder?
A cone with the same base radius and height as a cylinder always has exactly one-third the volume. This can be proven through calculus (integrating circular cross-sections that shrink linearly from base to tip) or demonstrated experimentally by filling a cone with water and pouring it into the matching cylinder exactly three times to fill it.
How do I convert cubic inches to gallons?
Divide the cubic inches by 231 to get US gallons. For example, 462 cubic inches / 231 = 2 gallons. For imperial gallons (used in the UK), divide by 277.42 instead. This conversion is commonly needed for aquarium sizing, tank capacity, and fluid storage calculations.
What if I only know the diameter, not the radius?
Divide the diameter by 2 to get the radius. For example, if a pipe has a 10-inch diameter, the radius is 5 inches. All formulas in this calculator use radius, not diameter. Using the full diameter instead of the radius is one of the most common mistakes and will produce a result four times too large for area-based calculations.
How accurate are the surface area estimates?
The surface area formulas for spheres, cubes, cylinders, and rectangular prisms are exact. For cones, the formula uses the slant height derived from the radius and vertical height. The pyramid calculation assumes a rectangular base with four triangular faces. The triangular prism assumes a right-triangle cross-section. For non-standard configurations, you may need to calculate individual face areas separately and sum them.