How to find the volume and area of common shapes
Volume is the space inside a solid, in cubic units. Area is the space inside a flat shape, in square units. Both come from a few measurements and one formula per shape. This guide gives each formula with a worked example. To skip the arithmetic, use the volume calculator or the area calculator.
How to find volume
- Measure in one unit. If the length is in feet and the width in inches, convert one first.
- Pick the formula for the shape. Any solid with the same cross-section all the way through, such as a box, a cylinder or a prism, is the area of the end times the length. A cone or pyramid is a third of that.
- Work it out, and cube the unit. Lengths in centimeters give a volume in cubic centimeters (cm³).
- Convert if you need to. 1 cm³ is 1 milliliter, 1 cubic foot is 7.48 US gallons, and 1 cubic meter is 1,000 liters.
| Shape | Volume |
|---|---|
| Rectangular box | V = l × w × h |
| Cube | V = a³ |
| Cylinder | V = π × r² × h |
| Cone | V = π × r² × h ÷ 3 |
| Sphere | V = 4 ÷ 3 × π × r³ |
| Hemisphere | V = 2 ÷ 3 × π × r³ |
| Rectangular pyramid | V = l × w × h ÷ 3 |
| Triangular prism | V = b × h ÷ 2 × l |
In every formula, r is the radius (half the diameter), h is the height measured straight up, and π is about 3.14159.
Volume of a rectangle (rectangular box) and a cube
A rectangle is flat, so strictly it has an area, not a volume. When people ask for the volume of a rectangle, they mean a rectangular box, also called a rectangular prism or a cuboid. Multiply its three sides:
V = length × width × height
A room 12 ft long, 10 ft wide and 8 ft high holds 12 × 10 × 8 = 960 cubic feet. A cube has three equal sides, so its volume is the side cubed: a box 5 in on each side holds 5³ = 125 cubic inches.
Volume of a cylinder
A cylinder is a circle stretched to a height, so multiply the circle’s area by the height:
V = π × r² × h
A can 6 cm across and 10 cm tall has a radius of 3 cm: π × 3² × 10 = 282.74 cm³, or about 283 milliliters. Measure the diameter across the widest part of the circle and halve it; using the diameter as the radius gives an answer four times too big.
Volume of a cone and a pyramid
A cone holds exactly a third of a cylinder with the same base and height, and a pyramid a third of the box it fits in:
Cone: V = π × r² × h ÷ 3
Pyramid: V = base area × h ÷ 3
A cone 6 cm across and 10 cm tall holds π × 3² × 10 ÷ 3 = 94.25 cm³, a third of the 282.74 cm³ can above. A pyramid with a 6 by 4 base and a height of 9 holds 6 × 4 × 9 ÷ 3 = 72 cubic units. The height is the vertical distance from the center of the base to the tip, not the length along the sloping side. These formulas are for right cones and pyramids, with the tip straight above the center of the base. Work one out with the cone volume calculator or the pyramid volume calculator.
Volume of a sphere and a hemisphere
V = 4 ÷ 3 × π × r³
A ball 9 in across has a radius of 4.5 in: 4 ÷ 3 × π × 4.5³ = 381.7 cubic inches. A hemisphere, half a sphere, is 2 ÷ 3 × π × r³. A sphere fills two thirds of the smallest cylinder it fits in. Try it in the sphere volume calculator.
Volume of a triangular prism
A triangular prism, such as a tent or a wedge, is a triangle stretched to a length. Find the triangle’s area, then multiply by the length:
V = b × h ÷ 2 × l
A prism whose triangle has a base of 4 and a height of 3, and that is 10 long, holds 4 × 3 ÷ 2 × 10 = 60 cubic units. Try it in the triangular prism calculator.
Pipe volume
The water a pipe holds is the volume of a cylinder with the pipe’s inside diameter d:
V = π × (d ÷ 2)² × length
A pipe’s nominal size isn’t its inside diameter. A 2-inch Schedule 40 steel pipe is 2.375 in outside and 2.067 in inside, according to the ASME B36.10 dimension table. Ten feet (120 in) of it holds π × 1.0335² × 120 = 402.7 cubic inches, which is 402.7 ÷ 231 = 1.74 US gallons. The volume of the pipe wall is π × ((D ÷ 2)² − (d ÷ 2)²) × length, where D is the outside diameter. Work it out with the pipe volume calculator.
Tank volume, full and partly full
| Tank | Full | Filled to depth f |
|---|---|---|
| Vertical cylinder | π × (d ÷ 2)² × h | π × (d ÷ 2)² × f |
| Rectangular | l × w × h | l × w × f |
| Horizontal cylinder | π × r² × l | l × (r² × acos((r − f) ÷ r) − (r − f) × √(2 × r × f − f²)) |
A vertical tank 4 ft across and 6 ft tall holds π × 2² × 6 = 75.4 cubic feet, about 564 US gallons. In a vertical or rectangular tank the liquid grows evenly with the depth, so half the depth is half the volume.
A horizontal tank is narrow at the bottom and top and widest in the middle, so the liquid is the area of a circular segment times the length. A horizontal tank 4 ft across and 10 ft long holds 940 US gallons when full. Filled to 1 ft, a quarter of its depth, it holds 24.57 cubic feet, about 184 gallons, which is only 19.6% of the tank. At half the depth it’s exactly half full. Use the tank’s inside measurements. These formulas assume flat ends; tanks with rounded ends hold a little more.
How to find area
Area works the same way as volume, but for a flat shape: measure in one unit, use the shape’s formula, and the answer is in that unit squared. A rectangle in feet gives square feet (ft²). How many measurements you need depends on the shape: a circle needs only its radius, a rectangle its length and width, and a trapezoid, or a triangle known by its sides, three.
Area of a rectangle, triangle, circle, trapezoid and more
| Shape | Area | Example |
|---|---|---|
| Rectangle | A = l × w | 12 × 15 = 180 |
| Square | A = a² | 5² = 25 |
| Triangle | A = b × h ÷ 2 | 10 × 4 ÷ 2 = 20 |
| Circle | A = π × r² | π × 5² = 78.54 |
| Trapezoid | A = (a + b) ÷ 2 × h | (6 + 10) ÷ 2 × 4 = 32 |
| Parallelogram | A = b × h | 7 × 3 = 21 |
| Ellipse | A = π × a × b | π × 5 × 3 = 47.12 |
Rectangle and square
Measure two sides that meet at a corner and multiply them: A = l × w. A room 12 ft by 15 ft is 12 × 15 = 180 square feet. A square has four equal sides, so A = a²: a tile 30 cm on each side is 900 cm². For an L-shaped room, split it into two rectangles and add their areas. Use the rectangle area calculator.
Triangle
A triangle is half of a rectangle with the same base and height: A = b × h ÷ 2. The height is measured at a right angle to the base, not along a side. When you only know the three sides a, b and c, use Heron’s formula: find s = (a + b + c) ÷ 2, then A = √(s × (s − a) × (s − b) × (s − c)). A triangle with sides 5 cm, 5 cm and 6 cm has s = 8 and an area of √(8 × 3 × 3 × 2) = 12 cm². A triangle with a base of 10 in and a height of 4 in is 10 × 4 ÷ 2 = 20 square inches. Use the triangle area calculator for base and height, or Heron’s formula for three sides.
Circle
A = π × r². A circle 10 in across has a radius of 5 in and an area of 78.54 square inches. From the diameter, A = π × d² ÷ 4 gives the same answer. The distance around the circle, its circumference, is 2 × π × r, here 31.42 in. Use the circle area calculator, which takes the radius or the diameter.
Trapezoid
Measure the two parallel sides a and b, and the height h: the distance between them at a right angle, not the length of a sloping side. Average the parallel sides and multiply by the height: A = (a + b) ÷ 2 × h. A garden bed with parallel sides of 6 ft and 10 ft, 4 ft apart, is (6 + 10) ÷ 2 × 4 = 32 square feet. Outside North America this shape is usually called a trapezium. Use the trapezoid area calculator.
Parallelogram
A parallelogram is base × height, with the height measured at a right angle to the base, not along the slanted side. One with a base of 7 m and a height of 3 m is 7 × 3 = 21 m², whatever its angle. Use the parallelogram area calculator.
Ellipse
An ellipse is π × a × b, where a and b are the semi-axes: half its longest width and half its shortest, measured from the center. An oval rug 10 ft by 6 ft has a = 5 ft and b = 3 ft, so its area is π × 5 × 3 = 47.12 square feet. An ellipse’s perimeter has no exact simple formula; Ramanujan’s approximation gives 25.53 ft for that rug. Use the ellipse area calculator.
Surface area
Surface area is the area of every face of a solid added together, as if you unfolded it flat. It’s what you need for paint, wrapping or sheet material.
| Solid | Surface area | Example |
|---|---|---|
| Cube | 6 × a² | a = 2: 24 |
| Rectangular box | 2 × (l × w + l × h + w × h) | 4 × 3 × 2: 52 |
| Cylinder | 2 × π × r² + 2 × π × r × h | r = 3, h = 10: 245.04 |
| Cone | π × r² + π × r × s | r = 3, h = 4, s = 5: 75.4 |
| Sphere | 4 × π × r² | r = 3: 113.1 |
| Square pyramid | a² + 2 × a × s | a = 6, h = 4, s = 5: 96 |
These are closed solids: a cylinder with both ends, a right cone with its base, and a right square pyramid, whose tip is straight above the center of its base. For a cone and a pyramid, s is the slant height, measured along the sloping side. Work it out from the vertical height with Pythagoras: s = √(r² + h²) for a cone, and s = √((a ÷ 2)² + h²) for a square pyramid. Leave out the top and bottom circles of a cylinder for an open tube, or the base of a cone for a party hat; the calculator shows that side area separately. Work one out with the surface area calculator.
Converting cubic and square units
A conversion factor is squared for area and cubed for volume. A foot is 12 inches, so a square foot is 12 × 12 = 144 square inches and a cubic foot is 12 × 12 × 12 = 1,728 cubic inches.
| From | Equals |
|---|---|
| 1 cubic foot | 1,728 cubic inches, 7.48 US gallons, 28.32 liters |
| 1 cubic yard | 27 cubic feet |
| 1 US gallon | 231 cubic inches, 3.785 liters |
| 1 imperial gallon | 4.546 liters |
| 1 liter | 1,000 cubic centimeters (1 cm³ is 1 milliliter) |
| 1 cubic meter | 1,000 liters |
| 1 square foot | 144 square inches |
| 1 square yard | 9 square feet |
| 1 acre | 43,560 square feet, about 4,047 square meters |
| 1 hectare | 10,000 square meters, about 2.47 acres |
Common mistakes
- Using the diameter as the radius. The radius is half the diameter. Squaring the diameter makes a circle’s area four times too big, and cubing it makes a sphere eight times too big.
- Mixing units. A tank measured as 4 ft by 30 in has to be in one unit before you multiply.
- Slant height instead of height. Volume formulas for cones and pyramids use the vertical height. Surface area uses the slant height.
- Converting with the length factor. 1 square meter is 10,000 square centimeters, not 100.
- Scaling a horizontal tank by depth. A horizontal tank a quarter deep is less than a fifth full.
Sources
Conversion factors from NIST’s Guide to the SI, Appendix B.8, which defines the inch as exactly 2.54 cm and the imperial gallon as exactly 4.54609 liters; the US gallon is 231 cubic inches. Heron’s formula, the circular segment and the ellipse from Wolfram MathWorld (Heron’s formula, circular segment, ellipse). Steel pipe sizes from the ASME B36.10 table at The Engineering ToolBox. Checked October 2026.