Volume Calculator in Liters and Cubic Units
A volume calculator in liters, US gallons and cubic units for 12 solids, from boxes and cylinders to cones, spheres and tubes.
Volume · Rectangular prism (box)
- In in³
- 366.1424646 in³
- Surface area
- 2,200 cm²
- In liters
- 6 L
- In US gallons
- 1.585032314 gal
How to use the Volume Calculator
- Choose the solid, such as Rectangular prism (box), Cylinder or Sphere.
- Pick the unit you measured in, for example centimeters or feet.
- Enter each dimension. The volume updates as you type, with the formula shown under it.
- Read the capacity in liters and US gallons, the surface area and the volume in the other unit system below the result.
Formula
Box V = l × w × h · Cylinder V = π × r² × h · Sphere V = ⁴⁄₃ × π × r³
Where:
- V
- Volume, in cubic units of the length you entered (cm³, m³, in³, ft³, ...)
- l, w, h
- Length, width and height of a box, all in the same unit
- r
- Radius of a cylinder, cone or sphere: half the diameter
- π
- Pi, about 3.14159265 (the calculator uses 40 digits)
Each solid's own formula appears under the result when you select it. Capacity uses 1 m³ = 1,000 liters and 1 US gallon = 231 in³ = 3.785411784 liters exactly.
Worked example
A round above-ground pool is 12 ft across and you fill it to a depth of 4 ft. How many gallons does it hold, and what does the water cost at $0.006 per gallon?
- Treat the water as a cylinder. The radius is 12 ÷ 2 = 6 ft and the height is 4 ft.
- V = π × r² × h = π × 6² × 4 = π × 144 ≈ 452.39 ft³.
- One cubic foot is about 7.48052 US gallons, so 452.39 × 7.48052 ≈ 3,384.11 gallons (12,810 liters).
- Water cost: 3,384.11 × $0.006 ≈ $20.30.
The pool holds about 452.39 cubic feet, or roughly 3,384 US gallons, and costs about $20.30 to fill.
From cubic units to liters and gallons
Geometry gives a volume in cubic units of whatever you measured in: centimeters in, cubic centimeters out. Capacity is usually wanted in liters (litres in British spelling) or gallons, so every result here lists four figures: the cubic unit you chose, the nearest cubic unit in the other system, liters and US gallons. Set the unit to feet and it works as a cubic feet calculator, set it to meters for a cubic meter calculator; the liters line is there either way.
| Cubic unit | Liters | US gallons |
|---|---|---|
| 1 cm³ | 0.001 (1 milliliter) | 0.000264 |
| 1,000 cm³ | 1 | 0.2642 |
| 1 in³ | 0.016387 | 0.004329 |
| 1 ft³ | 28.3168 | 7.4805 |
| 1 yd³ | 764.555 | 201.97 |
| 1 m³ | 1,000 | 264.17 |
The gallon shown is the US liquid gallon of exactly 3.785411784 liters. An imperial (UK) gallon is 4.54609 liters, so the same tank holds about 17% fewer imperial gallons. Never convert a volume with a length factor: one meter is about 3.28 feet, but one cubic meter is about 35.31 cubic feet.
Volume of a cylinder, tank or pipe
Most tanks, drums, cans and round pools are cylinders: V = π × r² × h. The input is the radius, so halve a measured diameter first. Entering the diameter makes a cylinder four times too large.
Worked example. A rainwater tank has an inside radius of 0.6 m and a water height of 1.5 m. With Cylinder selected and meters as the unit:
- V = π × 0.6² × 1.5 = π × 0.54 ≈ 1.696 m³.
- At 1,000 liters per cubic meter, that is about 1,696 liters, or roughly 448 US gallons.
A few cases need care:
- Pipes. The water in a pipe is a long thin cylinder; use the inside diameter and the pipe length as the height. Tube (hollow cylinder) answers a different question, the volume of the wall material.
- Partly filled upright tanks. Enter the liquid depth as the height.
- Partly filled horizontal tanks. There is no fill-level mode. Depth and volume are not proportional in a cylinder lying on its side, so the full volume is only an upper limit.
- Tanks with rounded ends. Capsule is a cylinder with a half-sphere on each end, the shape of many propane tanks.
Volume of a box, sphere, cone and other solids
| Solid | Formula | You enter |
|---|---|---|
| Rectangular prism (box, cuboid) | V = l × w × h | length, width, height |
| Cube | V = s³ | side |
| Cylinder | V = π × r² × h | radius, height |
| Cone | V = ⅓ × π × r² × h | base radius, vertical height |
| Sphere | V = ⁴⁄₃ × π × r³ | radius |
| Hemisphere | V = ⅔ × π × r³ | radius |
| Pyramid | V = ⅓ × l × w × h | base length, base width, vertical height |
| Triangular prism | V = ½ × b × a × l | triangle base and height, prism length |
| Capsule | V = π × r² × (⁴⁄₃ × r + a) | radius, straight section length |
| Ellipsoid | V = ⁴⁄₃ × π × a × b × c | the three semi-axes |
| Frustum (truncated cone) | V = ⅓ × π × h × (R² + R × r + r²) | bottom radius, top radius, height |
| Tube | V = π × h × (R² − r²) | outer radius, inner radius, length |
Prisms and cylinders are base area times height. A cone or pyramid holds exactly one third of the cylinder or prism with the same base and height. Volume grows with the cube of size: doubling every dimension of a box multiplies its contents by eight.
How to measure a container
- Measure the inside for capacity. Wall thickness matters most on small containers such as pots and aquariums.
- Keep one unit throughout. A slab 10 ft × 12 ft and 4 in thick is 10 × 12 × ⅓ = 40 ft³, about 1.48 yd³, only once the 4 inches become ⅓ ft. For slabs and footings, the concrete calculator also works out bags.
- Use the vertical height for cones, pyramids and frustums, straight up from the base, not along the slope.
- Irregular objects. Split the shape into simple solids and add them, or use water displacement: submerge the object in a box-shaped tank and multiply the tank's base area by the rise in level. A rise of 2 cm in a 30 cm × 20 cm tank means 1,200 cm³, or 1.2 liters.
If you know a material's mass and density but not its dimensions, the density calculator solves for volume.
Assumptions
Every solid is treated as geometrically perfect, with flat faces and exact curves; real containers have rounded corners and wall thickness, so treat results as close estimates. A surface area is listed for every solid except the ellipsoid and the triangular prism, where these inputs do not fix it. Calculations use 40 significant digits and are displayed rounded to 10.
Frequently asked questions
How do I find the volume of a cylinder?
Use V = π × r² × h: the area of the circular base times the height. If you measured the diameter, halve it first. A can 8 cm across and 12 cm tall has r = 4 cm and holds about 603.19 cm³, which is 0.603 liters. Choose Cylinder above to get the liters and US gallons with it.
How do I calculate the volume of a liquid?
Measure the inside of the container up to the liquid level, calculate that shape, and read the result in liters. Water 10 cm deep in a tank 30 cm by 20 cm is 6,000 cm³, exactly 6 liters. Volume and capacity are the same amount in different units: cubic units for space, liters or gallons for what a container holds.
How many liters are in a gallon?
A US liquid gallon is exactly 3.785411784 liters, so one liter is about 0.2642 US gallons. The imperial gallon used in the UK is larger, exactly 4.54609 liters, or about 1.2 US gallons. The gallon figure under the result here is always US gallons.
How do I calculate cubic meters from cm?
Multiply the three measurements in centimeters, then divide by 1,000,000, because one meter is 100 cm and 100³ is a million. A crate 250 cm × 120 cm × 80 cm is 2,400,000 cm³, which is 2.4 m³ or 2,400 liters. Converting each length to meters first (2.5 × 1.2 × 0.8) gives the same answer.
How do I calculate cubic feet from inches?
Multiply the three measurements in inches and divide by 1,728, the number of cubic inches in a cubic foot (12 × 12 × 12). An aquarium 48 in × 13 in × 21 in is 13,104 in³, about 7.58 ft³ or 56.7 US gallons. One cubic foot holds about 7.48 US gallons, or 28.32 liters.
How do I calculate pipe volume?
Treat the water inside as a long cylinder and use the inside radius, half the inside diameter. A pipe 5 cm across inside and 10 m (1,000 cm) long holds π × 2.5² × 1,000 ≈ 19,635 cm³, about 19.63 liters. The Tube option is different: it gives the volume of the pipe wall itself, from the outer and inner radius.
Related calculators
- Surface Area CalculatorLateral surface area calculator for cylinders, cones, prisms and pyramids, with the total area, slant height and volume of 11 solids.
- Area CalculatorArea calculator: square feet, square meters or six other units for 12 shapes, from rectangles and circles to a triangle with three known sides.
- Perimeter CalculatorPerimeter calculator: circle circumference from the radius, plus the distance around rectangles, triangles, semicircles and eight other shapes.
- Length ConverterUse this length converter: feet to meters, cm to inches, miles to km or any pair of nine units, with exact factors and every unit listed.
- Weight ConverterTry this weight converter: stone to kg, kg to lbs, ounces to grams and three kinds of ton, with exact factors and every unit at once.
Last updated: