By · Updated

Perimeter Calculator

Perimeter of a Semicircle, Ellipse, Trapezoid and Regular Polygon, With Working

No ratings yet
Result

—

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Perimeter Calculator works

This perimeter calculator measures the distance all the way round twelve common shapes, from squares and rectangles to ellipses, sectors and regular polygons. Choose a shape, enter its dimensions in any unit, and you get the perimeter in the same unit with the formula and working shown, ready for fencing, edging or homework.

Perimeter is the total length of a shape's boundary. For polygons it is simply the sum of the sides; formulas like 2(l + w) are shortcuts for adding them. Curved shapes need π: a circle's perimeter, its circumference, is 2πr. An ellipse has no exact simple formula, so the calculator uses Ramanujan's approximation, which is accurate to a few parts per million.

How the perimeter calculator works

Each shape uses its own formula, shown with the answer. A right triangle from two legs uses Pythagoras to find the hypotenuse first. A rhombus from its diagonals finds the side as √((p ÷ 2)² + (q ÷ 2)²). A sector adds two radii to the arc length (θ ÷ 360) × 2πr. A semicircle adds the diameter to half the circumference.

First example. A rectangle 8 m by 5 m has a perimeter of 2 × (8 + 5) = 26 m.

Second example. A right triangle with legs of 6 and 8 has a hypotenuse of 10, so a perimeter of 24.

How many metres of edging go round a circular bed 3 m across? The radius is 1.5 m, so the perimeter is 2 × π × 1.5 ≈ 9.42 m. Buy 10 m to allow for the overlap.

Perimeter formulas for common shapes, each with a worked size

Shape Formula Dimensions Perimeter
Square P = 4s s = 5 20
Square P = 4s s = 12 48
Rectangle P = 2(l + w) l = 8, w = 5 26
Rectangle P = 2(l + w) l = 4.2, w = 3.1 14.6
Triangle P = a + b + c a = 3, b = 4, c = 5 12
Triangle P = a + b + c a = 7, b = 8, c = 9 24
Right triangle (two legs) P = a + b + √(a² + b²) a = 6, b = 8 24
Right triangle (two legs) P = a + b + √(a² + b²) a = 1, b = 1 3.41
Circle C = 2πr r = 1 6.28
Circle C = 2πr r = 10 62.83
Semicircle P = πr + 2r r = 5 25.71
Ellipse P ≈ π(a + b)(1 + 3h ÷ (10 + √(4 − 3h))), h = (a − b)² ÷ (a + b)² a = 5, b = 3 25.53
Ellipse P ≈ π(a + b)(1 + 3h ÷ (10 + √(4 − 3h))), h = (a − b)² ÷ (a + b)² a = 10, b = 2 42.02
Sector P = 2r + (θ ÷ 360) × 2πr r = 6, degrees = 90 21.42
Sector P = 2r + (θ ÷ 360) × 2πr r = 10, degrees = 60 30.47
Trapezoid P = a + b + c + d a = 10, b = 6, c = 5, d = 5 26
Parallelogram P = 2(a + b) a = 9, b = 4 26
Rhombus (diagonals) P = 2√(p² + q²) p = 6, q = 8 20
Regular polygon P = n × s n = 5, s = 4 20
Regular polygon P = n × s n = 6, s = 4 24
Regular polygon P = n × s n = 8, s = 2.5 20
Regular polygon P = n × s n = 12, s = 1 12

Tips

FAQ

How do you find the perimeter of a rectangle?

Add the length and the width and double the result. A garden 12 m long and 7 m wide has a perimeter of 2 × (12 + 7) = 38 m. If you only know the area and one side, divide the area by that side to find the other first, then use the same formula.

How do you work out the perimeter of a semicircle?

Add half the circumference to the straight edge, which is the diameter. With a radius r that is πr + 2r. A semicircular window with a radius of 50 cm has a perimeter of about 157.1 + 100 = 257.1 cm. Forgetting the straight edge is the most common mistake.

Is there an exact formula for the perimeter of an ellipse?

No simple one. The exact value needs an infinite series called an elliptic integral. Ramanujan's 1914 approximation, used here, is close enough for any practical purpose: for a fairly round ellipse the error is far smaller than any tape measure could detect.

What is the difference between perimeter and area?

Perimeter measures the length around a shape; area measures the surface inside it. Two shapes can share a perimeter and have very different areas: a 10 by 10 square and a 19 by 1 rectangle both measure 40 round, but cover 100 and 19 square units.

See also: all Algebra and Geometry tools, Arithmetic, Number Theory, Statistics, Trigonometry and Calculus.

Related tools