Volume Calculator

Pick a 3D shape, enter its dimensions and get the volume in cubic units plus the capacity in liters and US gallons.

Volume
226.194671 in3
Capacity in liters
3.7067 L
Capacity in US gallons
0.9792 gal
Total surface area
207.345115 in2
Diameter
6 in
Base circumference
18.849556 in
Volume of the cylinder226.194671 in3

Show the work

  1. V = πr2h = π × 32 × 8 = 226.194671 in3
  2. Capacity: 1 liter = 1,000 cm3 and 1 US gallon = 231 in3, so the volume converts to 3.7067 L or 0.9792 gal
r = 3h = 8units: in

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

  1. Pick a Shape from the list.
  2. 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.
  3. Choose the Units for your measurements.
  4. 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
Vprism or cylinder = base area × height  ·  Vpyramid or cone = ⅓ × base area × height

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.

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.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.