How to Calculate Volume: Formulas for Every Shape

Learn how to calculate volume for cubes, boxes, cylinders, spheres, cones, pyramids and prisms, convert to liters and gallons, and apply it to pools, concrete and tanks.
Table of Contents 20 sections
- What is volume?
- The general rule: base area times height
- How to calculate the volume of a cube
- How to calculate the volume of a rectangular prism or box
- How to calculate the volume of a cylinder
- How to calculate the volume of a sphere
- How to calculate the volume of a cone
- How to calculate the volume of a pyramid
- How to calculate the volume of a triangular prism
- How to calculate the volume of a frustum, capsule or pipe
- How to calculate volume in liters and gallons
- How to calculate volume from mass and density
- How to calculate the volume of an irregular object
- How to calculate volume for real projects
- Volume in science and health
- How to calculate volume in Excel
- Common mistakes
- Practice problems
- How to use this guide
- Frequently asked questions
Volume tells you how much space a three-dimensional object fills, or how much a container can hold. Knowing how to calculate volume helps with homework, but it is just as useful at home: filling a pool or fish tank, ordering concrete or soil, comparing storage boxes or checking a recipe. This guide covers the formula for every common shape, explains the units, and works through real examples step by step.
What is volume?
Volume is measured in cubic units because it has three dimensions: length, width and height. One cubic centimeter (cm³) is the space inside a cube 1 cm on each side. If you can fit 24 such cubes into a box, its volume is 24 cm³. For liquids, capacity units such as liters, milliliters and gallons are more common. One liter is exactly 1,000 cm³.
The general rule: base area times height
For any prism or cylinder (a shape with the same cross-section all the way through), the volume is the area of the base multiplied by the height:
For any shape that comes to a point (a cone or pyramid), the volume is one third of that:
Once you understand these two rules, most volume formulas follow naturally.
How to calculate the volume of a cube
A cube has equal length, width and height, so its volume is the edge length cubed.
For related numbers, try the Slope Calculator, Ratio Calculator and Fraction Calculator.
Example: a cube-shaped storage bin with 40 cm edges. V = 40 x 40 x 40 = 64,000 cm³ = 64 liters.
How to calculate the volume of a rectangular prism or box
- Measure the length, width and height in the same unit.
- Multiply the three numbers.
- Write the answer in cubic units.
Example: a box 50 cm long, 30 cm wide and 20 cm high holds 50 x 30 x 20 = 30,000 cm³, which is 30 liters. This is also how you calculate the volume of a rectangle-shaped room, a raised garden bed or a rectangular pool.
Volume starts with area. Learn the first step in how to calculate square footage or use the Square Footage Calculator.
How to calculate the volume of a cylinder
The base of a cylinder is a circle with area πr². Multiply by the height:
- Measure the diameter and divide by 2 to get the radius.
- Square the radius (multiply it by itself).
- Multiply by π (about 3.1416).
- Multiply by the height.
Example: a can 8 cm across and 12 cm tall. r = 4 cm. V = 3.1416 x 16 x 12 = 603.2 cm³, or about 603 mL.
Example in feet and gallons: a round tank 4 feet across and 5 feet tall. r = 2 ft. V = 3.1416 x 4 x 5 = 62.83 ft³. Multiply by 7.48 to get 470 US gallons.
How to calculate the volume of a sphere
Example: a basketball has a diameter of about 24 cm, so r = 12 cm. V = 4/3 x 3.1416 x 1,728 = 7,238 cm³, about 7.2 liters. For a hemisphere such as a dome or bowl, halve the result: V = 2/3 x π x r³.
How to calculate the volume of a cone
Example: a pile of gravel is roughly a cone 10 feet across at the base and 4 feet high. r = 5 ft. V = 1/3 x 3.1416 x 25 x 4 = 104.7 ft³, which is 3.88 cubic yards.
How to calculate the volume of a pyramid
For a rectangular base, the base area is length x width. Example: a pyramid with a 9 x 9 m base and a height of 12 m has a volume of 1/3 x 81 x 12 = 324 m³. The height must be the vertical height from the base to the tip, not the slanted edge.
How to calculate the volume of a triangular prism
- Find the area of the triangle at one end: half the base times its height.
- Multiply by the length of the prism.
Example: a doorstop wedge has a triangular end with a 6 cm base and 3 cm height, and it is 4 cm wide. V = 1/2 x 6 x 3 x 4 = 36 cm³.
How to calculate the volume of a frustum, capsule or pipe
Some everyday objects combine or cut basic shapes. A frustum, the shape of a bucket or flowerpot, is a cone with its tip removed: V = 1/3 x π x h x (R² + R x r + r²), where R and r are the bottom and top radii. A bucket 30 cm across at the top, 24 cm across at the base and 36 cm tall holds 1/3 x 3.1416 x 36 x (225 + 180 + 144) = 20,697 cm³, about 20.7 liters. A capsule is a cylinder with a hemisphere on each end, so add the cylinder volume to one full sphere. For the wall of a pipe, subtract the inner cylinder from the outer one: V = π x (R² - r²) x length.
How to calculate volume in liters and gallons
| If your volume is in | To get liters | To get US gallons |
|---|---|---|
| cm³ | divide by 1,000 | divide by 3,785.4 |
| m³ | multiply by 1,000 | multiply by 264.17 |
| in³ | multiply by 0.016387 | divide by 231 |
| ft³ | multiply by 28.317 | multiply by 7.4805 |
| yd³ | multiply by 764.55 | multiply by 201.97 |
How to calculate volume from mass and density
If you know how heavy something is and what it is made of, divide mass by density:
Example: a block of aluminum weighs 540 g. Aluminum's density is 2.70 g/cm³. V = 540 / 2.70 = 200 cm³. Rearranged, density = mass / volume and mass = density x volume, which is the basis of many science problems.
How to calculate the volume of an irregular object
Use water displacement. Fill a measuring container partway, note the level, submerge the object fully and note the new level. The difference is the object's volume. If the water rises from 400 mL to 465 mL, the object has a volume of 65 mL, or 65 cm³. For an irregular container, fill it with a measured amount of water.
How to calculate volume for real projects
Pool volume
Rectangular: length x width x average depth x 7.48 = gallons. Round: 3.14 x radius² x average depth x 7.48. Oval: 3.14 x half the length x half the width x average depth x 7.48. A 16 x 32 foot pool with an average depth of 5 feet holds 16 x 32 x 5 x 7.48 = 19,150 gallons.
Concrete
Convert all measurements to feet (inches divided by 12), multiply length x width x thickness, then divide by 27 for cubic yards. A 24 x 4 foot sidewalk 4 inches thick: 24 x 4 x 0.333 = 32 ft³ = 1.19 yd³. Add 10 percent for waste.
Mulch and soil
A 3-inch layer of mulch over 200 square feet needs 200 x 0.25 = 50 ft³, or 1.85 cubic yards. Mulch bags are usually 2 cubic feet, so that is 25 bags.
Moving and storage
Add up the volume of your boxes to choose a truck or storage unit. A 10 x 10 foot unit with an 8-foot ceiling has 800 cubic feet of space, though in practice you can fill about 70 to 80 percent of it.
Volume in science and health
Some searches for "how to calculate volume" are about biology rather than geometry. Stroke volume is the amount of blood the heart pumps per beat: end-diastolic volume minus end-systolic volume, typically 60 to 100 mL at rest. Cardiac output is stroke volume times heart rate. Tidal volume is the air moved in a normal breath, roughly 500 mL for an adult, and minute ventilation is tidal volume times breaths per minute. These are measured clinically rather than with a geometry formula.
How to calculate volume in Excel
With length, width and height in A2, B2 and C2, use =A2*B2*C2. For a cylinder with radius in A2 and height in B2, use =PI()*A2^2*B2. For a sphere, =4/3*PI()*A2^3. To convert cubic feet to gallons, multiply by 7.48052.
Common mistakes
- Using the diameter instead of the radius.
- Mixing units, such as feet for length and inches for depth.
- Using the slant height of a cone or pyramid instead of the vertical height.
- Writing square units instead of cubic units.
- Forgetting the 1/3 for cones and pyramids.
Practice problems
- Box 8 x 5 x 3 in. Answer: 120 in³.
- Cylinder r = 5 cm, h = 10 cm. Answer: 785.4 cm³.
- Sphere r = 3 m. Answer: 113.1 m³.
- Cone r = 3 ft, h = 7 ft. Answer: 65.97 ft³.
- Cube a = 1.5 m. Answer: 3.375 m³, or 3,375 liters.
Check any shape instantly with the volume calculator, which also converts the result to liters, gallons and cubic yards.
How to use this guide
Work through the steps in order with your own numbers, writing each result down as you go, then check your answer against the matching calculator on this site. If your hand calculation and the calculator disagree, the usual culprits are unit conversions, rounding, and a percentage typed as a whole number instead of a decimal. The examples are illustrations, not recommendations, and your situation may call for different assumptions. For important financial or health decisions, confirm your plan with a licensed professional who knows your circumstances. This article is reviewed periodically and was last updated in November 2026.
Frequently asked questions
How do you calculate volume?
Multiply length x width x height for a box. For other shapes, multiply the base area by the height (prisms and cylinders) or by one third of the height (cones and pyramids).
How do you calculate the volume of a cylinder?
V = πr²h. Square the radius, multiply by 3.1416, then multiply by the height.
How do you calculate the volume of a cube?
Multiply the edge length by itself three times. A 5 cm cube is 125 cm³.
How do you calculate volume in liters?
Calculate the volume in cubic centimeters and divide by 1,000, or in cubic meters and multiply by 1,000.
How do you calculate volume from density and mass?
Divide mass by density. 200 g of a material with density 4 g/cm³ has a volume of 50 cm³.
How do you find the volume of a triangular prism?
Multiply half the triangle's base by its height to get the end area, then multiply by the prism's length.
Volumes are calculated from ideal geometric shapes. Real tanks, pools and containers have wall thickness, rounded corners and fittings, so measure inside dimensions and allow a margin when ordering materials.

About the author
Sawera Shahid is the founder and lead writer of Calculators360. She builds the site's free online calculators and writes clear, step-by-step guides on finance, math and health, with every formula explained and worked examples you can check by hand.



