Area and Volume Calculator: Formulas for 13 Shapes and How to Use Them
By FindMySum · Last reviewed
An area and volume calculator saves you from hunting down the right formula every time you need to know how much floor a rug covers, how much water a tank holds or how much paint a sphere needs. This one covers 13 shapes: seven flat shapes (circle, square, rectangle, triangle, trapezoid, ellipse and parallelogram) and six solids (cube, sphere, cylinder, cone, rectangular prism and square pyramid). For each it gives the main measurement, area for flat shapes and volume for solids, and where the shape has one, a second measurement: perimeter, circumference or surface area.
Area, volume and the units they come in
Area is measured in square units and volume in cubic units, so the unit of the answer depends on the unit of the measurements you type. Enter centimetres and the area is in square centimetres; enter feet and the volume is in cubic feet. The calculator doesn't ask for a unit because the arithmetic is the same either way, but every measurement for one shape must be in the same unit. Mixing a length in metres with a width in centimetres is the single most common source of wrong answers.
The relationship between units also scales with the power. A metre is 100 centimetres, so a square metre is 10,000 square centimetres and a cubic metre is 1,000,000 cubic centimetres, or 1,000 litres. NIST SP 811 lists the exact conversion factors if you need to move between metric and imperial; the inch has been defined as exactly 2.54 cm since 1959.
The formulas
| Shape | Main result | Second result |
|---|---|---|
| Circle | A = πr² | C = 2πr |
| Square | A = s² | P = 4s |
| Rectangle | A = l × w | P = 2(l + w) |
| Triangle | A = b × h ÷ 2 | none |
| Trapezoid | A = (a + b) × h ÷ 2 | none |
| Ellipse | A = π × a × b | P (Ramanujan approximation) |
| Parallelogram | A = b × h | none |
| Cube | V = s³ | SA = 6s² |
| Sphere | V = 4/3 × πr³ | SA = 4πr² |
| Cylinder | V = πr²h | SA = 2πr² + 2πrh |
| Cone | V = 1/3 × πr²h | SA = πr² + πr × slant height |
| Rectangular prism | V = l × w × h | SA = 2(lw + lh + wh) |
| Square pyramid | V = 1/3 × b²h | SA = b² + 2b × slant height |
A few patterns make these easier to remember. A triangle is half of a parallelogram with the same base and height, and a trapezoid is the average of its two parallel sides times the height. Any prism or cylinder is its base area times its height. A cone or pyramid holds exactly one third of the prism or cylinder that would enclose it, a result Archimedes and Eudoxus worked out more than two thousand years ago. A sphere holds two thirds of the cylinder that just fits around it.
Triangles, trapezoids and parallelograms have no perimeter result here because their base and height don't fix the lengths of the slanted sides. Two triangles with the same base and height can have very different side lengths, so the calculator can't know the distance around one. Use the triangle calculator when you have side lengths.
Ellipses, slant heights and precision
An ellipse has a simple exact area but no simple exact perimeter: the true value is an elliptic integral, the kind of function catalogued in the NIST Digital Library of Mathematical Functions. By default the calculator uses Ramanujan's second approximation, which is far closer than you could measure for any ellipse you'd draw or cut, and the result is labelled approximate.
For a cone and a square pyramid, the surface area needs the slant height, the distance up the sloping face. The calculator works it out from the perpendicular height with Pythagoras: for a cone it is the square root of r² + h², and for a pyramid the square root of (b ÷ 2)² + h². Results are kept to 10 significant digits, which is more precision than any tape measure gives you.
Worked example: the calculator's defaults
The calculator opens on a circle measured by its radius, with a radius of 5.
- Square the radius: 5 × 5 = 25.
- Multiply by π for the area: 25 × 3.14159265… = 78.53981634 square units.
- Multiply the radius by 2π for the circumference: 2 × π × 5 = 10π = 31.41592654 units.
- The diameter is twice the radius: 10.
If you switch the circle to "measured by diameter" and keep the default diameter of 10, the radius is 10 ÷ 2 = 5 and the results are identical.
A second example: cylinder and cone
Switch the shape to cylinder. It uses the default radius of 5 and height of 4.
- Volume: π × 5² × 4 = 100π = 314.1592654 cubic units.
- Surface area: two circular ends of π × 25 each (50π) plus the curved side, 2π × 5 × 4 = 40π, for a total of 90π = 282.7433388 square units.
Now switch to cone with the same radius and height. Its volume is 104.7197551 cubic units, exactly one third of the cylinder's 314.1592654. The slant height is the square root of 5² + 4², or about 6.403, and the surface area is 179.1198567 square units: the circular base (25π) plus the sloping side (π × 5 × 6.403).
Kites, ellipsoids, tetrahedra and triangular pyramids
Four more shapes use the same approach. A kite's diagonals cross at right angles, so its area is half their product, A = (p × q) / 2: diagonals of 6 and 4 give 12 square units, because the kite is two triangles joined along one diagonal. An ellipsoid is a sphere stretched along three axes; its volume is (4/3)πabc, so semi-axes of 5, 3 and 2 hold 40π ≈ 125.66 cubic units. Its surface area has no exact elementary formula, and the calculator uses Knud Thomsen's approximation (about 134.81 square units here, within roughly 1% for any ellipsoid and exact for a sphere).
A regular tetrahedron has four equilateral faces with edge a: V = a³ / (6√2) and SA = √3 a², so an edge of 4 gives 7.54 cubic units and 27.71 square units. A general triangular pyramid stands on any triangle: its volume is one third of the base triangle's area times the height. A base triangle 6 wide and 3 high has an area of 9, so a pyramid 4 high holds 12 cubic units.
For an ellipse, the calculator now also shows the eccentricity e = √(1 − b²/a²), which measures how far it is from a circle: 0 for a circle and 0.8 for the default ellipse with a = 5 and b = 3.
Ramanujan or the exact series: choosing the perimeter method
Two ways of getting the ellipse perimeter are in common use, so the calculator lets you pick one with the "Ellipse perimeter method" menu and shows the other beside it. Ramanujan's approximation (his second formula from 1914) is the one most textbooks and online calculators quote: P ≈ π(a + b)(1 + 3h / (10 + √(4 − 3h))), where h = (a − b)² / (a + b)². The exact series, credited to Gauss and Kummer, writes the same elliptic integral as P = π(a + b) × (1 + h/4 + h²/64 + h³/256 + 25h⁴/16384 + …), the squared binomial coefficients of one half times powers of h. The calculator keeps adding terms until the next one no longer changes the answer, so the result agrees with the elliptic-integral value to the 10 digits shown.
For everyday shapes the two agree to many digits. With a = 5 and b = 3, the series gives 25.52699886 and Ramanujan 25.52699886, a difference in the tenth digit. The gap opens up only for long, thin ellipses: with a = 10 and b = 1 the exact perimeter is 40.63974180 and Ramanujan gives 40.63927210, about 0.001% low, and for a = 1 and b = 0.001 (practically a flat line, whose perimeter tends to 4a) the series gives 4.00001559 and Ramanujan 3.99850189. Choose the series when you need a reference value or are checking someone else's work; Ramanujan is fine for cutting, sewing or landscaping.
What the calculator can't account for
The formulas describe perfect shapes. Real objects rarely are, so a few cautions apply:
- Measure the right height. Triangles, parallelograms, trapezoids, cones and pyramids all need the perpendicular height, measured at a right angle to the base, not the length of a sloping side.
- Inside or outside? For a container, inside measurements give its capacity; outside measurements include the walls. For a tank or pipe, the difference can be several percent.
- Irregular shapes need splitting. An L-shaped room is two rectangles; a running track is a rectangle plus two half circles. Calculate each part and add them, or subtract a cut-out from a larger shape.
- Rounded inputs give rounded outputs. If you measure a radius to the nearest centimetre, the area is only as good as that, however many digits appear. Entering a circumference of 31.4159 rather than the full 10π gives a radius of 4.99999…, not exactly 5, for the same reason.
Using the result
For flooring, tiling or a room plan, the square footage calculator handles several rooms and waste allowance. For a slab, footing or post hole, the concrete calculator turns volume into bags or cubic yards, and the mulch, gravel and soil calculator does the same for landscaping material. To change the unit of an area or volume you have already found, use the area converter or the volume converter. For anything you're ordering, add a margin: suppliers and building codes, not geometry, set how much extra you need.
More questions
Why does doubling the radius make the area four times bigger?
Area grows with the square of length and volume with the cube. Double the radius of a circle and its area rises by 2 × 2 = 4; double the radius of a sphere and its volume rises by 2 × 2 × 2 = 8. The same rule applies to every shape on this calculator, which is why a 16-inch pizza has almost twice the area of a 12-inch one (256 versus 144 in the squared-diameter comparison).
How do I convert my answer from square feet to square metres?
Convert the result with the square (or cube) of the length factor. One foot is exactly 0.3048 m, so one square foot is 0.3048² = 0.09290304 m² and one cubic foot is 0.3048³, about 0.0283168 m³. It is usually simpler to convert each measurement to metres before you enter it, so the result comes out in square or cubic metres directly.
Does the pyramid option work for a rectangular or triangular base?
No. It assumes a square base with the apex directly above the centre. The volume rule, one third of the base area times the height, holds for any pyramid, so for another base shape you can find the base area separately and multiply by height ÷ 3. The surface area formula, though, only applies to the square-based case.
How do I find the volume of a hollow pipe or tube?
Work out two cylinders and subtract. Calculate the volume using the outside radius, then again using the inside radius with the same length, and take the difference. That gives the volume of material in the wall. The inside cylinder alone gives the volume the pipe can hold.
How many litres will a shape hold?
Enter the measurements in centimetres and divide the volume in cubic centimetres by 1,000, because one litre is exactly 1,000 cm³. If you measure in metres, multiply the cubic-metre result by 1,000 instead. For a container, use the inside measurements so the wall thickness isn't counted.
Why does the cone ask for the perpendicular height and not the slant height?
The volume formula needs the vertical distance from the base to the tip. The slant height, measured along the side, is longer and would overstate the volume. If you only know the slant height s and radius r, the perpendicular height is the square root of s² − r², which you can find with the triangle calculator.
Why is a pyramid one third of a prism?
Three pyramids with the same base and height fill the prism on that base exactly, which is why every pyramid and cone uses V = (1/3) × base area × height, whatever the shape of the base: square, triangle or circle.
Which ellipse perimeter method should I pick?
Either is fine for practical work. Ramanujan's approximation, the default, is what most textbooks print and is within 0.0005% for ellipses up to five times longer than they are wide. The exact series sums the Gauss–Kummer expansion of the elliptic integral until it stops changing, so it matches the true perimeter to the 10 digits shown even for very flat ellipses. The calculator shows the other method's answer next to yours.
Can I get the surface area of a triangular pyramid?
Only for the regular tetrahedron, where all four faces are equal triangles and SA = √3 a². A general triangular pyramid needs the slant height of each face, so the calculator gives its volume only.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.