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.

Volume
141.3717 in³
Cubic centimeters2,316.6666 cm³
Cubic meters0.0023 m³
Cubic feet0.0818 ft³
Cubic yards0.003 yd³
Liters2.3167 L
Milliliters2,316.6666 mL
US gallons0.612 US gal
UK (imperial) gallons0.5096 UK gal
Step by step
  1. Formula: V = π × r² × h
  2. Substitute: V = π × 3² × 5
  3. Result: V = 141.3717 in³
  4. Convert: 141.3717 in³ × 0.004329 = 0.612 US gal
  5. Convert: 141.3717 in³ × 0.0163871 = 2.3167 L
Results update as you type

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:

ShapeFormulaVariablesExample
CubeV = a³a = edge lengtha = 4 cm → 64 cm³
Rectangular prism (box)V = l × w × hl = length, w = width, h = heightl = 2, w = 3, h = 4 cm → 24 cm³
CylinderV = π × r² × hr = radius, h = heightr = 3, h = 5 cm → 141.37 cm³
SphereV = 4⁄3 × π × r³r = radiusr = 3 cm → 113.1 cm³
HemisphereV = 2⁄3 × π × r³r = radiusr = 3 cm → 56.55 cm³
ConeV = 1⁄3 × π × r² × hr = base radius, h = heightr = 3, h = 4 cm → 37.7 cm³
Square pyramidV = 1⁄3 × a² × ha = base edge, h = heighta = 6, h = 9 cm → 108 cm³
Rectangular pyramidV = 1⁄3 × l × w × hl = base length, w = base width, h = heightl = 4, w = 6, h = 9 cm → 72 cm³
Triangular prismV = ½ × b × t × lb = triangle base, t = triangle height, l = prism lengthb = 3, t = 4, l = 10 cm → 60 cm³
CapsuleV = π × r² × l + 4⁄3 × π × r³r = radius, l = length of the straight middle sectionr = 2, l = 5 cm → 96.34 cm³
Conical frustumV = 1⁄3 × π × h × (r₁² + r₁r₂ + r₂²)r₁ = top radius, r₂ = bottom radius, h = heightr₁ = 2, r₂ = 4, h = 3 cm → 87.96 cm³
EllipsoidV = 4⁄3 × π × a × b × ca, 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²) × lR = outer radius, r = inner radius, l = lengthR = 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:

  1. Identify the shape (box, cylinder, sphere, cone…) and pick its formula from the table above.
  2. Measure every dimension in one unit. Convert first if you mixed inches and feet.
  3. Apply the formula. The answer is in that unit cubed.
  4. 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

  1. Choose the shape.
  2. Pick the unit you measured in; every dimension uses that unit.
  3. For round shapes, choose whether you are entering the radius or the diameter.
  4. Type each dimension and, if needed, how many identical objects you have.
  5. 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 unitin³ft³yd³m³LUS galUK gal
1 ft³1,72810.0370370.02831728.31687.48056.2288
1 m³61,023.744135.31471.30811,000264.1721219.9692
1 yd³46,6562710.764555764.5549201.974168.1786
1 L61.02370.0353150.0013080.00110.2641720.219969
1 US gal2310.1336810.0049510.0037853.785410.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:

Last updated: November 14, 2026 · Checked against standard formulas and sample test cases.

Uses full-precision π and exact unit definitions (1 in = 2.54 cm, 1 US gal = 231 in³, 1 UK gal = 4.54609 L); displayed values are rounded only at the end.