Math & Science

Volume Calculator

Calculate volume for cube, rectangular box, cylinder, sphere, cone, or pyramid. Output in cubic units, liters, and gallons.

For diameter, divide by 2.

Volume

7.72
liters
Cubic in
471.24in³
Cubic feet
0.2727ft³
Cubic meters
0.0077
Liters
7.72L
US gallons
2.040gal
If filled with water: ≈ 7.7 kg / 17.0 lbs

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.

Frequently Asked Questions

How do I calculate the volume of a cylinder?
Volume = π × radius² × height. So a cylinder with radius 5 in and height 10 in has volume π × 25 × 10 = 785.4 in³ ≈ 12.87 liters ≈ 3.4 US gallons.
What's the difference between a cone and a pyramid?
A cone has a circular base; a pyramid has a polygonal base (triangle, square, rectangle). Both formulas use 1/3 × base area × height. Cone: (1/3) × πr² × h. Square pyramid: (1/3) × side² × h. Rectangular pyramid: (1/3) × length × width × h.
How many gallons in a cubic foot?
1 cubic foot = 7.481 US gallons = 28.317 liters. So a 50-gallon water tank is about 6.7 ft³. A typical household water heater (40-50 gal) is roughly 5-7 cubic feet.
How do I find the volume of an irregular shape?
Two approaches: (1) decompose into known shapes (a barrel = cylinder + two hemispheres for the rounded ends), calculate each, sum. (2) Water displacement: submerge the object in water, measure the volume of water displaced. (3) For 3D models, software like Blender or CAD tools compute exact volume.
What's a "fluid ounce" — volume or weight?
Volume. 1 US fluid ounce = 29.5735 mL ≈ 1.805 in³. Confusingly, "ounce" without "fluid" usually means weight (28.35 grams). For water at room temperature, 1 fluid ounce of water weighs about 1 ounce (by coincidence) — but for other liquids, density matters.

Related Calculators