Geometry

Volume Calculator

This volume calculator finds the volume of 14 shapes, from a box (length × width × height) to cylinders, cones, spheres, pyramids and a partly filled tank.

Try
Find

Measured straight up. For a cone or pyramid, the vertical height, not the slant. For a tube or pipe, its length.

Lengths accept decimals, fractions (3/4), mixed numbers (5 1/2) and, in feet or inches, feet and inches such as 4" or 10' 6".

Result

Volume of the box: 320 ft³

Volume of the box

320 ft³

V = l × w × h

Formula
V=l×w×hV = l \times w \times h
Liters
9,061.390909 L
US gallons
2,393.766234 gal
UK (imperial) gallons
1,993.227347 UK gal
Cubic yardsHow concrete, soil and mulch are sold
11.85185185 yd³
Surface area2(lw + lh + wh)
304 ft²
Space diagonal√(l² + w² + h²), corner to opposite corner
13.41640786 ft

The box has a volume of 320 ft³. That is 9,061.390909 liters, 2,393.766234 US gallons or 11.85185185 cubic yards.

The box, drawn to scale
l = 10w = 8h = 4
The volume in other units
UnitVolume
Cubic millimeters (mm³)9,061,390,909
Cubic centimeters or milliliters (cm³ (mL))9,061,390.909
Liters (L)9,061.390909
Cubic meters (m³)9.061390909
Cubic inches (in³)552,960
Cubic feet (ft³)320
Cubic yards (yd³)11.85185185
US fluid ounces (fl oz)306,402.0779
US gallons (gal)2,393.766234
UK (imperial) gallons (UK gal)1,993.227347
Step-by-step working (4 steps)
  1. Area of the base

    The base is a rectangle, length times width.

    l×w=10×8=80l \times w = 10 \times 8 = 80
  2. Multiply by the height

    Stacking that base up to the height fills the box.

    V=80×4=320V = 80 \times 4 = 320
  3. Surface area

    S=2(lw+lh+wh)=2(80+40+32)=304S = 2(lw + lh + wh) = 2(80 + 40 + 32) = 304
  4. Convert to liters and gallons

    1 ft³ = 28.31684659 L, because the length factor is cubed. So 320 ft³ = 9,061.390909 L. One US gallon is exactly 3.785411784 L, which gives 2,393.766234 gal.

For a box V = l × w × h; for a cylinder V = πr²h. Each result shows the working, the surface area and the volume in cubic feet, liters, gallons and seven more units, and it can solve backward for a missing dimension.

By Hira Noor, mathematicianLast reviewed Free, no sign-up, runs in your browserReport a problem

How to use this calculator

  1. Choose The volume to calculate it, or A missing dimension to enter a volume and find the height, radius or length that gives it.
  2. Pick a shape. For a room, box, tank or slab, use Rectangular box and type the length, width and height. Round shapes take a radius or a diameter.
  3. Enter the measurements and the length unit. Lengths accept decimals, fractions such as 3/4 and, in feet or inches, feet and inches such as 4" for a 4-inch slab.
  4. Read the volume in that unit cubed, with liters and US gallons beside it, cubic yards for feet and inches, and a table of ten units below.
  5. For liquid in a horizontal round tank, choose Horizontal cylinder tank and enter the depth on the dipstick. In reverse mode, enter the volume to get the depth.
  6. Open the steps to see each number put into the formula. The drawing is to scale, so a mistyped measurement usually looks wrong.

Formulas

Prisms and cylinders: base area × height

Vbox=l×w×h,Vcube=s3,Vcylinder=πr2h,Vtriangular prism=12bhLV_{\text{box}} = l \times w \times h, \quad V_{\text{cube}} = s^3, \quad V_{\text{cylinder}} = \pi r^2 h, \quad V_{\text{triangular prism}} = \tfrac{1}{2}\,b\,h\,L

Plain-text formula: V_box = l × w × h, V_cube = s^3, V_cylinder = πr^2 h, V_triangular prism = 1/2 b h L

l, w, h
length, width and height
r
radius, half the diameter
b, h, L
base and height of the triangular end, and the length of the prism

Any shape with the same cross-section all the way through has a volume equal to the area of that cross-section times its length or height.

Cones and pyramids: one third of base × height

Vcone=13πr2h,Vpyramid=13lwh,Vfrustum=13πh(R2+Rr+r2)V_{\text{cone}} = \tfrac{1}{3}\pi r^2 h, \quad V_{\text{pyramid}} = \tfrac{1}{3}\,l\,w\,h, \quad V_{\text{frustum}} = \tfrac{1}{3}\pi h (R^2 + Rr + r^2)

Plain-text formula: V_cone = (1/3)πr^2 h, V_pyramid = 1/3 l w h, V_frustum = (1/3)πh(R^2 + Rr + r^2)

h
vertical height from the base to the tip, not the slant height

A shape that tapers to a point holds exactly a third of the prism or cylinder with the same base and height. A frustum is a cone with its tip cut off, measured with the bottom radius R and top radius r.

Spheres, hemispheres, caps and ellipsoids

Vsphere=43πr3,Vcap=13πh2(3R−h),Vellipsoid=43πabc=π6LWHV_{\text{sphere}} = \tfrac{4}{3}\pi r^3, \quad V_{\text{cap}} = \tfrac{1}{3}\pi h^2 (3R - h), \quad V_{\text{ellipsoid}} = \tfrac{4}{3}\pi a b c = \tfrac{\pi}{6} L W H

Plain-text formula: V_sphere = (4/3)πr^3, V_cap = (1/3)πh^2(3R − h), V_ellipsoid = (4/3)πabc = (π/6)LWH

A hemisphere is half a sphere, ⅔πr³. A cap is the slice of a sphere of radius R cut off at height h. An ellipsoid is a sphere stretched along three axes; with full lengths L, W and H the formula becomes π/6 × L × W × H, about 0.5236 × L × W × H.

Liquid in a horizontal cylinder tank

V=L[r2arccos⁡r−dr−(r−d)2rd−d2]V = L\left[r^2 \arccos\frac{r-d}{r} - (r-d)\sqrt{2rd - d^2}\right]

Plain-text formula: V = L[r^2 arccos (r − d)/r − (r − d)√(2rd − d^2)]

The liquid’s cross-section is a circular segment of depth d. Its area times the tank length L is the volume. Because the tank is round, half the depth does not mean a quarter or a half of the volume except at exactly half full.

Reading the result

Volume is always in cubic units. A box measured in feet has a volume in cubic feet (ft³), and one in centimeters has a volume in cm³, which is the same as milliliters. Converting volume needs the length factor cubed: 1 ft = 0.3048 m, but 1 ft³ = 0.3048³ = 0.028316846592 m³, or 28.32 liters.

Liters (litres) are the same unit worldwide, but gallons depend on the country. The calculator gives US gallons (exactly 3.785411784 L, or 231 in³) and UK gallons (exactly 4.54609 L) separately. For concrete, gravel, soil and mulch sold by the cubic yard, measure in feet and read the cubic yards line.

Round shapes show an exact answer as a multiple of π, such as 90π for a cylinder of radius 3 and height 10, beside the decimal 282.7433388. Decimals are shown to 10 significant digits, far more than a tape measure justifies, so round the answer to match your measurements.

Volume formulas for every shape, with worked examples

Each row is a result from the calculator above. Lengths can be in any unit; the volume is in that unit cubed.

Volume formulas with one worked example per shape
ShapeFormulaExampleVolume
Rectangular boxV = l × w × hl = 10, w = 8, h = 4320
CubeV = s³s = 327
CylinderV = πr²hr = 3, h = 1090π ≈ 282.7433388
ConeV = ⅓πr²hr = 3, h = 1030π ≈ 94.24777961
SphereV = 4⁄3 πr³r = 5500π/3 ≈ 523.5987756
HemisphereV = 2⁄3 πr³r = 5250π/3 ≈ 261.7993878
PyramidV = ⅓ lwhl = 6, w = 6, h = 9108
Triangular prismV = ½ bhLb = 4, h = 3, L = 1060
FrustumV = ⅓πh(R² + Rr + r²)R = 5, r = 3, h = 8392π/3 ≈ 410.5014401
CapsuleV = πr²(4⁄3 r + a)r = 2, a = 6104π/3 ≈ 108.9085453
EllipsoidV = π⁄6 × L × W × HL = 4, W = 3, H = 24π ≈ 12.56637061
Spherical capV = ⅓πh²(3R − h)R = 5, h = 252π/3 ≈ 54.45427266
Tube (wall)V = π(R² − r²)hR = 2, r = 1.5, h = 1017.5π ≈ 54.97787144
Horizontal tank, partly fullSegment area × Lr = 2, L = 10, d = 124.56739397 (19.55% full)

How to calculate volume in cubic feet, gallons and liters

Measure the length, width and height in the same unit and multiply them. A box 10 ft long, 8 ft wide and 4 ft high holds 10×8×4=32010 \times 8 \times 4 = 320 ft³. If one side is in inches, divide it by 12 first, or type it as 4" with feet selected and the calculator converts it.

To turn cubic feet into US gallons, multiply by 7.480519481 (one cubic foot holds 1,728 in³, and a US gallon is 231 in³). So 320 ft³ is 2,393.766 gallons. For liters, multiply cubic feet by 28.31684659, or cubic centimeters by 0.001. The volume unit converter covers other pairs, such as cubic feet to cubic meters and liters to gallons.

For a shape that is not on the list, split it into pieces that are, find each volume and add them. Subtract any hollow part. An irregular solid object can also be measured by water displacement: the rise in water level in a container, times the container’s base area, is the object’s volume.

Exact volume conversion factors
FromToMultiply by
Cubic feet (ft³)US gallons7.480519481
Cubic feet (ft³)Liters (L)28.316846592
Cubic meters (m³)Liters (L)1,000
Cubic meters (m³)Cubic feet (ft³)35.31466672
Cubic yards (yd³)Cubic feet (ft³)27
US gallonsLiters (L)3.785411784
UK gallonsLiters (L)4.54609
Liters (L)US gallons0.2641720524
Cubic inches (in³)Milliliters (mL)16.387064
Cubic centimeters (cm³)Milliliters (mL)1

Concrete, soil and mulch: area times depth

Materials are a box-shaped volume: the area to cover times the depth. Choose Rectangular box, enter the length and width in feet and the depth as inches (4" for a typical slab), and read the cubic yards. A 10 ft by 10 ft slab 4 in thick is 10×10×412=33.3310 \times 10 \times \tfrac{4}{12} = 33.33 ft³, or 1.234567901 yd³.

For a round slab or post hole, use Cylinder with the diameter and depth. For an L-shaped or curved area, find the area first with the area calculator, then multiply by the depth in the same unit.

For a semicircular bed, use Cylinder and halve the result; for a triangular bed, use Triangular prism with the depth as the length. To estimate weight, multiply the volume by the material’s density: topsoil and gravel are often quoted at roughly 1.1 to 1.7 tonnes per cubic meter, but the supplier’s figure for your material is the one to use. The density converter switches between kg/m³ and lb/ft³.

Suppliers sell by whole or half cubic yards, and some material is lost to uneven ground, spillage and settling, so order a little more than the calculated volume. How much extra depends on the job, so follow the supplier’s guidance.

Finding a missing dimension from the volume

Switch to A missing dimension, choose the shape, type the volume in any unit, and enter the other measurements. The calculator rearranges the formula and shows the algebra. A can 8 cm wide that holds 1 liter must be h=1000π×42=19.89h = \frac{1000}{\pi \times 4^2} = 19.89 cm tall.

For a horizontal tank, enter the volume to get the liquid depth that gives it, which is how dipstick charts are made. For a spherical cap, the formula is a cubic in the height, so the calculator solves it numerically to full precision.

Worked example

How many gallons does a round pool hold?

An above-ground pool is 24 ft across and filled to a depth of 4 ft. How many cubic feet, US gallons and liters of water does it hold?

  1. The pool is a cylinder. The radius is half the diameter: r=24÷2=12r = 24 \div 2 = 12 ft.
  2. Base area: πr2=π×122=144π≈452.389\pi r^2 = \pi \times 12^2 = 144\pi \approx 452.389 ft².
  3. Volume: V=144π×4=576π≈1,809.557V = 144\pi \times 4 = 576\pi \approx 1{,}809.557 ft³.
  4. Gallons: 1,809.557×7.480519481≈13,536.431{,}809.557 \times 7.480519481 \approx 13{,}536.43 US gallons.
  5. Liters: 1,809.557×28.31684659≈51,240.961{,}809.557 \times 28.31684659 \approx 51{,}240.96 L.

Answer: The pool holds about 1,810 ft³ of water, which is about 13,536 US gallons or 51,241 liters.

Frequently asked questions

How do you calculate volume?

Use the formula for the shape. A box is length × width × height, a cylinder is πr²h, a cone or pyramid is one third of base area × height, and a sphere is 4⁄3πr³. A box 10 × 8 × 4 ft has a volume of 320 cubic feet.

How do I calculate cubic feet from length, width and height?

Convert all three measurements to feet, then multiply them. A box 6 ft by 4 ft by 18 in is 6 × 4 × 1.5 = 36 ft³. With feet selected, you can type the 18 in as 18" and the calculator converts it.

How do I convert volume to gallons or liters?

Multiply cubic feet by 7.480519481 for US gallons or by 28.31684659 for liters. For metric, 1 m³ = 1,000 L and 1 cm³ = 1 mL. The calculator shows liters and gallons for every result, and the gallons to liters converter handles any other value.

How many cubic yards of concrete do I need?

Multiply length × width × depth in feet and divide by 27. A 10 × 10 ft slab 4 in thick is 10 × 10 × 0.3333 = 33.33 ft³, or 1.23 yd³. Order a little more than that to allow for uneven ground and spillage.

What is the formula for the volume of a cylinder and a cone?

A cylinder is V = πr²h. A cone with the same radius and height holds exactly a third of that, V = ⅓πr²h. With r = 3 and h = 10, the cylinder is 90π ≈ 282.74 and the cone is 30π ≈ 94.25.

How do I find the height or radius when I know the volume?

Rearrange the formula: for a cylinder, h = V ÷ (πr²) and r = √(V ÷ (πh)). Choose A missing dimension above to do this for any of the 14 shapes, with the volume in liters, gallons or cubic units.

How do I find the volume of liquid in a horizontal tank?

Measure the liquid depth d, the tank radius r and the length L. The volume is L × [r² arccos((r − d)/r) − (r − d)√(2rd − d²)]. Choose Horizontal cylinder tank: a tank 4 ft across and 10 ft long with 1 ft of liquid holds 24.57 ft³, which is only 19.55% of its capacity even though it is a quarter of the way up.

What is the ellipsoid volume formula used in radiology?

Organ and lesion volumes on ultrasound, CT and MRI are commonly estimated as an ellipsoid: V = π/6 × length × width × height, about 0.52 × L × W × H. Choose Ellipsoid with full lengths in cm to get cm³ (mL). It is a geometric estimate; clinical decisions belong to the reporting clinician.

What is the difference between volume and surface area?

Volume is the space inside a solid, in cubic units such as ft³ or liters. Surface area is the total area of its outside, in square units such as ft². A 3 ft cube has a volume of 27 ft³ and a surface area of 54 ft². The calculator shows both.

How accurate are the results?

The arithmetic is done in double precision, about 15 to 16 significant digits, and shown to 10. Unit factors are the exact legal definitions, such as 1 in = 2.54 cm and 1 US gallon = 231 in³. In practice your measurements set the accuracy, not the calculation.

Area Calculator

Area of 15 shapes with the formula, working steps, perimeter and the answer in ft², m², acres and more.

Geometry

Unit Converter

Convert between units in 40 categories with exact factors, formulas and tables.

Tools

Scientific Calculator

Type or tap expressions with exact fractions, memory, variables, constants and complex mode.

Tools

Triangle Calculator

Solve any triangle from SSS, SAS, ASA, AAS or SSA, with law of sines and cosines steps and the ambiguous case.

Trigonometry

Sources and further reading

  1. Prealgebra 2e, Section 9.6: Solve Geometry Applications: Volume and Surface Area (opens in a new tab), OpenStax, Rice University
  2. Spherical Cap (opens in a new tab), Wolfram MathWorld (Eric W. Weisstein)
  3. Conical Frustum (opens in a new tab), Wolfram MathWorld (Eric W. Weisstein)
  4. Circular Segment (opens in a new tab), Wolfram MathWorld (Eric W. Weisstein)
  5. NIST Handbook 44, Appendix C: General Tables of Units of Measurement (opens in a new tab), National Institute of Standards and Technology

Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?