Volume Calculator

Pick a shape, enter its dimensions, and get the volume instantly in cubic units, liters and US gallons. Eight everyday solids are covered, from a cube to a capsule, each with its formula shown and the numbers substituted in.

What you get
  • Eight common solidsCube, box, cylinder, cone, sphere, pyramid, prism, capsule.
  • Three units at onceCubic measure, liters and US gallons, side by side.
  • Formulas with your numbersSee the calculation substituted, not just the answer.

Pick a shape

Results update as you type

Enter every dimension in the same unit. Mixing centimeters with meters is the most common cause of a volume that looks far too small or large.

Runs entirely in your browser. Nothing you type is sent or saved

Volume guide

What volume measures

Volume is the amount of three-dimensional space a solid occupies, measured in cubic units: a cube one centimeter on each edge holds one cubic centimeter. Where area counts squares laid on a surface, volume counts cubes stacked inside a solid, which is why every answer here carries a small 3 after its unit.

This volume calculator covers the eight solids that cover almost every everyday question: how much water a tank holds, how much soil a planter needs, how much concrete a form takes. It works through one running example, a cylinder with radius 3 cm and height 5 cm, whose volume is 141.37167 cubic centimeters, so you can check every figure against the calculator above.

The eight formulas, with worked examples

Cube

V = s³

s the edge length. Example: s = 2 gives V = 2³ = 8.

Rectangular box

V = l × w × h

l, w, h the three edges. Example: 2 × 3 × 4 = 24.

Cylinder

V = πr²h

r the base radius, h the height. Example: π × 3² × 5 = 45π = 141.37167.

Cone

V = πr²h ÷ 3

Exactly one third of the matching cylinder. Example: r = 3, h = 6 gives 18π = 56.54867, while the cylinder with the same base and height holds 169.64600, three times as much.

Sphere

V = 4πr³ ÷ 3

r the radius. Example: r = 3 gives 36π = 113.09734.

Square pyramid

V = base² × h ÷ 3

base the edge of the square bottom, h the perpendicular height to the apex. Example: base = 4, h = 9 gives 16 × 9 ÷ 3 = 48, one third of the box with the same footprint and height.

Triangular prism

V = ½ × base × baseHeight × length

The area of the triangular face times how far it is extruded. Example: a 3-4 right triangle face extended for a length of 10 gives ½ × 3 × 4 × 10 = 60.

Capsule

V = πr²h + 4πr³ ÷ 3

A cylinder body plus a full sphere's worth of rounded ends (two hemispheres make one sphere). h is the length of the cylindrical part only. Example: r = 2, body h = 10 gives 40π + 32π/3 = 159.17403.

Cubic units, liters and gallons

Volume conversions are cubed conversions, which surprises people: there are not 100 liters in a cubic meter but 1,000, because the meter cube contains 100 × 100 × 100 centimeter cubes. The anchors worth memorizing:

  • 1 liter = 1,000 cm³, the volume of a 10 cm cube, and 1 cubic meter holds 1,000 of those liters.
  • 1 cubic inch = 16.387064 cm³, a little over a quarter of a liter's tenth.
  • 1 cubic foot = 28.316846592 liters = 7.48052 US gallons, the figure behind most tank and pool arithmetic in the United States.
  • 1 US gallon = 3.785411784 liters, so the running cylinder example, 141.37167 cm³, is 0.14137 liters, about 0.03735 gallons.

The calculator applies these exactly, whichever unit you enter the dimensions in, so a pool measured in feet and a beaker measured in centimeters can be compared on the same results panel.

Why size changes volume so fast

Volume grows with the cube of the linear scale, and the chart above the guide makes that visible for your current shape. Shrink every dimension to half: the volume drops to one eighth. Double every dimension: the volume becomes eight times larger. At three times the size it is 27 times larger. The 0.5×, 1× and 2× bars keep a fixed 1 : 8 : 64 ratio no matter which shape is selected, because every formula on this page is built from three length factors multiplied together (or radius factors cubed).

This is why the consequences of measurement errors are dramatic in three dimensions. A 2% error in every side of a cube produces nearly a 6% error in the volume, triple the input error. It is also why large animals need proportionally thicker bones and why doubling a tank's capacity needs much more than double the material.

Using the calculator well

  • Keep the units consistent: every dimension of one shape must use the same unit. The unit select applies to all fields at once, and the liters and gallons readouts convert correctly from any of the four units.
  • Radius, not diameter: the cylinder, cone, sphere and capsule all take the radius, half the distance across. Enter a diameter by mistake and the volume will be off by a factor of 4 (or 8 for the sphere), a convenient warning sign.
  • For the capsule, measure the straight part: the h field is the cylindrical body only, excluding the domed ends. Overall length minus one diameter gives the right h.
  • Break complex shapes into simple ones: an L-shaped tank is two boxes; add their volumes. A silo is a cylinder with a cone on top; the calculator handles each piece.
  • Irregular objects: submerge the object in a graded container and read how much the water level rises. That displacement equals the object's volume exactly, no formula required, and it is the standard method for stones, tools and other lumpy solids.
  • Capacity note: a real container's usable capacity is slightly less than its geometric volume once wall thickness, fittings and sediment are accounted for, so design with a margin.

A short history: Archimedes and the crown

The most famous volume calculation is also the most famous bathtub story. Around 250 BC, King Hiero II of Syracuse suspected his goldsmith had substituted silver for some of the gold in a crown, and the young Archimedes was asked to prove it without damaging the crown. According to the Roman writer Vitruvius, the answer came to him in the bath: the water that sloshed over the edge equaled the volume of the submerged body. Weighing the crown against an equal weight of pure gold and comparing their displaced volumes exposed the fraud, since silver is less dense and an adulterated crown of the same weight must displace more water. His cry of delight, "Eureka!", has been the trademark of sudden insight ever since.

Archimedes went on to prove the result he was proudest of: a sphere fills exactly two thirds of the cylinder that circumscribes it, so a ball of radius 3 holds 113.09734 while the surrounding cylinder of radius 3 and height 6 holds 169.64600, precisely 1.5 times as much. He had the diagram engraved on his tomb. Every sphere and cylinder formula on this page is his mathematics, unchanged after more than two thousand years.

Common questions

A cone and a cylinder with the same base radius and height share every cross-section's position; the cone just tapers them all to a point. Filling the cone with water and pouring it into the matching cylinder fills exactly one third of it, every time, which is how the factor was understood long before calculus proved it. The same one-third rule applies to pyramids against boxes with the same base and height.

By displacement, the method Archimedes made famous. Partially fill a graduated container, note the level, submerge the object completely, and read the new level: the rise in milliliters equals the object's volume in cubic centimeters. Make sure the object is fully under and not touching the walls, and for floating objects push them under with a thin wire and add the wire's tiny contribution or ignore it.

Volume is the space a solid occupies, including its walls; capacity is how much the inside can hold. A 2 mm thick steel tank 100 cm on each side has an outer volume of 1,000,000 cm³ but an inner capacity of a bit less, because the walls eat into it. This calculator computes geometric volume, so subtract wall thicknesses by shrinking each dimension before entering them.

7.48052 US gallons, or 28.316846592 liters. The figure is worth memorizing for pool and tank work: a kiddie pool of 10 cubic feet holds about 75 gallons, and every additional cubic foot adds another seven and a half. Imperial gallons are larger, 1.2 US gallons each, so check which gallon a specification means.

Because every volume formula multiplies three length factors together, and doubling all of them doubles each factor: 2 × 2 × 2 = 8. The chart above shows the 1 : 8 : 64 progression for the 0.5×, 1× and 2× sizes of your current shape. The effect is general: multiplying every linear dimension by k multiplies the volume by k³, and the surface area by only k².

The arithmetic is exact to floating-point precision; the display simply rounds for readability. Any residual difference from a real measurement comes from your inputs, not the formula: real tanks bulge slightly, pi is irrational, and dimensions are measured to finite precision. Treat the last displayed decimal as decorative and the first four as trustworthy.

No. Every calculation runs in your browser. Nothing is stored or transmitted.

Measure once. Know exactly what fits.

Browse all math calculators