StringMash.com

Perimeter calculator

The distance around a shape, with every step shown and the shape drawn to scale.

4 characters
Updates as you type
Perimeter P16 cm
The working and the drawing are below

Show the steps
5 cm3 cm
  1. Two lengths and two widths: P = 2(l + w) = 2 × (5 + 3) = 2 × 8 = 16 cm.

Using the calculator

Pick the shape under Shape, then type its measurements separated by commas or spaces. Units only changes the label; the numbers are worked the same way.

Rectangle: the length and width, like 5, 3. Square: one side. Triangle: the three sides, like 3, 4, 5. Circle: the radius, or the diameter written as d = 10.

Regular polygon: the number of sides, then the side length, like 6, 4 for a hexagon with sides of 4. If you know the distance from the centre to a corner instead, write it as R, like n = 6, R = 4.

Trapezoid: the two parallel sides first, then the two legs, like 10, 6, 5, 5. Polygon from corners: each corner as an x, y pair in order around the shape, like (0, 0) (4, 0) (4, 3).

The formulas

Perimeter is the distance around a two-dimensional shape. For any polygon it is the sum of the side lengths, and the formulas for particular shapes are shortcuts for that sum.

Rectangle: P = 2(l + w), two lengths and two widths. Square: P = 4s. Triangle: P = a + b + c. Regular polygon with n sides of length s: P = ns. Measured from the centre to a corner, R, each side is 2R sin(π/n), so P = 2nR sin(π/n).

A circle's perimeter is called its circumference: C = 2πr, or πd. The answer is given exactly, as 10π, and as a decimal. The circle calculator works the area, arcs and sectors from the same radius.

A polygon from its corners

Each side's length is the distance between two neighbouring corners, from the distance formula: √((x₂ − x₁)² + (y₂ − y₁)²), which is Pythagoras applied to the horizontal and vertical gaps. The last corner joins back to the first, so don't repeat the starting point.

When every corner has whole-number coordinates, the sides are square roots of whole numbers, and the calculator collects them into an exact answer such as 4√2 alongside the decimal. The distance formula calculator shows the working for a single pair of points.

Not every set of sides makes a shape

Three lengths make a triangle only if each pair adds up to more than the third. 3, 4 and 8 can't close, because 3 + 4 is less than 8, and the calculator says so rather than giving a perimeter for a shape that can't exist.

A trapezoid has a similar rule. With the parallel sides a and b and the legs c and d, the shape exists only when |d − c| < |b − a| < c + d. If the parallel sides are equal it is a parallelogram, and the legs must be equal too.

Trapezoid is the American word. In British English the same shape, a quadrilateral with a pair of parallel sides, is a trapezium.

Questions

How do you find the perimeter of a rectangle?

Add the length and width and double it: P = 2(l + w). A 5 by 3 rectangle has a perimeter of 2 × 8 = 16.

What is the perimeter of a circle called?

The circumference. It is 2πr, or π times the diameter, so a circle of radius 5 has a circumference of 10π, about 31.42.

How do I find the perimeter of a shape from coordinates?

Use the distance formula on each pair of neighbouring corners, including the last back to the first, and add the lengths. Choose Polygon from corners and type the points in order.

Is perimeter the same as area?

No. Perimeter is a length, the distance around the edge, measured in units like cm. Area is the space inside, measured in square units like cm².

Sources

Added . Last updated and reviewed . What's new