Skip to content
CalculatorBuddy

Volume Calculator

Find the volume of a sphere, cone, cube, cylinder, tank, capsule, spherical cap, frustum, ellipsoid, pyramid, or tube. Mixed length units print a cubic result in each unit.

V = 4/3 π r³

ExampleSample values — edit any field to see your result.

Results update as you type.

Compute the volume of eleven common solids — sphere, cone, cube, cylinder, rectangular tank, capsule, spherical cap, conical frustum, ellipsoid, square pyramid, and tube. Lengths can be miles, yards, feet, inches, or metric units down to ångströms. Mixed units produce a cubic result in each unit you used.

Formula

Each length is converted into a common unit, the shape formula is applied, and the volume is printed to 14 significant digits. Zero dimensions are allowed and give zero volume; empty or negative values are rejected.

sphere           V = (4/3) π r³
cone             V = (1/3) π r² h
cube             V = a³
cylinder         V = π r² h
rectangular tank V = l × w × h
capsule          V = (4/3) π r³ + π r² h
spherical cap    V = (1/3) π h² (3R − h)
conical frustum  V = (1/3) π h (r² + rR + R²)
ellipsoid        V = (4/3) π a b c
square pyramid   V = (1/3) a² h
tube             V = π (d1² − d2²) l / 4

Spherical-cap conversions when two of the three values are known:

r and R:  h = R ± √(R² − r²)
r and h:  R = (h² + r²) / (2h)
R and h:  r = √(2 R h − h²)
A conical frustum does not swap top and bottom radii — a bucket that is wider at the top uses the radii as entered. A tube does swap diameters so the outer diameter is the larger of the two.

Common cubic units

Factors use the international foot (1 ft = 0.3048 m exactly).

UnitCubic metres
1 cubic inch0.000016387064 m³
1 cubic foot0.028316846592 m³
1 cubic yard0.764554857984 m³
1 cubic metre1 m³
1 litre0.001 m³

Examples

Sphere of radius 3 ft

Volume is (4/3) π × 27 = 36π = 113.09733552923 ft³. The same formula with radius 1 m is 4.1887902047864 m³.

Cone with mixed units

Radius 12 in and height 1 ft. In inches both dimensions are 12, so the volume is 1809.5573684677 in³. In feet both are 1, so it is also 1.0471975511966 ft³.

Cube, tank, and pyramid

A 2 ft cube is 2³ = 8 ft³. A 2 × 3 × 4 ft tank is 24 ft³. A square pyramid with base edge 5 ft and height 12 ft is 100 ft³.

Spherical cap from r and R

Base radius 3 ft and ball radius 5 ft give heights 1 ft and 9 ft, so two volumes: 14.660765716752 ft³ and 508.93800988155 ft³. From r = 3 ft and h = 4 ft the ball radius is 3.125 ft and the volume is 90.058989402907 ft³.

Tube of concrete

Outer diameter 3 ft, inner diameter 2.5 ft, length 10 ft is (9 − 6.25) × 10 / 4 = 6.875π = 21.59844949343 ft³.

Frequently asked questions

How do I calculate the volume of a sphere?
A sphere of radius r has volume (4/3) π r³. A 3 ft radius is 36π = 113.09733552923 ft³. A 1 m radius is 4.1887902047864 m³. Enter the radius in any of the length units; the result is reported in cubic units of the same kind.
What happens if I mix length units?
Each dimension is converted into every distinct unit you used, then the formula is applied in that unit. A cone with radius 12 in and height 1 ft is 1809.5573684677 in³ and 1.0471975511966 ft³. When every field uses the same unit, you get a single cubic result.
How does the spherical cap solver work?
Enter any two of base radius r, ball radius R, and height h. From r and R there are two heights, h = R ± √(R² − r²), so two volumes (the smaller cap first). From r and h the ball radius is (h² + r²) / (2h). From R and h the base radius is √(2Rh − h²). If all three are filled, r and R are used and h is ignored.
Is the capsule height the full length?
No. Height h is the cylindrical middle only. The two hemispherical ends are added as a full sphere, so V = π r² h + (4/3) π r³. A capsule with r = 1.5 ft and h = 3 ft is 35.342917352885 ft³.
Does the tube calculator swap inner and outer diameters?
Yes. If the inner diameter is larger than the outer, the two fields are swapped so d1 ≥ d2, then V = π (d1² − d2²) l / 4. Entering d1 = 2, d2 = 3, l = 1 (feet) is treated as a 3 ft outer / 2 ft inner tube of 1.25π = 3.9269908169872 ft³.

Related calculators