Math · Live
Volume,
for any 3D shape.
Solve for the volume of a sphere, cube, cylinder, cone, capsule, or rectangular tank. Switch shapes with one tap, and read the result in cubic meters, liters, and US gallons at the same time.
Inputs
Pick a shape
Distance from center to surface
Formula
V = (4 ⁄ 3) · π · r³
Volume · Sphere
Real-timeStep by step
How we got there
- 1
Plug the radius into V = (4/3)·π·r³
(4 ⁄ 3) × π × (1 m)³
- 2
Cube the radius, then scale
(4 ⁄ 3) × 3.14159… × 1 = 4.1888 m³
- 3
Convert to other units
4.1888 m³ = 4188.79 L = 1106.56 gal
Quick compare
Each shape with your dimensions
| Shape | m³ | Liters | US gal |
|---|---|---|---|
| Sphere | 4.1888 | 4,188.79 | 1,106.56 |
| Cube | 1 | 1,000 | 264.17 |
| Cylinder | 6.2832 | 6,283.19 | 1,659.84 |
| Cone | 2.0944 | 2,094.4 | 553.28 |
| Capsule | 10.472 | 10,471.98 | 2,766.4 |
| Rectangular Tank | 2 | 2,000 | 528.34 |
Field guide
What volume actually measures.
Volume is how much three-dimensional space an object occupies. For a hollow shape, a tank, a flask, a fuel cell, it's also exactly how much fluid the object can hold. Every formula below gives the answer in cubic units: cubic meters, cubic feet, cubic inches. Liters and gallons are just the same number in a different costume: 1 m³ = 1,000 L = 264.172 US gal.
Sphere: V = (4 ⁄ 3) · π · r³
A sphere is defined by a single number: its radius. The volume scales with the cube of that radius, which is why doubling a beach ball's diameter makes it eight times larger inside, not twice.
Cube: V = a³
The simplest of all volume formulas. A cube has six identical square faces, so its volume is its edge length a multiplied by itself three times.
Cylinder: V = π · r² · h
A cylinder is a stack of identical circles. The area of one circle is π · r²; multiplying by the height h stretches that area through space. This is the formula behind cans, pipes, hot-water tanks, and engine displacement.
Cone: V = (1 ⁄ 3) · π · r² · h
A cone with the same radius and height as a cylinder holds exactly one-third the volume, a handy mental check the next time you're scooping ice cream. Use the perpendicular height (apex straight down to the base centre), not the slant.
Capsule: V = π · r² · h + (4 ⁄ 3) · π · r³
A capsule is a cylinder of length h with a hemispherical cap at each end. Add the cylinder formula to a full sphere's formula (the two hemispheres make one whole sphere) and you're done. Pharmaceutical capsules, propane tanks, and submarine hulls are all capsule-shaped.
Heads-up: the h here is thestraight-side length only. The total length of the capsule is h + 2r.
Rectangular Tank: V = l · w · h
Length × width × height. The formula behind shipping containers, swimming pools, fish tanks, and almost every box-shaped storage problem in the world.
From cubic units to liters and gallons
Once you have a volume in any cubic unit, switching to liters or gallons is a single multiplication. The conversions baked into this calculator:
1 m³ = 1,000 L1 m³ ≈ 264.172 US gallons1 m³ ≈ 35.315 ft³1 m³ = 1,000,000 cm³1 ft³ ≈ 7.481 US gallons
Heads up: US gallons and UK (imperial) gallons are not the same; an imperial gallon is about 20% larger. This calculator uses US gallons by default since most volume-related queries on the open web do.
Tips for getting an accurate answer
- Match your units. If you measured in centimeters, set the unit picker to
cmbefore entering. Mixing inches with meters is the #1 way these calculators give wildly wrong answers. - Use the perpendicular height. For cones and cylinders, height means the straight-down distance from the apex (or top circle) to the base, not the slant length on the outside.
- Inside dimensions for capacity, outside for displacement. A 10 mm-thick steel tank with a 1 m outside radius has only ~0.99 m of usable interior radius for capacity calculations.
- Round at the end. Round each input measurement first and the small errors compound. Enter the raw measurement and round the final answer.
Worked example: how big is a 12 oz soda can?
A standard US soda can is about 6.6 cm in diameter and 12.2 cm tall. That's a cylinder with r = 3.3 cm and h = 12.2 cm:
The 12 oz of liquid leaves a small headspace at the top of the can, roughly 2 fl oz of CO₂-rich air, which is why the can sounds hollow when you tap it.