Volume formulas, worked examples and unit conversions
What is volume?
Volume measures the three-dimensional space occupied by an object or enclosed by a container. A cubic centimeter (cm³) is the space in a cube with 1 cm edges. Unlike length or surface area, volume uses three dimensions, so its units are cubed. This online volume calculator evaluates nine ideal geometric solids; it does not measure an irregular object from a photograph.
How to calculate volume with these cards
- Find the card that matches your object. A box is a rectangular prism; a round straight-sided can is a cylinder. The formula sidebar links to each card.
- Measure the labeled dimensions. Use perpendicular height, not a slanted edge. Divide diameter by two when a field asks for radius.
- Select cm, m, in or ft beside each measurement. Mixed units are supported: each length is converted to the selected result unit before the formula is evaluated.
- Choose cm³, m³, in³ or ft³ for the result. Results update as you type valid values or change units. Calculate volume and Enter use the same calculation.
- Review the formula breakdown, then use Copy result if needed. Clear resets that card. An invalid or incomplete entry hides its previous result so it cannot be mistaken for a new calculation.
Changing a dimension’s unit reinterprets the number in that field; it does not rewrite the number. For the same physical length, enter 100 cm or 1 m. Changing only the result unit converts the calculated volume.
Formulas for all nine supported shapes
In these formulas, π is pi. All lengths must be expressed in a common unit before arithmetic. Each arrow in the card identifies the corresponding dimension.
| Shape | Volume formula | Measurements and constraints |
|---|---|---|
| Cube | V = a³ | a is one edge; all edges are equal. |
| Rectangular prism (box) | V = l × w × h | Length, width and height are perpendicular. |
| Cylinder | V = πr²h | r is the circular base radius; h is perpendicular height. |
| Sphere | V = 4πr³ / 3 | r runs from the center to the surface. |
| Cone | V = πr²h / 3 | Use base radius and perpendicular height, not slant height. |
| Conical frustum | V = πh(R² + Rr + r²) / 3 | R and r are the bottom and top radii of parallel circular ends. Either may be larger. |
| Ellipsoid | V = 4πabc / 3 | a, b and c are semi-axes: half the three full axis lengths. |
| Spherical cap | V = πh²(3R − h) / 3 | R is the parent sphere radius, not the cap’s base radius. Cap height h must not exceed 2R. |
| Tube | V = πh(R² − r²) | R is outer radius, r is inner radius, and h is length. Require r < R. This is material volume, excluding the hollow center. |
Verified examples: substitute dimensions, then calculate
Each example below uses centimeters throughout and produces cubic centimeters. Results with π are rounded only at the end.
- Cube: a = 10. Square the edge, then multiply by it again: 10 × 10 × 10 = 1,000.00 cm³.
- Box: l = 2, w = 3, h = 4. Base area is 2 × 3 = 6 cm²; multiply by height: 6 × 4 = 24.00 cm³.
- Cylinder: r = 2, h = 3. Base area is 4π cm²; volume is 4π × 3 = 12π ≈ 37.70 cm³.
- Sphere: r = 2. Cube the radius to get 8; multiply by 4π/3: 32π/3 ≈ 33.51 cm³.
- Cone: r = 2, h = 3. Compute the matching cylinder volume, 12π, then divide by 3: 4π ≈ 12.57 cm³.
- Frustum: R = 3, r = 1, h = 6. The radius expression is 9 + 3 + 1 = 13; π × 6 × 13 / 3 = 26π ≈ 81.68 cm³.
- Ellipsoid: a = 2, b = 3, c = 4. Multiply the semi-axes to get 24; 4π × 24 / 3 = 32π ≈ 100.53 cm³.
- Spherical cap: R = 3, h = 1. Calculate h² = 1 and 3R − h = 8; π × 1 × 8 / 3 ≈ 8.38 cm³.
- Tube: R = 3, r = 2, h = 5. Subtract squared radii: 9 − 4 = 5; π × 5 × 5 = 25π ≈ 78.54 cm³ of material.
Metric and US customary volume units
The result selector supports cubic centimeters, cubic meters, cubic inches and cubic feet. Liters and gallons are explained here for interpreting capacity; they are not additional result-selector options. A US liquid gallon is different from an Imperial gallon or a US dry gallon. Specify which gallon you mean.
| Starting unit | Equivalent volume |
|---|---|
| 1 m³ | 1,000,000 cm³ = 1,000 liters |
| 1 liter | 1,000 cm³ = 0.001 m³ |
| 1 in³ | 16.387064 cm³ |
| 1 ft³ | 1,728 in³ = 0.028316846592 m³ = 28.316846592 liters |
| 1 US liquid gallon | 231 in³ = 3.785411784 liters |
To convert cubic units, cube the length conversion factor: 1 ft = 12 in, so 1 ft³ = 12³ = 1,728 in³, not 12 in³. To express liters as US liquid gallons, divide by 3.785411784; 10 liters is approximately 2.64172 US liquid gallons. Conversion references: NIST tables of units.
Cubic feet and cubic meters in practical use
For a rectangular package measuring 60 cm × 40 cm × 30 cm, convert to meters: 0.6 × 0.4 × 0.3 = 0.072 m³. The card displays 0.07 m³ because ordinary results use two decimal places; selecting cm³ shows 72,000.00 cm³. Keep the unrounded value for subsequent arithmetic. Ten identical packages occupy 0.72 m³ before stacking allowances. Use the CBM Shipping Calculator for quantity-based carton totals; volume alone is not a freight quote or dimensional weight.
For a rectangular concrete space 10 ft long, 4 ft wide and 0.5 ft deep, volume is 10 × 4 × 0.5 = 20 ft³. Material orders may need waste or compaction allowances that this geometry tool does not add. Manufacturers can estimate ideal part volume, but mass additionally requires material density. In education, comparing a cone with a cylinder of the same radius and height demonstrates the one-third relationship.
Volume versus surface area, and common mistakes
Volume describes space inside a solid; surface area describes the area of its boundary. A cube with 2 cm edges has volume 8 cm³ and total surface area 6 × 2² = 24 cm². Do not use a volume result to estimate paint coverage. For two-dimensional measurements, see the Area Calculator.
- Entering diameter as radius multiplies a cylinder’s volume by four and a sphere’s by eight.
- Entering full ellipsoid axis lengths instead of semi-axes multiplies its volume by eight.
- External container dimensions include wall thickness. Use internal dimensions for enclosed capacity, and distinguish tube material from the hollow bore.
- Do not add overlapping solids twice when breaking an object into parts. These cards calculate one solid at a time and do not automatically combine components.
- Inputs must be positive and finite. A zero inner tube radius is not accepted; use Cylinder for a solid cylinder. Use Cone rather than a zero-radius frustum endpoint.
These are ideal geometric models, not construction tolerances or safety checks. Rounded displays are not measurement accuracy guarantees. Very small nonzero volumes use scientific notation, such as 1e-6 cm³ for a cube with 0.01 cm edges. Values outside the supported numerical range show a validation message instead of infinity or a misleading zero.
Frequently asked questions
Can I enter different units for different dimensions?
Yes. Each dimension has its own unit selector. A box with length 1 m, width 100 cm and height 100 cm has volume 1.00 m³ when m³ is selected. Make sure each number matches its own selected unit.
How do I use this as a cubic feet calculator?
Choose the correct shape and select ft³ as the result unit. You may enter measurements in inches, feet, centimeters or meters; the card converts lengths before evaluating the formula.
What if I only know diameter?
Halve it before entering a radius. For a 10-inch-diameter cylinder, enter r = 5 in. A spherical cap instead needs the radius of the full sphere, not the radius of its circular cut face.
Does the tube calculator give liquid capacity?
No. It subtracts the hollow cylinder from the outer cylinder to give material volume. To calculate an unobstructed bore’s geometric capacity, use Cylinder with the inner radius and internal length.
Why does changing the displayed unit change my answer?
Changing a dimension unit changes what the typed number means: 2 m is not 2 cm. Changing the result unit changes only the representation of volume. Cubic units use cubed conversion factors.
Can I calculate an irregular object or a partly filled tank?
Only when its geometry matches a supported model. A spherical cap can model the corresponding portion of a sphere, but these cards do not model an arbitrary horizontal tank fill. Divide suitable composite objects into non-overlapping solids and combine unrounded volumes, or use a suitable measurement method.
Further explanations and formula references
Read How to Calculate Volume and Cylinder, Cone and Sphere Volume for geometric comparisons. The Unit Converter provides other supported unit conversions. Formula references: MathWorld’s conical frustum, ellipsoid and spherical cap. Formulas and examples checked November 13, 2026.