How to use the volume calculator
Pick the shape that matches your object, choose the unit your tape measure uses, and type the dimensions. The big number is the volume in cubic units of that measurement (cm³, m³, in³ or ft³). The rows under it convert the same volume to liters, US gallons and the other cubic units, for filling a tank or ordering soil. Radius is always half the diameter — if you measured across a pipe or a ball, divide by two first.
Volume formulas
| Shape | Formula | Inputs |
|---|---|---|
| Cube | V = a³ | side a |
| Box (rectangular prism) | V = l × w × h | length, width, height |
| Cylinder | V = π r² h | radius, height |
| Sphere | V = 4⁄3 π r³ | radius |
| Hemisphere | V = 2⁄3 π r³ | radius |
| Cone | V = 1⁄3 π r² h | radius, perpendicular height |
| Square pyramid | V = 1⁄3 b² h | base side, perpendicular height |
| Triangular prism | V = ½ b h × L | triangle base and height, prism length |
| Capsule | V = π r² L + 4⁄3 π r³ | radius, length of the cylindrical middle |
Every prism (box, cylinder, triangular prism) is "area of the end × length", and every pointed solid (cone, pyramid) is exactly one third of the prism with the same base and height. A capsule is a cylinder with a hemisphere on each end, so its two caps together make one full sphere. For a cone or pyramid, use the straight-up height from the center of the base to the tip, not the slant length along the side.
Worked example: an aquarium
A tank is 60 cm long, 30 cm wide and 36 cm tall. Volume = 60 × 30 × 36 = 64,800 cm³. Since 1 liter is 1,000 cm³, that is 64.8 L, and dividing by 3.785411784 L per US gallon gives 17.1 gallons. Real tanks hold a little less: subtract the glass thickness from each dimension and leave a few centimeters of air at the top, so a "17-gallon" tank in practice holds about 15 gallons of water, and the gravel and decorations displace more.
A round above-ground pool 15 ft across and filled to 4 ft deep is a cylinder with r = 7.5 ft: V = π × 7.5² × 4 = 706.9 ft³. One cubic foot is 7.48052 US gallons, so the pool holds about 5,288 gallons (20,016 liters). That number sets how much chlorine to add and how long the fill will take.
Measuring tips
- Measure inside dimensions for anything you will fill (tanks, planters) and outside dimensions for anything you will ship or store.
- For a cylinder, measuring the circumference is often easier than the diameter: radius = circumference ÷ (2π).
- Split odd shapes into pieces — a silo is a cylinder plus a hemisphere — and add the volumes.
- Keep all dimensions in one unit. Mixing feet and inches gives a result that is off by a factor of 12 or 1,728.
Common uses
Shipping: carriers bill by dimensional weight, the box volume in cubic inches divided by a divisor such as 139. Garden and construction: soil, mulch, gravel and concrete are sold by the cubic yard or cubic meter — the concrete calculator adds waste and bag counts for slabs. Science class: density = mass ÷ volume, so the volume of a sphere or cylinder is the first step in identifying a sample. For flat surfaces use the area calculator; for any other unit pair, the unit converter has the exact factors.
Frequently asked questions
How many liters are in a cubic meter?
Exactly 1,000. A liter is defined as a cubic decimeter (10 cm × 10 cm × 10 cm = 1,000 cm³), and a cubic meter is 1,000 of those. So 1 cm³ is 1 milliliter, which is why the 10 cm cube in the example holds exactly 1 liter.
How many gallons are in a cubic foot?
About 7.48 US gallons (7.480519). A US gallon is defined as 231 cubic inches and a cubic foot is 1,728 cubic inches, so the factor is 1,728 ÷ 231. A UK imperial gallon is larger (4.54609 L), giving 6.23 imperial gallons per cubic foot.
Does the cone height mean the slant or the vertical height?
The vertical (perpendicular) height from the center of the base straight up to the tip. If you only know the slant length s and the radius r, the height is √(s² − r²) by the Pythagorean theorem.
How do I find the volume of a cylinder from its diameter?
Halve the diameter to get the radius, then use V = π r² h. A pipe 8 inches across and 36 inches long has r = 4, so V = π × 16 × 36 = 1,809.6 in³, which is 7.83 gallons.
Why is my calculated volume different from the capacity on the label?
Labels give usable capacity. Wall thickness, a domed bottom and the air gap at the top all reduce what you can pour in, often by 5–15%. Measure the inside up to the fill line for the real figure.
Last updated: October 9, 2026