Volume is the amount of space a solid takes up, measured in cubic units such as cubic inches, cubic feet or cubic meters. It answers practical questions: how much water a tank holds, how much concrete fills a form, how much gravel sits in a pile. This calculator handles 13 common solids, shows the formula with your numbers, and converts the result to liters and US gallons so you can go straight from dimensions to capacity.
How to use the volume calculator
- Pick a Shape from the list.
- Enter the dimensions that appear for that shape, such as radius and height for a cylinder or the three base sides and length for a triangular prism.
- Choose the Units for your measurements.
- Read the volume, the capacity in liters and US gallons, the total surface area and extra measures such as slant height or diagonals. The steps show the formula with your values, and a diagram labels each dimension.
Volume formulas
| Shape | Volume |
|---|---|
| Cube (edge a) | a³ |
| Rectangular prism (l, w, h) | lwh |
| Sphere (radius r) | ⁴⁄₃πr³ |
| Hemisphere (radius r) | ⅔πr³ |
| Cylinder (r, h) | πr²h |
| Cone (r, h) | ⅓πr²h |
| Conical frustum (radii R, r, height h) | ⅓πh(R² + Rr + r²) |
| Capsule (radius r, cylinder length a) | πr²(⁴⁄₃r + a) |
| Square pyramid (base edge a, height h) | ⅓a²h |
| Pyramid frustum (base areas A₁, A₂, height h) | ⅓h(A₁ + A₂ + √(A₁A₂)) |
| Triangular prism (end area B, length L) | BL |
| Tube (radii R, r, length L) | π(R² − r²)L |
| Ellipsoid (semi-axes a, b, c) | ⁴⁄₃πabc |
Worked examples
Rain barrel. A cylindrical barrel is 22 in across and 34 in tall. Choose Cylinder, enter r = 11 and h = 34 in inches.
- V = π × 11² × 34 ≈ 12,924.5 in³.
- Capacity: 12,924.5 ÷ 231 ≈ 55.95 US gallons, or about 211.8 liters.
Gravel pile. A conical pile is 12 ft across and 4 ft high. Choose Cone, enter r = 6 and h = 4 in feet.
- V = ⅓ × π × 6² × 4 ≈ 150.8 ft³, which is 150.8 ÷ 27 ≈ 5.59 yd³ to order.
Unit pitfalls
Cubic units grow with the cube of the conversion factor, so an error in one length is multiplied three times over:
| From | To | Multiply by |
|---|---|---|
| ft³ | yd³ | 1 ⁄ 27 |
| ft³ | US gallons | 7.4805 |
| in³ | US gallons | 1 ⁄ 231 |
| cm³ | liters | 1 ⁄ 1,000 |
| m³ | liters | 1,000 |
| ft³ | liters | 28.3168 |
A 10 ft × 10 ft slab that is 4 inches thick must be entered as 10 × 10 × 0.3333 ft (not 4), giving about 33.33 ft³ or 1.23 yd³ of concrete. Entering the 4 as feet would order twelve times too much.
Why the formulas look the way they do
Base times height
Any solid with a constant cross-section, such as a box, cylinder, triangular prism or tube, has a volume equal to that cross-section’s area times the length. Cavalieri’s principle extends this: two solids with equal cross-sections at every height have equal volumes, even if one is slanted.
The one-third rule
A pyramid or cone holds exactly one-third of the prism or cylinder with the same base and height. Archimedes also showed that a sphere fills two-thirds of the cylinder that just contains it, which is where ⁴⁄₃πr³ comes from.
Scaling
Doubling every dimension multiplies the volume by 2³ = 8. A ball twice as wide holds eight times as much, which is why a modest increase in tank diameter adds a lot of capacity.
Related tools
For the outside area of the same shapes, use the surface area calculator. Every formula is also collected on the 3D shape formulas page, and the volume converter changes between any volume units.
Frequently asked questions
How do I calculate volume?
For any prism or cylinder, multiply the area of the base by the height. For a pyramid or cone with the same base and height, take one-third of that. Spheres and capsules have their own formulas, which this calculator applies for you.
How many gallons are in a cubic foot?
One cubic foot holds about 7.4805 US gallons, because a US gallon is defined as exactly 231 cubic inches and a cubic foot is 1,728 cubic inches. In metric terms, 1 liter is 1,000 cm³ and a cubic meter is 1,000 liters.
How do I convert cubic feet to cubic yards?
Divide by 27, because a cubic yard is 3 ft × 3 ft × 3 ft. A 150.8 ft³ pile of gravel is about 5.59 yd³. Dividing by 3 is a common and costly mistake.
Can I mix units such as feet and inches?
Not within one calculation. Convert every dimension to the same unit first, for example 2 ft 6 in to 2.5 ft or 30 in. The volume then comes out in cubic units of that same unit.
What shapes does the volume calculator support?
Cube, rectangular prism (box), sphere, hemisphere, cylinder, cone, conical frustum, capsule, square pyramid, pyramid frustum with any regular base, triangular prism, tube and ellipsoid.