๐Ÿ‡บ๐Ÿ‡ธ USC
Math & Conversion
โฌœ

Perimeter Calculator

Distance around a rectangle, square, triangle, circle, polygon or trapezoid

โฌœ Choose a shape

P = 2 ร— (L + W)
m
m

The unit is only a label. Perimeter comes out in m; area (where shown) in mยฒ. Convert everything to the same unit before you measure.

๐Ÿ“ Perimeter

26
m (rectangle)
Perimeter
26 m
Area
40 mยฒ

๐Ÿงฎ Step by step

P = 2 ร— (L + W) = 2 ร— (8 + 5) = 2 ร— 13 = 26
A = L ร— W = 8 ร— 5 = 40

ฯ€ is taken as 3.141593โ€ฆ. Results are rounded for display; calculations use full precision.

โœ…

Last updated June 2026

Method: Standard geometry formulas - rectangle 2(L+W), square 4s, triangle a+b+c, circle 2πr, regular polygon n×s, trapezoid a+b+c+d. The triangle option also checks the triangle inequality, and the calculator uses the full value of π internally.

Included: Six common shapes, the formula and step-by-step working, the perimeter (or circumference), and a bonus area figure where a single area formula applies.

Not included: Irregular polygons with unequal sides beyond the trapezoid, 3D surface perimeter, and unit conversion - enter all dimensions in the same unit.

Perimeter calculator: everything you need to know

The perimeter is the distance all the way around the edge of a flat shape - the length you would cover if you walked its boundary once. Picture fencing a rectangular yard that is 8 m long and 5 m wide: you need fencing for two long sides and two short sides, so the perimeter is 2 × (8 + 5) = 26 m. That single number tells you how much fence, trim, ribbon or edging to buy. This perimeter calculator handles six common shapes, shows the exact formula it used, and walks through the arithmetic so you can check every step.

The perimeter formulas for every shape

Each shape has its own formula, but they all come down to "add up the boundary." Here are the ones this tool uses:

Rectangle:  P = 2 × (L + W) Square:     P = 4 × s Triangle:   P = a + b + c Circle:     C = 2 × π × r Polygon:    P = n × s  (regular, n sides) Trapezoid:  P = a + b + c + d

Here L and W are the rectangle's length and width, s is a side length, r is the circle's radius, and n is the number of equal sides on a regular polygon. The circle result is properly called the circumference, but it measures the same thing as a perimeter: the distance around.

What perimeter actually means

Perimeter is a one-dimensional length. Unlike area, which fills the inside of a shape and is measured in square units, perimeter only follows the outline, so it is measured in plain linear units - feet, meters, inches and so on. The word comes from the Greek peri ("around") and metron ("measure"). If your answer ever ends up in square units, you have accidentally calculated area instead.

How to use this perimeter calculator

You can get an answer in seconds:

  1. Pick a shape: tap rectangle, square, triangle, circle, regular polygon or trapezoid. The matching formula appears immediately.
  2. Enter the dimensions: type each measurement the shape needs - for a rectangle that is length and width; for a circle, the radius; for a regular polygon, the number of sides and one side length.
  3. Choose a display unit (optional): the unit is just a label. Make sure every dimension you enter is in that same unit before you measure.
  4. Read the result: the large number at the top is the perimeter (or circumference). The step-by-step card shows exactly how it was calculated, and a bonus area figure appears where one formula applies.

The result updates instantly as you type, so you can experiment - double a side and watch the perimeter respond.

Worked example 1: a rectangle

Suppose a garden bed is 8 m by 5 m. Add the two different sides first: 8 + 5 = 13. Then double, because there are two of each: 2 × 13 = 26 m. If you were edging it with brick, you would buy 26 m of edging (plus a little extra for cuts). Notice the area of the same bed is 8 × 5 = 40 m² - a square-unit measurement, and a completely different quantity from the perimeter.

Worked example 2: a circle

A circular patio has a radius of 7 ft. The circumference is C = 2 × π × r = 2 × 3.14159 × 7 = about 43.98 ft. If you only knew the diameter (14 ft), you would get the same answer with C = π × d = 3.14159 × 14. That circumference tells you how much edging or coping you need to run around the patio's rim.

Worked example 3: a regular hexagon

A regular hexagon has 6 equal sides. If each side is 4 in, the perimeter is simply n × s = 6 × 4 = 24 in. The same logic scales to any regular polygon: a regular pentagon (5 sides) with 10 cm sides has a perimeter of 5 × 10 = 50 cm. Because all sides are equal, you never have to measure more than one.

Quick reference table

These ready-made results assume the dimensions shown; swap in your own numbers above for an exact answer.

Shape Formula Example Perimeter
Square4ss = 624
Rectangle2(L+W)8 × 526
Triangle (equilateral)a+b+c5, 5, 515
Circle2πrr = 743.98
Pentagon (regular)n×s5 × 1050
Hexagon (regular)n×s6 × 424
Trapezoida+b+c+d5,4,3,416

Who this calculator is for

Anyone who needs the distance around a shape, including:

  • Students and teachers checking geometry homework or showing the working step by step.
  • DIY and home projects - measuring fencing, baseboard, picture-frame trim, garden edging or ribbon.
  • Crafters and sewers figuring out binding, piping or border length.
  • Landscapers and contractors estimating curbing or perimeter materials before a job.
  • Anyone who wants a quick, transparent answer with the formula spelled out.

Key terms explained

  • Perimeter: the total length of the boundary of a flat shape.
  • Circumference: the perimeter of a circle, found with 2πr.
  • Radius (r): the distance from the center of a circle to its edge - half the diameter.
  • Diameter (d): the distance straight across a circle through the center; d = 2r.
  • Regular polygon: a many-sided shape whose sides (and angles) are all equal, so P = n × s.
  • Side (s): one straight edge of a shape; for squares and regular polygons every side is the same.

Perimeter vs. area: don't mix them up

Perimeter and area answer different questions. Perimeter is how far it is around the edge (a length, in feet or meters). Area is how much surface fits inside (in square feet or square meters). You use perimeter for fencing, framing and edging; you use area for paint, flooring, sod and turf. Two shapes can share the same area but have wildly different perimeters - a long, thin rectangle has a much bigger perimeter than a square of the same area.

Tips for accurate results

  • Use one unit: convert all measurements to the same unit (all feet, or all inches) before entering them.
  • Radius vs. diameter: the circle field expects the radius. If you measured across the whole circle, halve it first.
  • Measure the outside edge only: for composite shapes, ignore interior lines and trace just the outer boundary.
  • Add a waste allowance: for real-world materials, buy a little more than the exact perimeter to cover cuts and overlaps.
  • Regular vs. irregular: n × s only works when every side is equal; otherwise add each side by hand.

Related concepts and calculators

Perimeter sits alongside a family of geometry and math tools. To find the surface inside a shape instead of around it, use an area calculator. The circle's circumference relies on π, the same constant behind a square-root calculation when you work backward from area. If you are scaling a shape up or down, a percentage calculator helps with proportional changes, and an exponent calculator handles squaring side lengths. For polygons with unequal sides, simply sum the sides yourself - the same add-everything principle this calculator uses for triangles and trapezoids.

Limitations and assumptions

  • The polygon formula assumes a regular polygon (all sides equal). For irregular polygons, add each side individually.
  • The trapezoid option takes all four side lengths; it does not derive a missing slanted side from the parallel sides and height.
  • It works in two dimensions only - it does not compute the surface perimeter of 3D objects.
  • All inputs must be in the same unit; the tool does not convert units for you.

โš ๏ธ Common mistakes & edge cases

Reporting perimeter in square units

Perimeter is a length, so it is measured in ft, m or in - never ft² or m². If your answer carries a little "2", you have calculated area by mistake. Keep the units linear.

Using diameter instead of radius for a circle

The circumference formula 2πr needs the radius (center to edge), not the diameter (edge to edge). Measuring straight across and plugging it in doubles your answer. Halve the diameter first, or use C = πd.

Treating an irregular polygon as regular

P = n × s only works when every side is identical. If the sides differ, multiplying by the number of sides gives a wrong answer - add each side length one by one instead.

Mixing units in one shape

Entering one side in feet and another in inches scrambles the result. Convert everything to a single unit before measuring, then read the perimeter in that unit.

Note: For real-world projects (fencing, trim, edging), add a small waste allowance on top of the exact perimeter to cover cuts, overlaps and corners.

❓ Frequently asked questions

What is the perimeter of a shape?

The perimeter is the total distance around the outside edge of a two-dimensional shape - the length you would walk if you traced its boundary once and came back to the start. For shapes with straight sides you simply add up the length of every side. For a circle the equivalent measurement is called the circumference. Perimeter is always a length, so it is measured in linear units such as feet, meters or inches (never square units).

How do you calculate the perimeter of a rectangle?

Add the length and the width, then double the result: P = 2 x (L + W). For example, a rectangle 8 m long and 5 m wide has a perimeter of 2 x (8 + 5) = 2 x 13 = 26 m. Doubling works because a rectangle has two lengths and two widths, so you could also write it as L + L + W + W.

How do you find the perimeter of a circle?

A circle does not have sides, so its 'perimeter' is called the circumference. Use C = 2 x pi x r, where r is the radius (the distance from the center to the edge). If you only know the diameter d, the formula is C = pi x d, since the diameter is twice the radius. With r = 7, the circumference is 2 x 3.14159 x 7 = about 43.98 units.

What is the formula for the perimeter of a triangle?

Add the three side lengths together: P = a + b + c. This works for any triangle - scalene, isosceles or equilateral - because the perimeter is just the sum of the boundary. For an equilateral triangle, where all three sides are equal, you can shortcut to P = 3 x s.

How do you calculate the perimeter of a regular polygon?

A regular polygon has every side the same length, so multiply the number of sides by the side length: P = n x s. A regular hexagon (6 sides) with 4-inch sides has a perimeter of 6 x 4 = 24 inches. For an irregular polygon, where sides differ, you must add each side individually.

What units is perimeter measured in?

Perimeter is a one-dimensional length, so it uses linear units: inches, feet, yards, miles, millimeters, centimeters, meters or kilometers. This is different from area, which uses square units (square feet, square meters). A common mistake is to report a perimeter in square units - if your answer ends in a little '2', you have calculated area, not perimeter.

What is the difference between perimeter and circumference?

They measure the same idea - the distance around a shape - but the word 'circumference' is reserved for circles and other curved closed shapes, while 'perimeter' is used for shapes with straight sides such as squares, rectangles and polygons. Both are lengths and both use linear units. This calculator labels the circle result as circumference and everything else as perimeter.

How do you find the perimeter of an irregular shape?

For any shape made of straight edges, measure each individual side and add them all up - there is no shortcut formula. For composite shapes (an L-shape, for instance), break the outline into segments, measure each, and sum the segments that form the outer boundary. Do not count interior dividing lines, only the outside edge.

Can you find perimeter if you only know the area?

Not for a general shape - many different shapes can share the same area but have very different perimeters. There are exceptions for specific shapes: for a square, the side equals the square root of the area, so the perimeter is 4 x square-root(area); for a circle, you can work back from area to radius and then to circumference. But for a generic rectangle, knowing only the area is not enough because length and width can vary.

Why does my triangle perimeter say the sides cannot form a triangle?

Because of the triangle inequality: the longest side of a triangle must be shorter than the sum of the other two sides. If you enter 2, 3 and 10, the two short sides (2 + 3 = 5) cannot reach across the long side (10), so no triangle exists. Re-check your measurements; in a valid triangle every side is less than the sum of the other two.

๐Ÿ’ก Good to know

Same area, different perimeter

Of all shapes with a given area, the circle has the smallest perimeter, and a square has the smallest perimeter of any rectangle. A long, narrow rectangle can have a far larger perimeter than a square of the same area - which is why compact shapes use less fencing.

Circumference is just a circle's perimeter

The only reason we use a special word is history - mathematically, circumference and perimeter both mean "the distance around." Both are lengths in linear units, so a 7 ft-radius circle and a 44 ft-perimeter square enclose the same boundary length.

Doubling a side doubles the perimeter

Perimeter scales linearly: double every dimension and the perimeter doubles, but the area quadruples. That difference matters when you scale a plan up - the edging cost roughly doubles while the surface (and paint) cost grows four times.

Related Calculators