How to Calculate Volume: Formulas for a Box, Cylinder, Cone and Sphere

CodexFuse Team · 2026-11-06T04:09:28.223Z · 17 min read min read

How to Calculate Volume: Formulas for a Box, Cylinder, Cone and Sphere

Learning how to calculate volume comes down to one idea: volume is the amount of three-dimensional space a shape takes up, and you find it by multiplying the area of its base by its height. This guide covers the four shapes you will meet most often — a box, a cylinder, a cone and a sphere — with the exact volume formula for each and a worked example you can follow step by step. If you would rather skip the arithmetic, the free volume calculator does the same maths for you in one click.

The same four formulas show up everywhere, from school homework to shipping boxes, fish tanks and concrete orders. They also sit behind bigger questions, such as how much storage a VPS hosting plan really gives you, which is why this guide keeps the maths plain and the units honest. Every number below is worked out in full, so you can check it the same way you would check the output of a SHA-256 hash generator — by running the steps yourself.

By the end you will know the volume formula for each shape, how to find volume when a measurement is missing, and how to convert the answer into litres or gallons. The worked examples use centimetres and the number 3.14 for pi, with the full-pi result beside each one so you can see the difference.

What Is Volume, and How Do You Calculate It?

Volume is the amount of space inside a three-dimensional object, measured in cubic units such as cubic centimetres (cm³), cubic metres (m³) or cubic feet (ft³). To calculate volume, multiply the area of the shape's base by its height. The volume formula for a box, a cylinder, a cone and a sphere all follow from that one rule, with one exception for shapes that taper to a point.

Length tells you how far, area tells you how much surface, and volume tells you how much fits inside. That is why volume is always in cubic units: three directions multiplied together give a cube of the unit. A box measured in centimetres gives cubic centimetres, and the same box measured in inches gives cubic inches.

ShapeVolume formulaWhat to measure
Box (rectangular prism)V = l × w × hlength, width, height
CylinderV = πr²hradius of the base, height
ConeV = (1/3)πr²hradius of the base, height
SphereV = (4/3)πr³radius

The table above is the whole guide in one place, and the sections below work through each row with a real example. Keep it open while you work: once you know which row your shape belongs to, the rest is measuring and multiplying. The formulas themselves come from standard references — LibreTexts, BYJU'S and Mathwords all state the same four, and the sources section at the end lists them.

How Do You Calculate Volume in 5 Steps?

  1. Name the shape. A box, cylinder, cone or sphere each has its own formula, so identifying the shape first stops you using the wrong one.
  2. Write down the formula for that shape. Copy it from the table above before you touch any numbers.
  3. Measure what the formula asks for. A box needs length, width and height; a cylinder and a cone need a radius and a height; a sphere needs only a radius.
  4. Check that every measurement uses the same unit. Convert centimetres to metres, or inches to feet, before you multiply anything.
  5. Multiply, then label the answer in cubic units. A number without cm³, m³ or ft³ after it is not a finished volume.

Work through the list in order and the answer checks itself. The most common error is step 4: mixing centimetres with metres, or inches with feet, before multiplying.

What Is the Volume Formula for a Box?

The volume of a box is length × width × height, written V = l × w × h. A box is a rectangular prism, so its base is a rectangle and the base area is length × width. Multiply that area by the height and you have the volume.

Take a box 5 cm long, 4 cm wide and 3 cm high. Multiply 5 × 4 × 3 and the volume is 60 cubic centimetres — 5 × 4 × 3 is 60 cubic centimetres, and the unit is cm³ because all three measurements were in centimetres. The same three numbers in metres give 60 cubic metres, which shows why the unit label matters as much as the number.

The same rule works for a cube, where all three sides are equal. A cube with a 5 cm side has a volume of 5 × 5 × 5, which is 125 cm³. Indeed's guide gives a bigger box example: a shoebox 14 inches long, 6 inches wide and 4 inches deep works out to 14 × 6 × 4, which is 336 cubic inches.

Shipping a box uses the outside measurements, while storing things inside it uses the inside measurements. Cursa's storage guide makes the same distinction: most storage problems involve a box shape, and the measurements you pick decide whether the answer is the space a carton takes up or the space it holds.

How Do You Find the Volume of a Cylinder?

The volume of a cylinder is π × radius² × height, written V = πr²h. The base is a circle, so its area is πr², and multiplying by the height stacks that circle up the length of the cylinder. The cylinder is the only shape in this guide where the base area itself needs pi.

Take a cylinder with a radius of 3 cm and a height of 10 cm. Square the radius first — 3² is 9 — then multiply by pi and by the height: 90π is about 282.74 cubic centimetres with full pi, and 282.6 cubic centimetres when you use 3.14 for pi. The 282.6 figure matches Algonova's worked example for the same cylinder, which also starts from a base area of 28.26 cm².

A second check comes from Mathwords, whose cylinder with a radius of 5 cm and a height of 12 cm works out to 300π, which is about 942.48 cubic centimetres. Both examples follow the same three moves: square the radius, multiply by pi, multiply by the height. K12 LibreTexts adds a smaller one — a cylinder with a radius of 2 inches and a height of 7 inches holds about 87.92 cubic inches.

Always use the radius, not the diameter, in the cylinder formula — the diameter is twice the radius, and squaring the diameter instead of the radius makes the answer four times too big. If you only know the diameter, halve it first and then square the result.

What Is the Volume of a Sphere?

The volume of a sphere is (4/3) × π × radius³, written V = (4/3)πr³. A sphere has no flat base and no height, so the formula cubes the radius and scales it by four-thirds of pi. The 4/3 factor is part of the geometry of a ball, not a rounding choice.

Take a sphere with a radius of 6 cm. Cube the radius first — 6³ is 216 — then multiply by 4/3 and by pi: 288π is about 904.78 cubic centimetres with full pi, and 904.32 cubic centimetres with pi as 3.14. LibreTexts works the same sphere and gets 904.32 cubic centimetres, and Indeed's guide rounds the same example to about 904 cubic centimetres.

A cube with a 12 cm side — the box the sphere fits inside — holds 1,728 cm³, while the sphere holds about 904.78 cm³. The sphere fills just over half of its box, about 52 percent, which is exactly what the 4/3 factor predicts. That comparison is a useful sense-check: if your sphere answer is bigger than its box, something went wrong.

What Is the Volume of a Cone?

The volume of a cone is (1/3) × π × radius² × height, written V = (1/3)πr²h. A cone is a cylinder that tapers to a point, so it holds exactly one third of the cylinder with the same base and height. The 1/3 factor is the only difference between the two formulas.

Take a cone with a radius of 4 cm and a height of 9 cm. Square the radius — 4² is 16 — multiply by the height to get 144, then take one third and multiply by pi: 48π is about 150.80 cubic centimetres with full pi, and 150.72 cubic centimetres with pi as 3.14. Math-Ease gives 150.7964 cubic centimetres for the same cone, which matches the full-pi result.

The one-third factor applies to every solid that tapers to a point, not just cones — a pyramid takes one third of the prism with the same base and height, which is why the pyramid formula is V = (1/3)Bh. Mathwords puts it plainly: you can fill a cone with water exactly three times to fill a cylinder of the same base and height.

Forgetting the one third is the most common cone mistake. Without it, the same cone would come out at about 452.39 cubic centimetres — three times the true volume — because 144π is three times 48π. Indeed's cone example shows the right scale: a cone with a radius of 8 cm and a height of 10 cm holds about 670.21 cubic centimetres.

How Do You Convert Cubic Units to Litres and Gallons?

A volume answer is only useful in the unit the job needs, so convert at the end. The two conversions worth memorising are 1 cubic metre equals 1,000 litres, and 1 cubic foot is about 7.48 US gallons. Everything else in the table below follows from those two facts and the definition of a litre.

FromToMultiply by
1 cm³millilitres1
1 m³litres1,000
1 ft³US gallons7.4805
1 litrecm³1,000

The litre conversions are exact by definition: 1 cubic metre is 1,000,000 cubic centimetres, and 1,000,000 cubic centimetres divided by 1,000 is 1,000 litres — a litre is exactly 1,000 cm³. The gallon conversion comes from the sizes of the units themselves: 1,728 divided by 231 is 7.4805, because a cubic foot holds 1,728 cubic inches and a US gallon holds 231 cubic inches.

When the measurements mix imperial and metric units, convert the lengths first and calculate second. An inches to mm converter turns each inch measurement into millimetres before you multiply, which is safer than converting a cubic-inch answer afterwards. The same order applies to any unit pair: fix the lengths, then do the volume.

Convert all measurements to the same unit before you multiply — a box measured as 1 metre by 50 cm by 20 cm is 100 cm by 50 cm by 20 cm, which is 100,000 cm³, not 1,000 cm³. The trap is invisible until you check the units, because the numbers multiply cleanly either way.

How Much Water Does a Tank Hold?

Tank capacity is volume with a practical unit on the end. A rectangular tank is a box, so its volume is length × width × height, and the answer converts straight into litres or gallons. The formula does not change; only the unit at the end does.

The National Wildfire Coordinating Group works a rectangular water tank 5 feet long, 6 feet wide and 8 feet deep: 5 × 6 × 8 is 240 cubic feet, and 240 cubic feet is 1,795 gallons at 7.4805 gallons per cubic foot. The gallon figure is the one the source publishes, so it is the one to quote.

Aquariums are the same problem at a smaller scale. The fish tank volume calculator works out litres and gallons for a tank before you stock it, using the same length × width × height rule with the conversion built in. Measure the inside of the glass, not the outside, or the water figure comes out high.

For a cylindrical tank, use the cylinder formula instead. A tank with a diameter of 4 feet and a height of 6 feet holds about 75.398 cubic feet, which is 564.0 US gallons — the water-tank example from cylindervolumeformula.com. Halve the diameter to a 2-foot radius first, then apply V = πr²h as usual.

What Mistakes Do People Make When Calculating Volume?

MistakeWhat goes wrongFix
Using the diameter as the radiusAnswer comes out 4 times too bigHalve the diameter first
Forgetting the 1/3 for a coneAnswer comes out 3 times too bigMultiply tapering solids by 1/3
Mixing unitscm × m gives a meaningless numberConvert all lengths to one unit first
Using 3.14 and expecting full-pi precisionSecond decimal differs (904.32 vs 904.78)Say which pi you used
Reporting area unitscm² instead of cm³Label the answer in cubic units

The diameter mistake is the quietest, because the working looks right until the end. Halving the diameter before you square it is a one-second check that saves a four-times error. The same care applies to the cone: the 1/3 factor is easy to drop and triples the answer.

The number 3.14 gives school-style answers, while full pi gives precise answers — the sphere example shows the gap, 904.32 against 904.78 cubic centimetres, so always say which value of pi you used. For homework, 3.14 is usually what the teacher expects; for a tank or a concrete order, use the full value.

How Do You Calculate the Volume of an Irregular Shape?

No formula covers a rock, a toy or a crumpled object, so measure its volume by water displacement. Fill a measuring container to a marked level, lower the object in, and read the new level — the rise in the water equals the volume of the object. The method works because the object pushes aside exactly its own volume of water.

Mathwords describes the same method: submerge the object and measure how much the water level rises, because the displaced volume equals the object's volume. Read the level at eye height and at the bottom of the meniscus, and the reading is as good as a formula answer for most household objects.

Water displacement measures volume only if the object sinks fully and does not absorb water — a floating object displaces only the part below the surface, and a sponge soaks up water instead of pushing it aside. For a floating object, push it gently under with a thin rod and subtract the rod's own small displacement if precision matters.

Where Is Volume Used in Everyday Life?

Volume turns up wherever something is filled, shipped or poured. Shipping companies charge by the size of the carton, builders order concrete by the cubic metre, and cooks convert recipe quantities between cups and litres. The formula is the same in each case; only the unit changes.

Cursa's guide lists the same spread: shipping cartons, drawers, bins, closets, refrigerators and aquariums are all box problems, and concrete and bulk materials are priced by volume. A tank's capacity, a pool's water and a moving van's load are the same calculation with different units. Mathwords adds cooking and engineering to the list, from recipe quantities to sizing tanks.

The habit that ties them together is measuring twice and converting once. Write the measurements down, check the units match, and the formula does the rest — whether the answer is a homework number or a concrete order.

How Can You Check Your Answer Quickly?

A short script checks all four worked examples at once, so you can compare its output with your hand calculation. The code below uses Python's math module and prints each volume in cubic centimetres.

ShapeMeasurementsWorkingVolume
Box5 × 4 × 3 cm5 × 4 × 360 cm³
Cylinderr = 3 cm, h = 10 cmπ × 3² × 10 = 90π282.74 cm³
Spherer = 6 cm(4/3) × π × 6³ = 288π904.78 cm³
Coner = 4 cm, h = 9 cm(1/3) × π × 4² × 9 = 48π150.80 cm³
import math

box = 5 * 4 * 3
cylinder = math.pi * 3 ** 2 * 10
sphere = (4 / 3) * math.pi * 6 ** 3
cone = (1 / 3) * math.pi * 4 ** 2 * 9

print("Box:", box, "cm³")
print("Cylinder:", round(cylinder, 2), "cm³")
print("Sphere:", round(sphere, 2), "cm³")
print("Cone:", round(cone, 2), "cm³")

Running it prints 60, 282.74, 904.78 and 150.8 — the same four answers as the worked examples above. If your hand calculation disagrees, re-check the radius, the one-third factor and the units before doubting the formula.

For a one-off number, the volume calculator on this site does the same job without code. Either way, the check is the same: the formula, the measurements and the units all have to agree.

Sources

  • Mathematics LibreTexts — "Solid Geometric Figures and Objects" — https://math.libretexts.org/Courses/Rio_Hondo/Math_150%3A_Survey_of_Mathematics/06%3A_Measurement_and_Geometry/6.02%3A_Geometry/6.2.03%3A_Solid_Geometric_Figures_and_Objects — box, cylinder, cone and sphere formulas with worked examples.
  • BYJU'S — "Volume Formulas" — https://byjus.com/volume-formulas/ — formula table for cuboid, cylinder, sphere, pyramid and cone.
  • Mathwords — "Volume Formulas: Cube, Cylinder, Cone, Sphere & Prism" — https://www.mathwords.com/v/volume.htm — key formula summary, worked cylinder and cone examples, water-displacement method.
  • NASA Glenn Research Center — "Volume" — https://www.grc.nasa.gov/www/k-12/BGP/volume.html — sphere, cylinder, prism and cone formulas in diameter form.
  • K12 LibreTexts — "Volume of Cylinders" — https://k12.libretexts.org/Bookshelves/Mathematics/Geometry/09%3A_Solid_Figures/9.20%3A_Volume_of_Cylinders — cylinder formula with worked examples.
  • Indeed — "6 Ways To Calculate the Volume (With Examples)" — https://www.indeed.com/career-advice/career-development/how-to-calculate-volume — six shapes with worked examples.
  • Algonova — "Cylinder Volume: Formula and How to Calculate It" — https://algonova.com/lat/en/matematika/volumen-del-cilindro — cylinder worked example, radius 3 cm, height 10 cm.
  • calculatnow — "Volume Calculator: Cylinder, Cone, Sphere and More" — https://www.calculatnow.com/math/volume-calculator — 1 m³ = 1,000 litres; 1 ft³ ≈ 7.48 US gallons.
  • cylindervolumeformula.com — "Cylinder Volume Formula: V = πr²h" — https://cylindervolumeformula.com/ — water-tank example; 1 ft³ = 7.48052 US gallons.
  • National Wildfire Coordinating Group — "Volume or Capacity" — https://www.nwcg.gov/course/ffm/squirt-water/31-volume-or-capacity — rectangular tank 5 × 6 × 8 ft = 240 ft³ = 1,795 gallons.
  • Cursa — "Volume Without Fear: Boxes, Storage, Concrete, and Liquid Capacity" — https://cursa.app/en/page/volume-without-fear-boxes-storage-concrete-and-liquid-capacity — box-shaped storage and concrete uses.
  • calculators.im — "Complete Guide to Calculating Volume of 3D Shapes" — https://calculators.im/blog/complete-guide-to-calculating-volume-of-3d-shapes-formulas-examples — formula guide with worked examples.

Frequently Asked Questions

What is the formula for volume?

The volume formula depends on the shape: a box uses V = l × w × h, a cylinder uses V = πr²h, a cone uses V = (1/3)πr²h, and a sphere uses V = (4/3)πr³. All four come from the same rule — base area times height — with the one-third factor added for solids that taper to a point.

How do you find the volume of a box?

Multiply its length, width and height together: V = l × w × h. A box 5 cm long, 4 cm wide and 3 cm high has a volume of 60 cubic centimetres, because 5 × 4 × 3 is 60. Measure the inside dimensions if you want what the box holds, and the outside dimensions if you want the space it takes up.

How do you calculate volume in litres?

Calculate the volume in cubic centimetres first, then divide by 1,000 — 1 litre is exactly 1,000 cm³. A box of 60,000 cm³ holds 60 litres, and a cubic metre holds 1,000 litres. For US gallons, divide cubic feet by 7.4805 instead.

What is the difference between volume and surface area?

Volume measures the space inside a shape in cubic units, while surface area measures the outside skin in square units. A box 5 × 4 × 3 cm has a volume of 60 cm³ and a surface area of 94 cm² — the two numbers answer different questions, so check which one the job needs.

Why do cones and pyramids have 1/3 in their formulas?

A cone or pyramid tapers to a point, so it fills exactly one third of the prism or cylinder with the same base and height. You can prove it with water: a cone fills exactly three times to fill its matching cylinder. That is why the cone formula is V = (1/3)πr²h and the pyramid formula is V = (1/3)Bh.

Featured on Twelve Tools Hunt for Tools Featured on LaunchBuff Launch Llama Tools Launch your MCP Top Web Development Companies in the US - OnToplist.com Designer Listings Listed on SeeWhatNewAI Featured on SubmitMySaas