Skip to content
MoneyDeck

Perimeter Calculator

Perimeter and area of rectangles, triangles, circles, ellipses and more

Updated · Free, no signup

Perimeter

40

Area

96 sq units

Perimeter formula used

P = 2(l + w)

About the Perimeter Calculator

This perimeter calculator finds the distance around ten common 2D shapes: rectangles, squares, triangles, circles, ellipses, parallelograms, trapezoids, regular polygons, circle sectors and rhombuses. Pick the shape, enter its dimensions in any unit, and you get the perimeter (or circumference) along with the area when it can be worked out from the same measurements.

Perimeter is what you need when buying anything that runs along an edge — fencing, skirting board, garden edging, trim, ribbon or a picture frame — while area tells you how much surface is inside. Students can use it to check homework, and the formula shown for each shape makes the working easy to follow.

The ellipse uses Ramanujan’s second approximation, which is accurate to a tiny fraction of a percent for everyday shapes because an ellipse has no exact elementary perimeter formula. Everything else is exact. Keep all lengths in the same unit; the perimeter comes out in that unit and the area in square units.

With the default inputs, the perimeter is 40. Change any value above to recalculate instantly.

How to use the perimeter calculator

  1. 1Choose the shape.
  2. 2Enter the dimensions it asks for, all in the same unit.
  3. 3Read the perimeter in that unit and the area in square units.
  4. 4Add a little extra (5–10%) when buying edging or trim to cover corners and waste.

Formula and method

Rectangle 2(l + w) · Square 4s · Triangle a + b + c · Circle 2πr · Polygon n·s · Sector 2r + rθ

Perimeter is the total length of a shape’s boundary, so for any polygon it is just the sum of the side lengths; the shortcuts above group equal sides. A circle’s perimeter is its circumference, 2πr, and a sector adds two radii to the arc length rθ, where θ is the central angle in radians (degrees × π/180).

An ellipse has no exact closed-form perimeter, so Ramanujan’s second approximation is used — its error is far below measurement precision for real-world ovals. Areas use the standard formulas: l·w, s², Heron’s formula for three sides, πr², πab, a·b·sin θ for parallelograms and rhombuses, n·s² ÷ (4·tan(π/n)) for regular polygons, and ½(a + b)·h for trapezoids, with h derived from the four sides.

l, w
Length and width
s
Side length
r
Radius
n
Number of sides of a regular polygon
θ
Angle

Worked examples

Rectangle 12 × 8 ft (fencing a garden bed)

P = 2 × (12 + 8) = 40 ft of edging, enclosing 12 × 8 = 96 sq ft.

Circle with radius 5

C = 2π × 5 ≈ 31.42 and the area is π × 5² ≈ 78.54.

Oval rug 20 × 12 ft (ellipse a = 10, b = 6)

h = (10 − 6)² ÷ 16² = 0.0625. Ramanujan’s formula gives P ≈ π × 16 × (1 + 0.1875 ÷ (10 + √3.8125)) ≈ 51.05 ft of binding. Area = π × 10 × 6 ≈ 188.5 sq ft.

Isosceles trapezoid: bases 10 and 6, legs 5

P = 10 + 6 + 5 + 5 = 26. Each leg overhangs by 2, so the height is √(25 − 4) ≈ 4.583, and the area is ½ × 16 × 4.583 ≈ 36.66.

Regular octagon with 5 cm sides

P = 8 × 5 = 40 cm. Area = 8 × 25 ÷ (4 × tan 22.5°) ≈ 120.71 cm².

Frequently asked questions

What is the difference between perimeter and area?+

Perimeter is the length around the outside of a shape, measured in units like metres or feet. Area is the amount of surface inside, measured in square units like m² or sq ft.

How do you find the perimeter of a rectangle?+

Add the length and width and double the result: P = 2(l + w). A 12 × 8 rectangle has a perimeter of 2 × 20 = 40.

Is circumference the same as perimeter?+

Yes — circumference is simply the name for the perimeter of a circle. It equals 2πr, or π times the diameter.

Why is the ellipse perimeter an approximation?+

The exact perimeter of an ellipse requires an elliptic integral, which has no simple formula. Ramanujan’s second approximation used here is essentially exact for everyday ovals (error under one part per billion when the long axis is at most twice the short one, about 0.001% at 10 : 1) and never worse than about 0.04%, even for an extremely flat ellipse.

How much fencing do I need for a yard?+

Measure each side and add them up, which is the perimeter. Subtract the width of any gates you buy separately, and add 5–10% for cuts and overlap.

Related tools