Volume Calculator

Shape
Dimensions
Volume
US gallons—
Liters—
Cubic feet—
Cubic inches—
Cubic yards—
Cubic meters—
Imperial gallons—
Weight of water—
Each one—

Geometric volume from your dimensions. For what a container holds, measure the inside. Water weight assumes 1 kg per liter, about 8.3 lb per gallon.

Volume is the space inside a shape. For a box, multiply length × width × height. For a cylinder, multiply π × radius² × height. A drum 2 ft across and 4 ft tall holds 12.57 ft³, which is 94 US gallons or 356 liters. Pick one of 11 shapes, enter each dimension in any unit, and the calculator gives gallons, liters, cubic feet, and cubic yards at once.

Volume formulas with a worked example

Each example computed with this calculator. US gallons are rounded to one decimal place.
ShapeFormulaExampleCubic feetUS gallons
Boxl × w × h4 × 2 × 4 ft32239.4
Cubea³1 ft sides17.5
Cylinderπ r² h2 ft across, 4 ft tall12.5794.0
Tubeπ (R² − r²) h4 in / 3 in across, 10 ft long0.382.9
Sphere4/3 π r³1 ft across0.523.9
Hemisphere2/3 π r³3 ft across7.0752.9
Cone1/3 π r² h2 ft across, 3 ft tall3.1423.5
Frustum1/3 π h (R² + Rr + r²)2 ft / 1 ft across, 2 ft tall3.6727.4
Pyramid1/3 l w h3 × 3 ft base, 3 ft tall967.3
Triangular prism½ b h l4 ft base, 3 ft high, 10 ft long60448.8
Capsuleπ r² l + 4/3 π r³2 ft across, 6 ft straight23.04172.3

Volume formulas for each shape

Most solids follow one of two patterns. A prism or cylinder is its cross-section area times its length. A cone or pyramid is one third of that. Spheres are the exception and have their own formula. Here r is the radius, half the diameter.

  • Box: length × width × height. A cube is the side cubed, a³.
  • Cylinder: π × r² × height. Use this for drums, round tanks, columns, and buckets with straight sides.
  • Tube: π × (R² − r²) × length, where R is the outer and r the inner radius. This gives the material in a pipe wall or a ring of concrete. For the water inside a pipe, use the pipe volume calculator.
  • Sphere: 4/3 × π × r³. A hemisphere is half that, 2/3 × π × r³.
  • Cone: 1/3 × π × r² × height, a third of the cylinder with the same base and height.
  • Frustum: 1/3 × π × h × (R² + R·r + r²), for a cone with the top cut off, such as a tapered planter or a bucket.
  • Pyramid: 1/3 × base length × base width × height.
  • Triangular prism: ½ × base × triangle height × length, for a wedge, a gable attic, or a swale.
  • Capsule: a cylinder plus two half spheres, π × r² × l + 4/3 × π × r³, where l is the straight part only. This fits propane tanks and other round-ended tanks.

The summary line above the results shows the formula for the shape you picked.

Cubic feet, gallons, and liters

The calculator works in exact unit definitions, so the conversions match the official factors:

  • 1 US gallon is exactly 231 cubic inches, or 3.785411784 liters.
  • 1 imperial gallon, used in the UK, is 4.54609 liters, about 20% more than a US gallon. NIST lists both, so check which one a spec means.
  • 1 cubic foot is 1,728 in³, 7.48 US gallons, or 28.32 liters.
  • 1 cubic yard is 27 ft³, about 202 US gallons or 0.765 m³.
  • 1 cubic meter is 1,000 liters, 35.31 ft³, or 264.2 US gallons.

Each dimension has its own unit picker, so you can enter a diameter in inches and a height in feet without converting first.

Worked examples

  • Drum: 2 ft across and 4 ft tall. The radius is 1 ft, so the volume is π × 1² × 4 = 12.57 ft³. Multiply by 7.48 to get 94 gallons.
  • 55-gallon drum: a drum 22.5 in across and 33.5 in tall works out to 57.7 gallons brim-full. The rated 55 gallons is less than the brim volume, so your drum's label, not the geometry, tells you its rated fill.
  • Aquarium: 48 × 13 × 21 in is 13,104 in³, or 56.7 gallons. Those are outside sizes. The glass and the gap below the rim mean the tank holds less water than that.
  • Cone-shaped pile: 2 ft across and 3 ft high is 3.14 ft³, or 23.5 gallons. That is a third of the 9.42 ft³ cylinder with the same base and height.

When to use a different calculator

This page gives the volume of a shape. Some jobs need more than that:

  • Pools: the pool calculator averages a sloped floor and handles oval pools.
  • Tanks filled part way: the tank calculator finds the gallons at a given fill depth in a horizontal or vertical tank.
  • Gravel, soil, and mulch: the cubic yard calculator adds weight in tons, bags, and cost per yard. Bulk material is sold by the yard or the ton, not by the gallon.
  • Concrete: the concrete calculator turns a slab or column into bags and ready-mix yards.
  • Lumber: the board foot calculator measures wood by the board foot, the unit it is priced in.

Common mistakes

  • Using the diameter as the radius. The radius is squared or cubed, so this gives 4 times the real volume of a cylinder and 8 times the volume of a sphere. The calculator takes either. Set "Round sizes as" to match what you measured.
  • Mixing units. Inches times feet gives neither cubic inches nor cubic feet. Pick each field's unit and let the calculator convert.
  • Measuring the outside of a container. Wall thickness takes up space. Measure inside for capacity.
  • Mixing up US and imperial gallons. A UK spec in gallons means imperial gallons, which are about 20% bigger. Both are shown.
  • Treating a bucket as a cylinder. Tapered sides make it a frustum. Measure the top and bottom diameters.

The examples and the table figures were checked with this calculator.

Frequently asked questions

How do you calculate volume?

Multiply the area of the base by the height for boxes, prisms, and cylinders. Take one third of that for cones and pyramids. A box is length × width × height; a cylinder is π × radius² × height; a sphere is 4/3 × π × radius³.

How many gallons are in a cubic foot?

One cubic foot holds 7.48 US gallons, or 28.32 liters. A US gallon is exactly 231 cubic inches, and a cubic foot is 1,728 cubic inches.

How do I calculate gallons in a cylinder?

Find π × radius² × height in cubic feet, then multiply by 7.48. A cylinder 2 ft across and 4 ft tall is 12.57 ft³, or 94 US gallons.

How do I convert cubic inches to gallons?

Divide by 231. An aquarium 48 × 13 × 21 in is 13,104 cubic inches, which is 56.7 US gallons.

How many liters are in a gallon?

A US gallon is 3.785 liters, and an imperial (UK) gallon is 4.546 liters. A cubic meter holds 1,000 liters, or about 264 US gallons.

What is the volume of a sphere?

Four thirds × π × radius³. A ball 1 ft across has a radius of 0.5 ft and a volume of 0.52 ft³, or 3.9 gallons.

What is the formula for the volume of a cone?

One third × π × radius² × height. A cone holds a third of a cylinder with the same base and height.

How much does the water weigh?

About 8.3 lb per US gallon, or 1 kg per liter. The calculator shows the weight of water that fills the shape, which helps when you size a stand or check a floor load.

Sources