Skip to content
Calculator.hair

Perimeter Calculator

Press Calculate to see the results.

Pick a shape and enter its measurements to find the perimeter, or the circumference of a circle. The result shows the formula with your numbers filled in, along with the area and other useful lengths.

What Is Perimeter?

The perimeter of a flat shape is the total distance around its edge. If you walked once around a field, the distance you covered would be its perimeter. It is a length, so it is measured in units such as centimeters, meters or feet, unlike area, which measures the space inside and is given in square units. For a circle the perimeter has its own name, the circumference.

Perimeter matters whenever you buy something by the running length: fencing for a garden, skirting board for a room, edging for a flower bed or trim for a quilt. Area tells you how much paint, turf or flooring to buy; perimeter tells you how much goes around the outside.

Formula

Perimeter = sum of all side lengths; circle: C = 2πr = πd

r, d
the radius and diameter of a circle
π
pi, about 3.14159, the ratio of any circle's circumference to its diameter

How to Find the Perimeter

For any polygon, add the lengths of all its sides. Shapes with equal sides allow shortcuts: a square is 4 times its side, a rectangle or parallelogram is twice the sum of two neighboring sides, and a regular polygon is the number of sides times the side length. Choose a shape from the list, enter the lengths in one unit, and the calculator shows the sum it used. All inputs must share the same unit; convert first if one measurement is in feet and another in inches.

Worked example with the defaults: a rectangle 8 cm long and 5 cm wide has a perimeter of 2 × (8 + 5) = 26 cm. Its area is 8 × 5 = 40 cm², and its diagonal is √(8² + 5²) ≈ 9.434 cm.

Area and Perimeter Formulas

The calculator uses these formulas. The area is shown too, because the two are so often needed together:

ShapePerimeterArea
Square, side s4ss²
Rectangle, length l, width w2(l + w)l × w
Triangle, sides a, b, ca + b + c√(s(s − a)(s − b)(s − c)), s = half the perimeter
Circle, radius r2πrπr²
Ellipse, semi-axes a, b≈ π[3(a + b) − √((3a + b)(a + 3b))]πab
Trapezoid, bases a, b, legs c, da + b + c + d½(a + b) × h
Parallelogram, sides a, b2(a + b)base × height
Regular polygon, n sides of length sn × sns² ÷ (4 tan(180°/n))
Sector, radius r, angle θ in degrees2r + πrθ/180πr²θ/360

Calculating the Circumference of a Circle

The circle circumference formula is C = 2πr, or equivalently C = πd, since the diameter is twice the radius. A circle with a 5 cm radius has a circumference of 2 × π × 5 ≈ 31.416 cm. If you know the area instead, take r = √(A ÷ π) first. People sometimes search for an area of circumference formula, but the two are different quantities. Area is πr² and circumference is 2πr, so they can be converted into each other with A = C² ÷ (4π).

A sector, a pie slice of a circle, has a perimeter made of two radii plus the arc. The arc length is the fraction of the full circumference given by the angle: for a 60° sector of radius 5, the arc is 2π × 5 × 60/360 ≈ 5.236, and the perimeter is 10 + 5.236 = 15.236.

Ellipses and Trapezoids

Unlike the circle, an ellipse has no simple exact perimeter formula; the exact value needs an infinite series. The calculator uses an approximation published by Srinivasa Ramanujan in 1914, which is exact for a circle and very accurate for everyday ellipses. For semi-axes 5 and 3 it gives about 25.527, less than one part in two million away from the exact value. Accuracy falls slowly as the ellipse gets flatter: at a 5 to 1 ratio the error is about 0.02%, and even a nearly flat ellipse is off by only about 0.4%.

For a trapezoid the perimeter is just the four sides added together, but not every set of four lengths makes a trapezoid. If you slide one leg over to meet the other, the two legs and the difference between the bases form a triangle. The calculator checks that this triangle exists and uses its height to give the trapezoid's height and area. Bases 10 and 6 with legs of 5 give a height of about 4.583 and an area of about 36.66.

Frequently asked questions

How do you find the perimeter of a rectangle?

Add the length and width, then double the total: P = 2(l + w). A 8 by 5 rectangle has a perimeter of 26.

What is the circumference of a circle?

It is the perimeter of the circle, the distance around it. Calculate it as C = 2πr, or π times the diameter.

Is perimeter the same as area?

No. Perimeter is the length of the boundary, in units such as meters. Area is the surface enclosed, in square units such as square meters. Two shapes can share a perimeter and have very different areas.

How do I find the perimeter of an irregular shape?

Measure every side and add the lengths. For curved parts, measure along the curve with a flexible tape, or break the shape into straight segments and arcs whose lengths you can calculate.

Why does the triangle option reject my sides?

Three lengths only make a triangle if each one is shorter than the other two added together. Sides of 2, 3 and 6 fail because 2 + 3 is less than 6.

Updated by Calculator.hair. How we build and check our calculators