Geometry calculator: area, perimeter and volume

Area, perimeter, volume and surface area of the main figures (square, rectangle, triangle, circle, trapezoid, polygon, cube, cylinder, cone, sphere

loading Geometry calculator: area, perimeter and volume
About this tool

What is a geometry calculator?

A geometry calculator finds the area, perimeter, volume and surface area of a shape from its measurements. This one covers the flat figures (square, rectangle, triangle by base and height or by three sides, circle, trapezoid, parallelogram, rhombus, regular polygon) and the solids (cube, rectangular box, cylinder, cone, sphere, square pyramid). Students use it to check homework, builders to estimate paint, flooring or concrete, and makers to size a tank, a pipe or a box.

Besides the numbers, the tool draws the figure with your measures and prints the formula used for each result, so you learn the method and not only the answer. You pick the unit of length (mm, cm, m, km, in, ft, yd, mi) and the results come with the right unit: lengths in cm, areas in cm², volumes in cm³. It opens with an example filled in, validates every field (positive numbers, a whole number of sides for polygons, a triangle that can exist) and runs in your browser.

Remember the difference: perimeter is the length around a flat figure, area is the surface inside it, and volume is the space inside a solid. Perimeter is measured in length units, area in squared units and volume in cubed units.

How to calculate area, perimeter and volume

  1. Choose the figure in the list. Flat figures give area; solids give volume.
  2. Pick the unit of length that your measures use.
  3. Fill in the measures shown on the drawing. A trapezoid, for example, needs both bases, the height and the two legs; a regular polygon needs the number of sides and the side length.
  4. Read the results: each line shows the value, its unit and the formula behind it.
  5. Use "Copy results" to paste them into a report or a message.

If you change the unit, type the same measures in the new unit; the tool does not convert between units. To convert a result, such as m² to ft², use the unit converter.

Examples

Circle with radius 5

Area = π × r² = 78.5398; circumference = 2π × r = 31.4159. With a radius in cm, the area is 78.54 cm².

Rectangle 8 by 5

Area = 8 × 5 = 40; perimeter = 2(8 + 5) = 26; diagonal = √(8² + 5²) = 9.434.

Triangle with sides 3, 4 and 5

Heron's formula with p = (3 + 4 + 5) / 2 = 6 gives area = √(6 × 3 × 2 × 1) = 6 and perimeter = 12. Sides 1, 2 and 5 are rejected: a triangle needs each side to be shorter than the sum of the other two.

Cylinder with radius 3 and height 8

Volume = π × 3² × 8 = 226.1947; lateral area = 2π × 3 × 8 = 150.7964; total surface = 2π × 3 × (3 + 8) = 207.3451. A cylinder of that size holds about 226 cm³, which is 226 mL if the unit is cm.

Sphere with radius 3 and cone with radius 3 and height 4

Sphere: volume = 4/3 × π × r³ = 113.0973, surface = 113.0973 (they coincide for r = 3 only). Cone: slant height g = √(3² + 4²) = 5, volume = 37.6991, lateral area = 47.1239, total surface = 75.3982.

Regular hexagon with side 4

Apothem = 4 / (2 tan(π/6)) = 3.4641, perimeter = 24, area = 6 × 4 × 3.4641 / 2 = 41.5692.

Common mistakes

  • Mixing diameter and radius. The formulas use the radius, which is half the diameter. Doubling it by mistake multiplies the area by 4.
  • Mixing units. Do not mix centimeters and meters in the same figure. Convert first.
  • Reading area in the wrong unit. An area is in squared units (m²), a volume in cubed units (m³). 1 m² is 10,000 cm², not 100.
  • Using a slanted side as the height. The height of a triangle, trapezoid or parallelogram is perpendicular to the base, not the slanted side.
  • A triangle that cannot exist. With three sides, the longest must be shorter than the sum of the other two.
  • Using 3.14 for pi. It is fine for rough work, but the tool uses the full precision of the computer's π.

FAQ

What is the difference between area and perimeter?

Perimeter is the distance around the edge of a flat figure; area is how much surface it covers. A 8 by 5 rectangle has perimeter 26 and area 40.

How do I find the area of a circle?

Multiply π by the square of the radius: A = π × r². For r = 5 that is 78.54. If you only know the diameter, halve it first.

How do I calculate the volume of a cylinder or a cone?

Cylinder: V = π × r² × h. Cone: one third of that, V = π × r² × h / 3. A cone and a cylinder with the same base and height differ by exactly a factor of 3.

Is the result rounded?

The values are computed in double precision and shown rounded for reading. Copy the results to keep the displayed digits.

Which formula does a trapezoid use?

A = (a + b) × h / 2, with a and b the parallel bases. The perimeter adds the two legs. If you also need to turn the volume into liters, see the unit converter, or use the percentage calculator to add a waste margin to a material estimate.

Formulas in code

JavaScript

const circle = r => ({ area: Math.PI * r ** 2, circumference: 2 * Math.PI * r });
console.log(circle(5).area.toFixed(4)); // 78.5398

Python

from math import pi, sqrt
r, h = 3, 8
print(pi * r**2 * h)       # 226.1946710584651 (cylinder volume)
print(sqrt(6 * 3 * 2 * 1))  # 6.0 (Heron, sides 3, 4, 5)
Report a problem