Volume Calculator

Find the volume of 9 shapes, from boxes and cylinders to cones, capsules and pyramids, with the surface area and the volume in liters and US gallons.

Reviewed · How we build and check our calculators

Your details

For a pyramid, the length of its base. For a triangular prism, the distance between the two triangles.

For a pyramid, the width of its base.

For a cone or pyramid, from the base straight up to the tip.

Volume of the box (rectangular prism)

30,000 cm³

Liters
30 L
US gallons
7.92516 gal
Cubic feet
1.05944 ft³
Surface area
6,200 cm²
All outer faces

Volume grows with the cube of length: doubling every measurement makes the shape hold 8 times as much. The gallons are US gallons; a UK gallon is about 4.546 L.

The same volume in other units

UnitVolume
Milliliter (mL)30,000 mL
Liter (L)30 L
Cubic meter (m³)0.03 m³
Teaspoon (US) (tsp)6,086.52 tsp
Tablespoon (US) (tbsp)2,028.84 tbsp

How the volume calculator works

Pick a 3D shape and enter its measurements to get its volume, its surface area, and how much it holds in liters, US gallons and cubic feet. Nine shapes are covered, from boxes and cylinders to cones, capsules and pyramids.

Formula

Cube: s³. Box: l × w × h. Cylinder: πr²h. Cone: ⅓πr²h. Sphere: 4/3 πr³. Hemisphere: 2/3 πr³. Pyramid: ⅓ × l × w × h. Capsule: 4/3 πr³ + πr²a. Triangular prism: ½ × b × h × length.

  1. 1

    Multiply the three sides

    A box 50 cm long, 30 cm wide and 20 cm high holds 50 × 30 × 20 = 30,000 cm³.

  2. 2

    Convert to liters

    1 liter is 1,000 cm³, so 30,000 cm³ is 30 L.

  3. 3

    Convert to US gallons

    1 US gallon is 3.785411784 L, so 30 L is 7.92516 gal, or 1.05944 ft³.

  4. 4

    Add the faces for the surface

    2 × (50 × 30 + 50 × 20 + 30 × 20) = 2 × 3,100 = 6,200 cm² of outer surface.

Worked example

The calculator opens with these values

Shape
Box (rectangular prism)
Length
50
Width
30
Height
20
Unit of the lengths
Centimeters (cm)

Volume of the box (rectangular prism)

30,000 cm³

Cubic units in liters and gallons

A cube 10 cm on each side holds exactly 1 liter, which is how the liter is defined. A cubic foot holds about 7.5 US gallons, a handy figure for tanks, freezers and moving boxes.

What one cubic unit holds
CubeLitersUS gallons
1 cubic centimeter (1 cm³)0.001 L0.000264172 gal
1 cubic inch (1 in³)0.0163871 L0.004329 gal
1 cubic foot (1 ft³)28.3168 L7.48052 gal
1 cubic yard (1 yd³)764.555 L201.974 gal
1 cubic meter (1 m³)1,000 L264.172 gal

How much a round pipe or tank holds

Volume grows with the square of the diameter, so a pipe twice as wide holds four times as much. For a length other than 1 m, multiply the figure by the length in meters.

Liters held by 1 m of round pipe or tank
Inside diameterLiters per meterUS gallons per meter
2 cm0.314159 L0.0829921 gal
5 cm1.9635 L0.518701 gal
10 cm7.85398 L2.0748 gal
15 cm17.6715 L4.66831 gal
20 cm31.4159 L8.29921 gal
30 cm70.6858 L18.6732 gal
50 cm196.35 L51.8701 gal
100 cm785.398 L207.48 gal

Measuring for volume

The formula is only as good as the measurements that go into it.

  • Use inside measurements for what a container holds. Outside measurements include the walls.
  • For a tank that is not full, measure the depth of the liquid, not the height of the tank.
  • Measure a pipe's inside diameter. The size printed on a pipe is often a nominal size, not the actual bore.
  • For an odd-shaped object, sink it in a measuring jug of water: the rise in milliliters is its volume in cm³.
  • Keep one unit for every length. Mixing centimeters and meters gives an answer off by a factor of 1,000,000.

Common questions

How many liters does a fish tank hold?

Measure the inside length, width and water depth in centimeters, choose Box, and read the liters. A 60 × 30 × 35 cm tank holds 63 L. Gravel and decorations take up some of that space.

Why is a cone exactly one third of a cylinder?

A cone with the same base and height as a cylinder holds one third as much, a result known since Archimedes. The same is true of a pyramid and the box around it.

Why is there no surface area for a triangular prism?

The volume needs only the triangle's base and height, but the surface also needs the two slanted sides of the triangle, which those measurements do not fix.

Are these US or UK gallons?

US gallons of 3.785 L. A UK (imperial) gallon is about 4.546 L, so the same volume is fewer UK gallons.

Area Calculator

Area and perimeter of rectangles, triangles, circles, polygons and more

Add this calculator to your website

Free for blogs, schools and businesses. Paste this code into your page; the calculator works inside it, with no ads and no tracking. Please keep the credit line.