molecalculator

Moles & Molar Mass

How to Calculate Volume Formula: Step-by-Step Guide

Calculator No. 01-7459 · Updated · Formula and assumptions shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

This guide explains how to calculate the volume of common three-dimensional shapes using their standard formulas. You will learn the formulas for a cube, rectangular prism, cylinder, sphere, and cone, with step-by-step instructions and worked examples. No prior knowledge is needed—just basic arithmetic (multiplication, division, and using pi).

Formula

The volume of a shape is the amount of three-dimensional space it occupies, measured in cubic units (e.g., cm³, m³, in³). Here are the standard formulas:

  • Cube: V = a³, where a is the edge length.
  • Rectangular prism (box): V = l × w × h, where l is length, w is width, and h is height.
  • Cylinder: V = π × r² × h, where r is the radius of the circular base and h is the height.
  • Sphere: V = (4/3) × π × r³, where r is the radius.
  • Cone: V = (1/3) × π × r² × h, where r is the radius of the base and h is the height (perpendicular to the base).

All volumes are expressed in cubic units. If you measure in centimeters, the volume is in cubic centimeters (cm³); in meters, it is cubic meters (m³).

Worked Example

Using the default values from the calculator above:

  1. Cube: a = 5 cm → V = 5³ = 125 cm³.
  2. Rectangular prism: l = 10 cm, w = 4 cm, h = 3 cm → V = 10 × 4 × 3 = 120 cm³.
  3. Cylinder: r = 2 cm, h = 7 cm → V = π × 2² × 7 = π × 4 × 7 = 28π ≈ 87.96 cm³ (rounded to 2 decimals).
  4. Sphere: r = 3 cm → V = (4/3) × π × 3³ = (4/3) × π × 27 = 36π ≈ 113.10 cm³.
  5. Cone: r = 2 cm, h = 6 cm → V = (1/3) × π × 2² × 6 = (1/3) × π × 4 × 6 = 8π ≈ 25.13 cm³.

These match the calculator outputs exactly.

Assumptions

  • All shapes are perfect geometric solids (e.g., a perfectly round sphere, a right circular cylinder).
  • Dimensions are measured in the same unit; if not, convert them first.
  • For cones and cylinders, the height is measured perpendicular to the base, not along the slanted side.

Step-by-Step

What You’ll Need

  • A ruler, tape measure, or calipers to measure dimensions.
  • A calculator (or use the built-in calculator above).
  • Pen and paper to note measurements and calculations.

General Steps

  1. Identify the shape. Determine which geometric solid you are working with: cube, rectangular prism, cylinder, sphere, or cone. Each has a different formula.
  2. Measure the required dimensions. Use your measuring tool to get the necessary lengths. For a cube, measure one edge. For a rectangular prism, measure length, width, and height. For a cylinder or cone, measure the radius of the base (half the diameter) and the height. For a sphere, measure the radius (half the diameter).
  3. Ensure consistent units. Convert all measurements to the same unit before calculating. For example, if you have 2 meters and 50 centimeters, convert 50 cm to 0.5 m or 2 m to 200 cm.
  4. Write down the formula. For example, for a cylinder, write V = πr²h.
  5. Plug in the numbers. Substitute your measured values into the formula. For a cylinder with radius 2 cm and height 7 cm: V = π × (2)² × 7.
  6. Perform the arithmetic. Follow the order of operations: square the radius first, multiply by pi, then multiply by the height. For a cube, cube the edge length (a × a × a). For a sphere, cube the radius, multiply by π, then multiply by 4/3.
  7. Include the cubic unit. Write the result with the appropriate cubic unit, such as cm³, m³, or in³. If you used centimeters, the volume is in cubic centimeters.

Common Mistakes

  • Using diameter instead of radius: For circles, the radius is half the diameter. If you measure the diameter, divide by 2 before using the formula.
  • Mixing units: If you measure length in meters and width in centimeters, your volume will be wrong. Always convert to one unit first.
  • Forgetting to cube for spheres: The sphere formula uses r³, not r². Squaring instead of cubing gives a much smaller (and incorrect) volume.
  • Using slanted height for a cone: The formula requires the perpendicular height, not the slant height. If you only have the slant height, you need the Pythagorean theorem to find the perpendicular height.
  • Rounding too early: If you round π to 3.14 before multiplying, you might get a slightly different answer. Use the π button on your calculator for accuracy.

Tips

  • Use the calculator above to check your work quickly.
  • For irregular shapes, you can use water displacement: submerge the object in a graduated cylinder and measure the volume of water displaced.
  • When measuring a cylinder, measure the diameter at the widest point and divide by 2 to get the radius.
  • If you need the volume in liters, remember that 1 liter = 1000 cm³.

Troubleshooting

  • Your result seems too large or too small: Check that you used the correct formula and that all units match. For example, if you measure in centimeters but want liters, divide by 1000.
  • You get a negative number: This should not happen with positive dimensions. Ensure you did not accidentally enter a negative value.
  • The calculator shows “Cannot compute”: This occurs if you enter a value outside the allowed range (e.g., a negative radius). Enter positive numbers.
  • You are unsure about the shape: If the object is not a perfect geometric solid, you may need to break it into simpler shapes and add their volumes. For example, a cylinder with a cone on top can be treated as two separate volumes.

Frequently Asked Questions

What is the formula for the volume of a cube?

The volume of a cube is V = a³, where a is the length of one edge. For example, a cube with edges of 3 cm has a volume of 27 cm³.

How do I find the volume of a cylinder?

Use V = πr²h, where r is the radius of the circular base and h is the height. For a cylinder with radius 2 cm and height 5 cm, V = π × 4 × 5 ≈ 62.83 cm³.

What is the difference between volume and surface area?

Volume measures the space inside a 3D object, in cubic units. Surface area measures the total area of all the faces, in square units. For a cube with edge 2 cm, volume is 8 cm³ and surface area is 24 cm².

Can I use the same formula for any prism?

For any prism (including rectangular, triangular, or hexagonal), the volume is the area of the base multiplied by the height. For a rectangular prism, the base area is l × w, so V = l × w × h.

How do I convert cubic centimeters to liters?

1 liter = 1000 cm³. Divide the volume in cm³ by 1000 to get liters. For example, 2500 cm³ = 2.5 liters.

Why is the volume of a cone one-third of a cylinder’s volume?

Because a cone with the same base and height as a cylinder holds exactly one-third of the cylinder’s volume. This can be proven by calculus or by experimenting with water.

Related

Formula used
in a | Edge length (a) | cm | 5 | 0
in l | Length | cm | 10 | 0
in w | Width | cm | 4 | 0
in h | Height | cm | 3 | 0
in r | Radius | cm | 2 | 0
in hc | Cylinder height | cm | 7 | 0
in hs | Sphere radius | cm | 3 | 0
in rc | Cone radius | cm | 2 | 0
in hco | Cone height | cm | 6 | 0
out vcube | Cube volume | cm³ | a^3 | 2
out vrect | Rectangular prism volume | cm³ | l * w * h | 2
out vcyl | Cylinder volume | cm³ | pi * r^2 * hc | 2
out vsphere | Sphere volume | cm³ | (4/3) * pi * hs^3 | 2
out vcone | Cone volume | cm³ | (1/3) * pi * rc^2 * hco | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →