HomeMath › Volume Calculator

Volume Calculator

Pick a solid and enter its dimensions: cube, cylinder, sphere, cone, rectangular tank, capsule, or square pyramid. The rectangular tank mode also takes an optional fill depth, returning the filled volume and fill percentage — handy for aquariums and storage tanks.

Volume
Filled volume
Fill level
Formula

Substitution

Volume in three moves

Almost every volume formula is base area × height, sometimes with a correction. Prisms and cylinders take it literally: a box is l·w·h and a cylinder is πr²h. Pointed solids — cones and pyramids — hold exactly one third of their enclosing prism. The sphere stands alone at 4⁄3πr³, and a capsule is simply a cylinder plus the sphere formed by its two end caps. Because volume scales with the cube of size, doubling every dimension gives 8× the capacity — the reason small tanks fill so much faster than intuition expects.

How it’s calculated

Cube: a³. Cylinder: πr²h. Sphere: 4⁄3πr³. Cone: ⅓πr²h. Rectangular tank: l·w·h, with filled volume l·w·d for fill depth d ≤ h. Capsule: πr²(4⁄3·r + h), h = cylinder section. Square pyramid: ⅓a²h. Results are in your input unit cubed; 1 ft³ = 7.4805 US gallons, 1 m³ = 1,000 L.

Results update as you type and are for education, not professional advice — double-check any number that matters.

Worked example

A cube with edge 3 holds 27. A cylinder r = 3, h = 5: π×9×5 = 141.37. A sphere r = 3: 113.10. A cone r = 3, h = 4: 37.70 — one third of its cylinder. A 2 × 3 × 4 tank holds 24; filled to depth 1.5 it contains 2×3×1.5 = 9, a 37.5% fill. A capsule r = 2, h = 5: 96.34. A pyramid with base 4, height 6: 32.

Common mistakes

  • Using the diameter as the radius — it inflates a cylinder volume 4× and a sphere volume 8×.
  • Forgetting the ⅓ on cones and pyramids — the most common volume error there is.
  • Mixing units — a radius in inches with a height in feet gives nonsense; convert first, then multiply.

Where it is used

  • Aquarium, pool, and storage-tank capacity — including partial fills.
  • Shipping, concrete, and soil estimates by the cubic foot or meter.
  • Geometry homework on the classic solids.

Frequently asked questions

How do I convert the result to gallons or liters?

Multiply cubic feet by 7.4805 for US gallons, or cubic meters by 1,000 for liters. The 24 ft³ example tank holds about 180 gallons; filled to 9 ft³ it contains about 67 gallons.

How does the fill-depth option work?

For a rectangular tank, the contents form a smaller box: filled volume = length × width × depth, and fill percent = depth ÷ height. Enter a depth up to the tank height, in the same unit as the other dimensions.

Why are cones and pyramids exactly one third?

Slice a pointed solid into thin layers: each layer shrinks with the square of its distance from the apex, and summing that square factor over the height yields ⅓ — you can also dissect a cube into three identical pyramids to see it directly.

What height does the capsule formula want?

The cylinder section only. A capsule 9 units end-to-end with r = 2 has h = 9 − 2×2 = 5, giving π×4×(8/3 + 5) = 96.34.

Does this handle a horizontal cylindrical tank partially filled?

No — partial fills of a lying cylinder need a circular-segment formula, not covered here. The fill-depth option applies to rectangular (vertical-sided) tanks, where depth scales linearly.