Volume
Formula and your calculation
Enter the dimensions to see the volume.
Use this free volume calculator to find the volume of a cube, rectangular prism (box), cylinder, sphere, hemisphere, cone, pyramid or triangular prism. Type the dimensions, pick the unit (mm, cm, m, in, ft or yd) and the result updates as you type: in cubic units, liters, milliliters, cubic meters, cubic centimeters, US and UK gallons, cubic feet and cubic inches. The formula and your own numbers are shown step by step, and everything is calculated in your browser.
How to use the volume calculator
- Choose the shape: cube, rectangular prism, cylinder, sphere, hemisphere, cone, pyramid or triangular prism. The diagram shows which dimension each box asks for.
- Pick one unit for all the dimensions. For a cylinder, a sphere, a hemisphere or a cone you can enter the radius or the diameter.
- Type the numbers. Both the dot and the comma work as a decimal mark. Only numbers greater than zero are accepted.
- Read the volume in your unit and in liters, gallons and more, check the formula with your numbers, and copy the main result.
Volume formulas
All the formulas below need every length in the same unit. The result is then in that unit cubed: centimeters give cm³, meters give m³.
Cube
V = a³, where a is the length of one side. Example: a cube with 5 cm sides has a volume of 5 × 5 × 5 = 125 cm³, which is 0.125 liters.
Rectangular prism (box or cuboid)
V = l × w × h: length times width times height. Example: a box of 30 cm × 20 cm × 10 cm holds 30 × 20 × 10 = 6,000 cm³, or 6 liters.
Cylinder
V = π × r² × h, with r the radius of the circular base and h the height. Example: r = 2 cm and h = 5 cm give π × 2² × 5 = 62.83 cm³. If you only know the diameter d, the radius is r = d ÷ 2.
Sphere
V = 4/3 × π × r³. Example: a ball of radius 3 cm has a volume of 4/3 × π × 3³ = 113.10 cm³. A sphere of radius 1 has a volume of 4.1888.
Hemisphere
V = 2/3 × π × r³, exactly half of the sphere with the same radius. Example: r = 3 cm gives 2/3 × π × 3³ = 56.55 cm³.
Cone
V = 1/3 × π × r² × h: one third of the cylinder that has the same base and the same height. Example: r = 3 cm and h = 4 cm give 1/3 × π × 3² × 4 = 37.70 cm³.
Pyramid with a rectangular base
V = 1/3 × l × w × h: one third of the base area times the height. Example: a base of 3 m by 4 m and a height of 5 m give 1/3 × 3 × 4 × 5 = 20 m³, which is 20,000 liters.
Triangular prism
V = 1/2 × b × t × l: the area of the triangle (half of its base b times its height t) multiplied by the length l of the prism. Example: b = 6 cm, t = 4 cm and l = 10 cm give 1/2 × 6 × 4 × 10 = 120 cm³.
Volume units and conversions
The calculator converts the result for you, using these exact values:
- 1 m³ = 1,000 liters
- 1 liter = 1,000 cm³ = 1,000 milliliters
- 1 US gallon = 3.785411784 liters
- 1 UK (imperial) gallon = 4.54609 liters
- 1 ft³ = 28.316846592 liters = 1,728 in³
- 1 in³ = 16.387064 cm³
- 1 yd³ = 27 ft³ = 764.554857984 liters
To go from cm³ to liters, divide by 1,000. To go from m³ to liters, multiply by 1,000. For other conversions, such as pints or ounces, use the Unit Converter.
Practical examples
Water tank
A tank measuring 2 m × 1.5 m × 1 m has a volume of 2 × 1.5 × 1 = 3 m³. That is 3,000 liters, or about 792.5 US gallons.
Aquarium
An aquarium of 100 cm × 40 cm × 50 cm measures 200,000 cm³, so 200 liters, about 52.83 US gallons or 43.99 UK gallons. This is the capacity of the empty tank to the brim: the real amount of water is lower, because of the water level, the glass, the gravel and the decorations.
Swimming pool
For a round pool with a 3.6 m diameter filled to a depth of 1.2 m, the radius is 1.8 m: π × 1.8² × 1.2 = 12.2145 m³, or about 12,215 liters (around 3,227 US gallons). A rectangular pool of 8 m × 4 m filled to 1.5 m holds 8 × 4 × 1.5 = 48 m³, which is 48,000 liters.
Frequently asked questions
How do I calculate the volume of an object?
Pick the formula for its shape, measure every dimension in the same unit and multiply as the formula says. The result is in that unit cubed. This volume calculator does it for you and shows the formula with your numbers.
What is the sphere volume formula?
V = 4/3 × π × r³, where r is the radius. For r = 1, the volume is 4.1888. If you know the diameter, divide it by 2 to get the radius, or choose Diameter in the calculator.
What is the pyramid volume formula?
V = 1/3 × base area × height. For a rectangular base, that is 1/3 × l × w × h. A pyramid with a 3 × 4 base and a height of 5 has a volume of 20.
How do I find the volume of a rectangular prism?
Multiply the length, the width and the height: V = l × w × h. For 30 cm, 20 cm and 10 cm, the volume is 6,000 cm³ (6 liters). Choose Rectangular prism in the calculator.
How many liters are in a cubic meter?
1 m³ equals exactly 1,000 liters. A tank of 3 m³ therefore holds 3,000 liters.
How do I convert cm³ to liters?
Divide the number of cubic centimeters by 1,000, because 1 liter is 1,000 cm³. For example, 62.83 cm³ is 0.0628 liters, and 6,000 cm³ is 6 liters.
Are US gallons and UK gallons the same?
No. A US gallon is 3.785411784 liters and a UK (imperial) gallon is 4.54609 liters, so one UK gallon is about 1.2009 US gallons. The calculator shows both.
Can I enter the diameter instead of the radius?
Yes. For the cylinder, sphere, hemisphere and cone, use the Measure you know menu and choose Diameter. The calculator divides it by 2 and shows that step in the calculation.