Volume Calculator
Find the volume of 13 shapes, from a cube, box or cylinder to a sphere, cone, pyramid, capsule or tube, in any length unit, with results in cubic units, liters and gallons. For precision based on measured dimensions, use the Sig Fig Calculator.
- Formula: V = π × r² × h
- Substitute: V = π × 3² × 5
- Result: V = 141.3717 in³
- Convert: 141.3717 in³ × 0.004329 = 0.612 US gal
- Convert: 141.3717 in³ × 0.0163871 = 2.3167 L
What this calculator does
This is a geometry calculator: it takes the dimensions of a shape and returns its volume, with the working shown and the answer converted to cubic units, liters and gallons. It does not estimate materials, costs, or weights; for those, use the construction calculators in the related list.
Volume formulas
Every supported shape, its volume formula, and an example with all dimensions in centimeters:
| Shape | Formula | Variables | Example |
|---|---|---|---|
| Cube | V = a³ | a = edge length | a = 4 cm → 64 cm³ |
| Rectangular prism (box) | V = l × w × h | l = length, w = width, h = height | l = 2, w = 3, h = 4 cm → 24 cm³ |
| Cylinder | V = π × r² × h | r = radius, h = height | r = 3, h = 5 cm → 141.37 cm³ |
| Sphere | V = 4⁄3 × π × r³ | r = radius | r = 3 cm → 113.1 cm³ |
| Hemisphere | V = 2⁄3 × π × r³ | r = radius | r = 3 cm → 56.55 cm³ |
| Cone | V = 1⁄3 × π × r² × h | r = base radius, h = height | r = 3, h = 4 cm → 37.7 cm³ |
| Square pyramid | V = 1⁄3 × a² × h | a = base edge, h = height | a = 6, h = 9 cm → 108 cm³ |
| Rectangular pyramid | V = 1⁄3 × l × w × h | l = base length, w = base width, h = height | l = 4, w = 6, h = 9 cm → 72 cm³ |
| Triangular prism | V = ½ × b × t × l | b = triangle base, t = triangle height, l = prism length | b = 3, t = 4, l = 10 cm → 60 cm³ |
| Capsule | V = π × r² × l + 4⁄3 × π × r³ | r = radius, l = length of the straight middle section | r = 2, l = 5 cm → 96.34 cm³ |
| Conical frustum | V = 1⁄3 × π × h × (r₁² + r₁r₂ + r₂²) | r₁ = top radius, r₂ = bottom radius, h = height | r₁ = 2, r₂ = 4, h = 3 cm → 87.96 cm³ |
| Ellipsoid | V = 4⁄3 × π × a × b × c | a, b, c = the three semi-axes (half of each full width) | a = 2, b = 3, c = 4 cm → 100.53 cm³ |
| Tube (hollow cylinder) | V = π × (R² − r²) × l | R = outer radius, r = inner radius, l = length | R = 5, r = 4, l = 10 cm → 282.74 cm³ |
Variable definitions
V: Volume, in the input unit cubed (for example cm³ or ft³).a: Edge of a cube or base edge of a square pyramid.l, w, h: Length, width, and height.r, d: Radius and diameter of a circle; r = d ÷ 2.R, r (tube): Outer and inner radius of a hollow cylinder.r₁, r₂: Top and bottom radius of a conical frustum.b, t: Base and height of the triangle in a triangular prism.a, b, c (ellipsoid): The three semi-axes, half of each full width.π: Pi ≈ 3.14159265, used at full precision.
How to find volume
Here is how to calculate volume for any regular shape:
- Identify the shape (box, cylinder, sphere, cone…) and pick its formula from the table above.
- Measure every dimension in one unit. Convert first if you mixed inches and feet.
- Apply the formula. The answer is in that unit cubed.
- Convert the units to whatever you need, such as liters or gallons.
Example: a box 2 ft long, 3 ft wide, and 4 ft high.
- Formula: V = l × w × h
- V = 2 × 3 × 4 = 24 ft³
- 24 ft³ × 7.48052 = 179.53 US gal
- 24 ft³ × 28.3168 = 679.6 L
Worked example
A cylinder with radius 6 in and height 12 in:
V = π × 6² × 12 = π × 36 × 12 = 1,357.17 in³ (≈ 0.7854 ft³, ≈ 0.0222 m³, ≈ 5.88 US gal).
How to use this calculator
- Choose the shape.
- Pick the unit you measured in; every dimension uses that unit.
- For round shapes, choose whether you are entering the radius or the diameter.
- Type each dimension and, if needed, how many identical objects you have.
- Pick the decimals, then copy or share the result with all units.
With the unit set to feet the main answer is in cubic feet, and with meters it is in cubic meters. For a room, a list of moving boxes or measurements in feet and inches, use the Cubic Feet Calculator. Choose Cylinder for a cylinder volume calculator or Sphere for a sphere volume calculator. For flat areas use the Square Footage Calculator.
Common mistakes
- Diameter vs radius: the formulas use the radius. Enter the diameter only with the measurement switched to Diameter, or halve it yourself.
- Mismatched units: if some dimensions are in inches and others in feet, the formula gives a meaningless number. Use the same unit, or convert.
- Confusing area with volume: a slab's "square footage" is area. Multiply by the thickness in feet to get cubic feet, or use the Concrete Slab Calculator.
- Tube walls: the inner radius must be smaller than the outer radius; the volume is the material between them, not the hollow space.
Volume of a cylinder
The volume of a cylinder is the area of its circular base times its height: V = π × r² × h. The radius r is half the diameter, so a 6 in diameter means r = 3 in.
Example: r = 3 in and h = 5 in gives V = π × 3² × 5 = 141.37 in³ ≈ 0.61 US gallons. Entering the diameter (6 in) gives the same 141.37 in³.
Tank example: a round tank 2 ft across and 4 ft tall holds π × 1² × 4 = 12.57 ft³ ≈ 94 US gallons (355.84 L). Pipe example: 100 ft of pipe with a 2 in inside diameter is 1,200 in long, so it holds π × 1² × 1,200 = 3,769.91 in³ ≈ 16.32 US gallons.
Volume of a cube
A cube has equal edges, so its volume is the edge cubed: V = a³. A cube with 4 cm edges holds 64 cm³, and a 3 ft cube holds 27 ft³, which is exactly 1 yd³.
A cube is a box with all sides equal: the box formula l × w × h with 4 × 4 × 4 gives the same 64 cm³.
Volume of a sphere
A sphere's volume is V = 4⁄3 × π × r³. With r = 3 cm, V = 4⁄3 × π × 27 = 113.1 cm³ (0.1131 L).
A hemisphere is half a sphere, V = 2⁄3 × π × r³, so the same radius gives 56.55 cm³. A capsule adds a full sphere to a cylinder of the same radius.
Volume unit conversions
1 ft³ ≈ 7.48 US gallons ≈ 28.32 liters, and 1 m³ ≈ 264.17 US gallons = 1,000 liters. All factors come from exact definitions: 1 in = 2.54 cm, 1 US gallon = 231 in³ = 3.785411784 L, and 1 UK gallon = 4.54609 L.
| 1 unit | in³ | ft³ | yd³ | m³ | L | US gal | UK gal |
|---|---|---|---|---|---|---|---|
| 1 ft³ | 1,728 | 1 | 0.037037 | 0.028317 | 28.3168 | 7.4805 | 6.2288 |
| 1 m³ | 61,023.7441 | 35.3147 | 1.308 | 1 | 1,000 | 264.1721 | 219.9692 |
| 1 yd³ | 46,656 | 27 | 1 | 0.764555 | 764.5549 | 201.974 | 168.1786 |
| 1 L | 61.0237 | 0.035315 | 0.001308 | 0.001 | 1 | 0.264172 | 0.219969 |
| 1 US gal | 231 | 0.133681 | 0.004951 | 0.003785 | 3.7854 | 1 | 0.832674 |
Browse the math calculators for related percentage, statistics and measurement tasks.
Frequently asked questions
›How do you find the volume of a cylinder?
Multiply π by the radius squared and by the height: V = π × r² × h. For r = 3 in and h = 5 in, V = π × 3² × 5 ≈ 141.37 in³, about 0.61 US gallons. If you measured the diameter, halve it first to get the radius.
›How do you calculate volume in cubic feet?
Measure every dimension in feet and apply the shape's formula: a box 2 ft × 3 ft × 4 ft holds 24 ft³. For a room, a list of boxes or measurements in feet and inches, use the Cubic Feet Calculator.
›How many gallons are in a cubic foot?
One cubic foot holds 7.4805 US gallons (1,728 in³ ÷ 231 in³ per gallon), or 28.3168 liters.
›What is the volume of a cube with side 4?
4³ = 4 × 4 × 4 = 64 cubic units. With a 4 cm side that is 64 cm³ (64 mL); with a 4 in side it is 64 in³, about 0.2771 US gallons.
›What is the formula for volume of a cone?
V = 1⁄3 × π × r² × h. A cone with r = 3 and h = 4 holds 37.7 cubic units, exactly one third of a cylinder with the same base and height (113.1).
›How do I find the volume of an irregular shape?
Split it into regular shapes (boxes, cylinders, cones, pyramids), find each volume in the same unit and add them up, subtracting any hollow parts. For a small solid object, use water displacement: note the water level in a measuring container, submerge the object fully, and the rise in level is its volume (1 mL = 1 cm³).
›Which shapes does this calculator support?
Cube, rectangular prism (box), cylinder, sphere, hemisphere, cone, square pyramid, rectangular pyramid, triangular prism, capsule, conical frustum, ellipsoid, and tube (hollow cylinder). Pick the shape and the form shows only the dimensions that shape needs.
›Which units can I use?
Enter dimensions in millimeters, centimeters, meters, inches, feet, or yards. The main result is in that unit cubed, and every result is also shown in cm³, m³, in³, ft³, yd³, liters, milliliters, US gallons, and UK (imperial) gallons.
›Why is the answer slightly different from a hand calculation?
This calculator uses full double-precision π (≈ 3.14159265358979). Hand calculations often use 3.14 or 3.1416 and will differ in the last few digits.
›Can I enter the diameter instead of the radius?
Yes. For round shapes, switch the measurement to Diameter and the calculator halves it for you; the written steps show the radius it used.
›Is this the right tool for concrete or gravel?
No. This is a general geometry calculator. For ready-mix concrete with bag counts and waste factor, use the Concrete or Concrete Slab Calculator. For tonnage and coverage of crushed stone, use the Gravel Calculator.
›How is the triangular prism defined?
Volume = ½ × b × t × l, where b and t are the base and height of the triangular cross-section and l is the length of the prism. For a gable attic, b is the building width, t is the roof rise (the Roof Pitch Calculator finds it from the pitch and half the width) and l is the building length.
›How is rounding handled?
All math uses full precision; only displayed volumes are rounded to the decimal places you choose.
Related calculators
If this helped, the following calculators are useful for everyday math problems:
- Concrete CalculatorEstimate concrete volume, bag count and waste for any project shape.
- Concrete Slab CalculatorConcrete for patios, driveways, sidewalks, pads.
- Gravel CalculatorGravel for driveways, paths, and drainage in yards and tons.
- Square Footage CalculatorArea in square feet from length and width.
- Rounding CalculatorRound numbers to any place by chosen method.
- Roof Pitch CalculatorRoof pitch, angle, slope, rafter length, and pitch multiplier.