↑↓ to move ↵ to open Esc to close Browse all tools

Volume Calculator

Pick a solid, enter its measurements and get the volume in cubic units, liters and gallons, the surface area, the formula with your numbers and a drawing.

Your solid

Shape
Volume

Your solid

How it is calculated

The volume in other units

UnitVolume

Runs on your device. Nothing you enter is sent to a server.

Volume Calculator by Freebiefy, free online tools

Embed this tool on your site

Paste this code into your page. The tool runs in the visitor's browser, free and without signup. The height adjusts to the content. All tools you can embed

Volume and surface area formulas

Volume is the space a solid takes up, in cubic units. Surface area is the total area of its outside, in square units. Every formula needs all lengths in the same unit.

SolidVolumeSurface area
CubeV = a³S = 6a²
Box (cuboid)V = l × w × hS = 2(lw + lh + wh)
CylinderV = π r² hS = 2π r² + 2π r h
ConeV = π r² h ÷ 3S = π r² + π r s, s = √(r² + h²)
SphereV = 4 ÷ 3 × π r³S = 4π r²
HemisphereV = 2 ÷ 3 × π r³S = 3π r² (dome 2π r² plus the flat base π r²)
PyramidV = l × w × h ÷ 3S = lw + l √(h² + (w ÷ 2)²) + w √(h² + (l ÷ 2)²)
Triangular prismV = triangle area × LS = 2 × triangle area + (a + b + c) × L
CapsuleV = π r² h + 4 ÷ 3 × π r³S = 2π r h + 4π r²
Frustum (cut cone)V = π h (R² + R r + r²) ÷ 3S = π (R + r) s + π R² + π r², s = √((R − r)² + h²)
Tube (pipe)V = π (D² − d²) ÷ 4 × LS = π (D + d) L + π (D² − d²) ÷ 2

Two patterns cover most of the table. Solids with the same cross section all the way through, like a box, a cylinder, a prism or a tube, have volume = base area × height. Solids that taper to a point, like a cone or a pyramid, hold exactly one third of that. With r = 3 and h = 4, a cylinder holds 113.1 cubic units and the cone that fits inside it 37.7.

Worked examples

  • A can: a cylinder with a radius of 1.5 in and a height of 4.5 in holds π × 1.5² × 4.5 ≈ 31.81 in³, which is about 0.5212 liters or 17.6256 US fluid ounces.
  • A ball: a sphere with a radius of 5 cm holds 4 ÷ 3 × π × 5³ ≈ 523.6 cm³, about 0.5236 liters. Its surface is 4π × 5² ≈ 314.16 cm².
  • A tank: a box 4 ft long, 2 ft wide and 3 ft high holds 24 ft³, about 179.53 US gallons. Its surface, all six sides, is 52 ft².

Cubic units, liters and gallons

A volume unit is a length unit cubed, so length factors get cubed too. One foot is 12 inches, so a cubic foot is 12 × 12 × 12 = 1,728 cubic inches. The inch, foot, yard and mile are defined exactly in meters in NIST Special Publication 811, Appendix B.8, which also gives the liter as exactly 0.001 m³ and the UK gallon as exactly 4.54609 liters. NIST Handbook 44, Appendix C defines the US gallon as 231 cubic inches, with 4 quarts or 128 fluid ounces in a gallon. From these definitions every factor follows exactly:

UnitValue
1 cubic inch16.387064 cm³
1 US gallon231 in³ = 3.785411784 L
1 cubic foot1,728 in³ = 28.316846592 L ≈ 7.4805 US gal
1 cubic yard27 ft³ = 0.764554857984 m³
1 cubic meter1,000 L ≈ 264.1721 US gal
1 UK gallon4.54609 L

The calculator converts with these exact factors and rounds only what it shows. The US and UK gallons are different units with the same name, so check which one your recipe, tank or fuel price uses.

What surface area includes

The surface area counts every face of the solid. For a cylinder that is both round ends plus the side, for a cone the round base plus the slanted side, for a hemisphere the dome plus the flat circle it stands on. The calculator also shows the side area on its own where it matters, for example to paint a column without its ends or to wrap a label around a can. A tube's surface is its outer side, its inner side and the two ring-shaped ends.

Which calculator for which job

This calculator works from the measurements of a geometric solid. If you already have a volume and only want it in other units, the volume converter is faster and also knows cups and tablespoons. For a swimming pool with a shallow and a deep end, the pool volume calculator gives gallons and fill time. For slabs, footings and post holes, the concrete calculator gives cubic yards and the number of bags. For flat shapes, use the area calculator.

Common mistakes

  • Diameter instead of radius: a radius twice too large makes a cylinder four times and a sphere eight times too large. Halve the diameter first.
  • Slant height instead of height: for cones and pyramids, the height is measured straight up from the base to the tip. The slant height along the side is longer.
  • Mixed units: a box 2 ft by 18 in by 6 in has to be in one unit first: 2 × 1.5 × 0.5 = 1.5 ft³.
  • Outside instead of inside: for the water a tank or pipe holds, measure the inside. The tube option shows both the wall material and the inside capacity.

How to use the volume calculator

  1. 1Pick the solid. The fields change to the measurements it needs, and the drawing shows what each letter means.
  2. 2Choose the unit you measured in and type the measurements. Decimals with a point or a comma both work.
  3. 3Read the volume, the surface area and the volume in liters and gallons. The table lists every other unit.
  4. 4Copy the result, or copy a link that opens the calculator with your solid and values.

Sources

Frequently asked questions

How do I calculate volume?

Use the formula for the solid and the same unit for every length. A box is length × width × height, a cylinder π × radius² × height, a sphere 4 ÷ 3 × π × radius³. The answer comes out in cubic units: inches give cubic inches, meters give cubic meters.

How many gallons are in a cubic foot?

About 7.48 US gallons. The US gallon is exactly 231 cubic inches and a cubic foot is 12 × 12 × 12 = 1,728 cubic inches, so 1,728 ÷ 231 ≈ 7.4805. A cubic foot is also exactly 28.316846592 liters.

What is the difference between volume and surface area?

Volume is the space inside a solid, in cubic units, like the water a tank holds. Surface area is the total area of its outside, in square units, like the paint or wrapping it needs. A cube with 2 ft edges holds 8 ft³ and has 24 ft² of surface.

Why is a cone one third of a cylinder?

A cone and a cylinder with the same base and height differ by exactly a factor of 3: V = π r² h ÷ 3 for the cone and π r² h for the cylinder. The same holds for a pyramid and a box with the same base and height. With r = 3 and h = 4 the cylinder holds about 113.1 cubic units and the cone about 37.7.

How do I find the volume of a pipe or tube?

Pick Tube and enter the outer diameter, the inner diameter and the length. The volume is the material of the wall, π × (D² − d²) ÷ 4 × length. The calculator also shows the inside capacity, the volume of liquid the tube can hold, π × d² ÷ 4 × length.

How many liters is a cubic meter?

Exactly 1,000 liters, because a liter is one cubic decimeter, a cube 10 cm on each side. One liter is 1,000 cubic centimeters, and one milliliter is one cubic centimeter.