How to Calculate Volume: Shape Formulas
This guide shows how to calculate volume for common shapes: cubes, rectangular boxes, cylinders, cones, spheres and pyramids. Each formula comes with a worked example in inches or feet and tips for cubic units, so you can solve homework or figure out how much a tank, box or planter holds.
Volume is how much space a 3D object takes up, or how much it can hold, measured in cubic units such as cubic inches, cubic feet or liters. It's the number behind everyday questions like "how many gallons does this fish tank hold?", "how much soil do I need for a raised bed?" and "will these boxes fit in the truck?" This guide explains the formula for every common shape, shows worked examples in U.S. units, and covers the conversions that trip most people up: cubic inches to gallons, cubic feet to cubic yards and cubic centimeters to liters.
Volume formulas for common shapes
| Shape | Formula | Everyday example |
|---|---|---|
| Cube | V = s³ | dice, storage cubes |
| Rectangular prism (box) | V = l × w × h | rooms, boxes, fish tanks, raised beds |
| Cylinder | V = π × r² × h | cans, water heaters, round pools |
| Sphere | V = (4/3) × π × r³ | balls, round tanks |
| Cone | V = (1/3) × π × r² × h | funnels, piles of sand or gravel |
| Square pyramid | V = (1/3) × a² × h | roof sections, monuments |
| Triangular prism | V = ½ × b × h × length | tents, A-frame attics |
A useful pattern: any shape with the same cross-section from top to bottom (a box, cylinder or prism) has a volume of base area × height. Pointed shapes (cones and pyramids) hold exactly one-third of the matching prism or cylinder.
Boxes and rectangular prisms
Multiply length × width × height. A 30 × 12 × 18-inch fish tank holds 30 × 12 × 18 = 6,480 cubic inches. There are 231 cubic inches in a U.S. gallon, so that's 6,480 ÷ 231 ≈ 28 gallons. (A "29-gallon" tank label usually refers to the outside dimensions; the water inside is a bit less.)
A moving box that is 18 × 18 × 16 inches holds 5,184 cubic inches. Divide by 1,728 (cubic inches in a cubic foot) to get 3 cubic feet.
Cylinders
Find the area of the circular base (π × r²) and multiply by the height. Remember that the radius is half the diameter. A water heater tank with an inside diameter of 18 inches (radius 9) and a height of 48 inches holds 3.1416 × 9² × 48 ≈ 12,215 cubic inches, or about 52.9 gallons.
Round above-ground pools work the same way. A 24-ft round pool filled to 4 ft holds 3.1416 × 12² × 4 ≈ 1,810 cubic feet. Multiply by 7.48 gallons per cubic foot to get about 13,500 gallons. For oval and kidney pools, the Pool Volume Calculator handles the shapes and average depth.
Spheres
Cube the radius, multiply by π, then by 4/3. A basketball has a diameter of about 9 inches, so r = 4.5 and V = (4/3) × 3.1416 × 4.5³ ≈ 382 cubic inches. Because the radius is cubed, doubling the size of a ball makes its volume eight times bigger.
Cones and pyramids
A cone holds one-third of the cylinder with the same radius and height. A cone with r = 2 ft and h = 5 ft holds (1/3) × 3.1416 × 2² × 5 ≈ 20.9 cubic feet, compared with about 62.8 cubic feet for the matching cylinder. A square pyramid with a 6-ft base and 4-ft height holds (1/3) × 6² × 4 = 48 cubic feet.
Landscapers use the cone formula to estimate a pile of mulch, gravel or sand delivered in a heap.
Triangular prisms
Find the triangle's area (½ × base × height) and multiply by the length. An A-frame attic space 6 ft wide at the floor, 4 ft tall and 10 ft long holds ½ × 6 × 4 × 10 = 120 cubic feet.
Unusual shapes
- Split it up: break the object into boxes, cylinders and cones, then add their volumes. An L-shaped raised bed is two boxes.
- Subtract the empty part: for a pipe or a hollow planter, find the outer volume and subtract the inner one.
- Water displacement: for small irregular objects, submerge them in a measuring container and read how much the water level rises. 1 milliliter of water equals 1 cubic centimeter.
Volume unit conversions (U.S. and metric)
Cubic units are cubed, so the conversion numbers get big fast: there are 12 inches in a foot but 1,728 cubic inches in a cubic foot.
| From | To | Do this |
|---|---|---|
| cubic inches | cubic feet | ÷ 1,728 |
| cubic inches | U.S. gallons | ÷ 231 |
| cubic feet | U.S. gallons | × 7.48 |
| cubic feet | cubic yards | ÷ 27 |
| cubic feet | liters | × 28.32 |
| cubic centimeters | liters | ÷ 1,000 |
| cubic meters | liters | × 1,000 |
The Volume Converter switches between all of these, including cups, quarts and fluid ounces.
Volume for home and garden projects
Bulk materials like soil, mulch, gravel and concrete are sold by the cubic yard (27 cubic feet). To fill an 8 × 4-ft raised bed 10 inches deep: 8 × 4 × (10 ÷ 12) ≈ 26.7 cubic feet, which is 26.7 ÷ 27 ≈ 0.99 cubic yards. Bagged soil is often sold in 1 to 2 cubic-foot bags, so you'd need about 14 two-cubic-foot bags.
For these jobs, the Cubic Yard Calculator, Mulch Calculator and Concrete Calculator convert straight to yards and bags.
Volume vs surface area
Volume is the space inside; surface area is the total area of the outside. You need volume to fill something (water, soil, concrete) and surface area to cover it (paint, wrapping, insulation). The Surface Area Calculator handles the outside.
Common mistakes
- Mixing units: convert inches to feet (divide by 12) before multiplying feet by feet.
- Diameter instead of radius: this makes cylinder answers 4 times too big and sphere answers 8 times too big.
- Forgetting the one-third for cones and pyramids.
- Using outside dimensions when you need inside capacity, for example with thick-walled tanks and planters.
Tools used
- Volume Calculator
- Pool Volume Calculator
- Volume Converter
- Cubic Yard Calculator
- Mulch Calculator
- Concrete Calculator
- Surface Area Calculator
Toolverse is a free collection of online tools in one place: calculators, converters, PDF, image, text and developer tools. No signup required.
Frequently asked questions
How do you calculate volume?
For boxes, multiply length × width × height. For cylinders, multiply π × radius² × height. For other shapes, use the matching formula: sphere (4/3)πr³, cone (1/3)πr²h, pyramid (1/3) × base area × height.
How do I convert cubic feet to gallons?
Multiply cubic feet by 7.48. For example, 10 cubic feet holds about 74.8 U.S. gallons. From cubic inches, divide by 231.
How many cubic feet are in a cubic yard?
27, because a cubic yard is 3 ft × 3 ft × 3 ft. Divide cubic feet by 27 to get cubic yards.
What is the volume of a cylinder?
V = π × r² × h. A cylinder with a 2 ft radius and 5 ft height holds about 62.8 cubic feet.
How do I find the volume of an irregular object?
Break it into simple shapes and add their volumes, or submerge it in water and measure how much the water rises. 1 milliliter of displaced water equals 1 cubic centimeter.
What is the difference between volume and capacity?
Volume is the space an object takes up; capacity is how much a container can hold. For thin containers they are nearly the same; for thick walls, measure the inside.
Volume formulas with examples
How to use it
- Identify the shape.
- Measure each dimension in the same unit.
- Plug the numbers into the shape's formula.
- Write the answer in cubic units, such as cubic feet.
More questions
How do I find the volume of a box?
Multiply length × width × height. A 2 ft × 3 ft × 4 ft box holds 24 cubic feet.
What is the volume of a cylinder?
V = π × r² × h, where r is the radius and h is the height.
How do I turn cubic feet into gallons?
Multiply by about 7.48, since one cubic foot holds about 7.48 US gallons.
Related tools: Volume Calculator, Cubic Yard Calculator, Area Calculator.