How the volume calculator works
Choose a shape (cube, rectangular box, cylinder, sphere, cone or square pyramid), pick the unit you measured in, and enter the measurements. The calculator gives the volume in that unit cubed and converts it to liters, U.S. gallons and cubic feet, with the formula and the numbers put in.
Use it for homework, or to find how much a tank, planter, aquarium or container holds before you fill it.
Volume formulas
Volume is the space a solid takes up. Each shape has its own formula; the round shapes use π, about 3.14159.
| Shape | Formula |
|---|---|
| Cube | V = s³ |
| Rectangular box | V = length × width × height |
| Cylinder | V = π × r² × h |
| Sphere | V = 4/3 × π × r³ |
| Cone | V = 1/3 × π × r² × h |
| Square pyramid | V = 1/3 × base side² × h |
Example: A cylinder with a 3-inch radius and a 10-inch height holds π × 3² × 10 ≈ 282.74 cubic inches. That is about 4.633 liters, or 1.224 U.S. gallons.
A cone holds exactly one third of a cylinder with the same radius and height, and a pyramid holds one third of a box with the same base and height.
Converting to gallons and liters
Enter every measurement in the same unit; the answer is in that unit cubed. The conversions use exact definitions: an inch is 2.54 centimeters, a liter is 1,000 cubic centimeters, and a U.S. liquid gallon is 231 cubic inches.
Example: A raised garden bed 10 feet long, 4 feet wide and 2 feet deep holds 10 × 4 × 2 = 80 cubic feet, which is about 2.963 cubic yards or 598.4 gallons.
For soil, mulch or gravel sold by the cubic yard, the Cubic Yard and Gravel calculators also handle depth in inches and several areas at once.