Volume Calculator
Calculate volume for cube, rectangular box, cylinder, sphere, cone, or pyramid. Output in cubic units, liters, and gallons.
Volume
Volume formulas at a glance
- Cube: V = s³ (side cubed)
- Rectangular box: V = length × width × height
- Cylinder: V = π × r² × h
- Sphere: V = (4/3) × π × r³
- Cone: V = (1/3) × π × r² × h
- Square / rectangular pyramid: V = (1/3) × base area × h
Cylinder vs cone vs sphere
A beautiful relationship: a cone fits exactly 3 times into a cylinder of the same base and height. A sphere fits exactly 2/3 of the way into a cylinder whose height equals its diameter (Archimedes' insight, ~250 BCE). These ratios are why those (1/3) and (4/3) factors show up.
Quick check: a cylinder 10 cm × 10 cm has volume 785 cm³. A cone of the same dimensions: 262 cm³ (one-third). A sphere of radius 5 cm (diameter 10): 524 cm³ (two-thirds of cylinder). The math is consistent.
Why π shows up everywhere
Any 3D shape with a circular cross-section involves π — cylinders, cones, spheres, ellipsoids. Why? Because circles have area πr². Once you have a 2D circle, extruding it (cylinder), tapering it (cone), or rotating it (sphere) keeps π in the formula.
Practical applications
- Water tanks: cylinder volume tells you tank capacity. Most home water heaters are vertical cylinders.
- Aquariums: rectangular box volume × 0.85 (subtract gravel + decorations) = approximate water volume.
- Planters and garden beds: how much soil to buy. Use volume formula × 0.95 (~5% packing/settlement loss).
- Mulch and compost: cubic yards = (length × width × depth in feet) ÷ 27. See our Mulch Calculator for this exact use case.
- Packaging and shipping: dimensional weight uses bounding-box volume × density factor.
- Pool capacity: gallons in a pool determines chemical dosing. Rectangular pool with sloped bottom: approximate as a trapezoidal prism (use box formula × adjustment factor).
Volume vs capacity
A container's “volume” (the space it occupies) and its “capacity” (how much it can hold) are different. A bottle's outer volume includes glass walls; capacity is interior. For thick-walled containers, capacity can be 70-90% of outer volume.
For real applications, also subtract for: top air gap (most containers aren't filled to the brim), spouts, internal fixtures, settling/packing factor for granular contents.
Unit conversions for volume
- 1 m³ = 1,000 L = 1,000,000 cm³
- 1 ft³ = 1,728 in³ = 28.317 L = 7.481 US gallons
- 1 yd³ = 27 ft³ = 764.555 L
- 1 US gallon = 3.785 L = 231 in³
- 1 Imperial gallon = 4.546 L (≈20% larger than US)
- 1 fluid ounce (US) = 29.574 mL ≈ 1.805 in³
For other math/measurement tools: Square Footage Calculator for 2D area, Unit Converter for length/weight/volume conversions, Concrete Calculator for slabs and footings in cubic yards.