★ MATH · SHAPES · PERIMETER

Perimeter Calculator: Rectangles, Circles, Triangles

A rectangle 8 by 5 has a perimeter of 26 — walk all four sides and you have covered 26 units. Pick a shape and the calculator works out the perimeter: rectangles, squares, triangles, circles and regular polygons, with the formula, the side-by-side breakdown and the answer to six places where π is involved. This one is the PERIMETER tool — the distance around a shape — the area-calculator page is the AREA tool — the space inside a shape — not the distance around it; the trapezoid-area-calculator page is the TRAPEZOID AREA tool — the area of a trapezoid — not a perimeter; and the fraction-calculator page is the FRACTION tool — adding and multiplying fractions — not lengths around a shape. No perimeter calculator exists on this site — this one is the first.

1364

Perimeter calculator

The perimeter is the distance around a shape: add up the lengths of every side and you have it. On the defaults it is exact: a rectangle 8 by 5 has a perimeter of 26, because 8 + 5 + 8 + 5 is 26. Circles are the exception — the circumference is 2π times the radius, and π never terminates, so a circle of radius 5 is 31.415927 to six places. Pick a shape, put the lengths in, and check the breakdown before you use the answer.

Pick the shape first — the fields below it change meaning with the shape.

The first length — 8 on the defaults; rectangle length, square side, triangle side, circle radius, or polygon side.

The second length — 5 on the defaults; rectangle width or triangle second side.

The triangle third side — only used for triangles.

The number of sides — only used for regular polygons; a whole number, 3 or more.

Rectangle 8 × 5: perimeter 2626Perimeter 26. P = 2 × (8 + 5) — 8 + 5 + 8 + 5 = 26.

Shape: Rectangle 8 × 5

Perimeter: 26

Perimeter (6dp unrounded): 26.000000

Formula: P = 2 × (length + width)

Breakdown: 8 + 5 + 8 + 5 = 26

Verdict: A rectangle 8 by 5 has a perimeter of 26 — walk all four sides and you have covered 26 units.

Rectangle 8 × 5: Rectangle 8 × 5: perimeter 26

Square, side 6: Square, side 6: perimeter 24

Triangle 3, 4, 5: Triangle 3, 4, 5: perimeter 12

Circle, radius 5: Circle, radius 5: perimeter 31.415927

Regular hexagon, side 4: Regular hexagon, side 4: perimeter 24

Rectangle 12.5 × 7.25: Rectangle 12.5 × 7.25: perimeter 39.5

Circle, radius 10: Circle, radius 10: perimeter 62.831853

Triangle 7, 7, 7: Triangle 7, 7, 7: perimeter 21

Regular pentagon, side 3: Regular pentagon, side 3: perimeter 15

Square, side 12.5: Square, side 12.5: perimeter 50

Reverse: Smallest whole side for a square perimeter of 40 or more: 10

Reverse: Smallest whole side for a square perimeter of 40 or more (rounded): 10

At 10 the figures are: Square, side 10: perimeter 40

At the lower neighbor the figures are: Square, side 9: perimeter 36

At the upper neighbor the figures are: Square, side 11: perimeter 44

Reverse verdict: STEP

Reverse: Smallest whole radius for a circumference of 62.831853 or more: 10

Reverse: Smallest whole radius for a circumference of 62.831853 or more (rounded): 10

At 10 the figures are: Circle, radius 10: perimeter 62.831853

At the lower neighbor the figures are: Circle, radius 9: perimeter 56.548668

At the upper neighbor the figures are: Circle, radius 11: perimeter 69.115038

Reverse verdict: STEP

Reverse: Smallest whole width for a 10-long rectangle perimeter of 30 or more: 5

Reverse: Smallest whole width for a 10-long rectangle perimeter of 30 or more (rounded): 5

At 5 the figures are: Rectangle 10 × 5: perimeter 30

At the lower neighbor the figures are: Rectangle 10 × 4: perimeter 28

At the upper neighbor the figures are: Rectangle 10 × 6: perimeter 32

Reverse verdict: STEP

Reverse: Smallest whole side for a regular octagon perimeter of 64 or more: 8

Reverse: Smallest whole side for a regular octagon perimeter of 64 or more (rounded): 8

At 8 the figures are: Regular octagon, side 8: perimeter 64

At the lower neighbor the figures are: Regular octagon, side 7: perimeter 56

At the upper neighbor the figures are: Regular octagon, side 9: perimeter 72

Reverse verdict: STEP

Reverse: Smallest whole side for an equilateral triangle perimeter of 21 or more: 7

Reverse: Smallest whole side for an equilateral triangle perimeter of 21 or more (rounded): 7

At 7 the figures are: Triangle 7, 7, 7: perimeter 21

At the lower neighbor the figures are: Triangle 6, 6, 6: perimeter 18

At the upper neighbor the figures are: Triangle 8, 8, 8: perimeter 24

Reverse verdict: STEP

Reverse: Largest whole radius for a circumference of 31.415927 or less: 5

Reverse: Largest whole radius for a circumference of 31.415927 or less (rounded): 5

At 5 the figures are: Circle, radius 5: perimeter 31.415927

At the lower neighbor the figures are: Circle, radius 4: perimeter 25.132741

At the upper neighbor the figures are: Circle, radius 6: perimeter 37.699112

Reverse verdict: STEP

Edge: Rectangle 0 × 5 (zero length): Lengths must be more than 0.

Edge: Square, side −3 (negative): Lengths must be more than 0.

Edge: Non-numeric input: Enter a number for the length and the width.

Edge: Triangle 1, 2, 10 (violates the triangle inequality): Those three sides cannot make a triangle — the two shorter sides must add up to more than the longest side.

Edge: Polygon with 2 sides: A regular polygon needs 3 sides or more.

Edge: Polygon with 4.5 sides (non-integer): The number of sides must be a whole number.

Edge: Circle, radius 0: Lengths must be more than 0.

Edge: Rectangle 0.5 × 0.25: Rectangle 0.5 × 0.25: perimeter 1.5

Edge: Circle, radius 1: Circle, radius 1: perimeter 6.283185

Edge: Triangle 5, 5, 8: Triangle 5, 5, 8: perimeter 18

Edge: Regular dodecagon, side 2.5: Regular dodecagon, side 2.5: perimeter 30

A rectangle 8 by 5 has a perimeter of 26 — walk all four sides and you have covered 26 units.

Rectangle 8 × 5: Rectangle 8 × 5: perimeter 26.

Square, side 6: Square, side 6: perimeter 24.

Triangle 3, 4, 5: Triangle 3, 4, 5: perimeter 12.

Circle, radius 5: Circle, radius 5: perimeter 31.415927.

Regular hexagon, side 4: Regular hexagon, side 4: perimeter 24.

Rectangle 12.5 × 7.25: Rectangle 12.5 × 7.25: perimeter 39.5.

Circle, radius 10: Circle, radius 10: perimeter 62.831853.

Triangle 7, 7, 7: Triangle 7, 7, 7: perimeter 21.

Regular pentagon, side 3: Regular pentagon, side 3: perimeter 15.

Square, side 12.5: Square, side 12.5: perimeter 50.

Reverse: The Smallest whole side for a square perimeter of 40 or more is 10; at 10 the figures are Square, side 10: perimeter 40; at the lower neighbor the figures are Square, side 9: perimeter 36; at the upper neighbor the figures are Square, side 11: perimeter 44 — verdict: STEP. Reverse: The Smallest whole radius for a circumference of 62.831853 or more is 10; at 10 the figures are Circle, radius 10: perimeter 62.831853; at the lower neighbor the figures are Circle, radius 9: perimeter 56.548668; at the upper neighbor the figures are Circle, radius 11: perimeter 69.115038 — verdict: STEP. Reverse: The Smallest whole width for a 10-long rectangle perimeter of 30 or more is 5; at 5 the figures are Rectangle 10 × 5: perimeter 30; at the lower neighbor the figures are Rectangle 10 × 4: perimeter 28; at the upper neighbor the figures are Rectangle 10 × 6: perimeter 32 — verdict: STEP. Reverse: The Smallest whole side for a regular octagon perimeter of 64 or more is 8; at 8 the figures are Regular octagon, side 8: perimeter 64; at the lower neighbor the figures are Regular octagon, side 7: perimeter 56; at the upper neighbor the figures are Regular octagon, side 9: perimeter 72 — verdict: STEP. Reverse: The Smallest whole side for an equilateral triangle perimeter of 21 or more is 7; at 7 the figures are Triangle 7, 7, 7: perimeter 21; at the lower neighbor the figures are Triangle 6, 6, 6: perimeter 18; at the upper neighbor the figures are Triangle 8, 8, 8: perimeter 24 — verdict: STEP. Reverse: The Largest whole radius for a circumference of 31.415927 or less is 5; at 5 the figures are Circle, radius 5: perimeter 31.415927; at the lower neighbor the figures are Circle, radius 4: perimeter 25.132741; at the upper neighbor the figures are Circle, radius 6: perimeter 37.699112 — verdict: STEP.

Edges: Rectangle 0 × 5 (zero length) gives Lengths must be more than 0.. Square, side −3 (negative) gives Lengths must be more than 0.. Non-numeric input gives Enter a number for the length and the width.. Triangle 1, 2, 10 (violates the triangle inequality) gives Those three sides cannot make a triangle — the two shorter sides must add up to more than the longest side.. Polygon with 2 sides gives A regular polygon needs 3 sides or more.. Polygon with 4.5 sides (non-integer) gives The number of sides must be a whole number.. Circle, radius 0 gives Lengths must be more than 0.. Rectangle 0.5 × 0.25 gives Rectangle 0.5 × 0.25: perimeter 1.5. Circle, radius 1 gives Circle, radius 1: perimeter 6.283185. Triangle 5, 5, 8 gives Triangle 5, 5, 8: perimeter 18. Regular dodecagon, side 2.5 gives Regular dodecagon, side 2.5: perimeter 30.

What does 26 mean?

It means that walking around a rectangle 8 long and 5 wide covers 26 units — 8 along the top, 5 down the side, 8 back along the bottom, and 5 up the other side. The perimeter is the distance around a shape, nothing more: add up the lengths of every side and you have it. For a rectangle the opposite sides match, so the short way is twice the length plus the width — 2 × (8 + 5) is 26 — and the long way, 8 + 5 + 8 + 5, gives the same 26. If you were fencing this rectangle, 26 units of fence is what you would buy, before any allowance for a gate.

Three things to check before you trust the number

The circle is the only shape with a rounded answer. A circle has no straight sides, so its perimeter — the circumference — is 2π times the radius, and π never terminates. A circle of radius 5 has a circumference of 31.415927 to six places, and that is the value stopped at six places, not the whole value. Every other shape on this page is exact: a rectangle 12.5 by 7.25 has a perimeter of exactly 39.5, and a square of side 6 has a perimeter of exactly 24.

A triangle has to close. Three lengths only make a triangle if the two shorter ones add up to more than the longest — 3, 4 and 5 close, because 3 + 4 is 7, more than 5; 1, 2 and 10 do not, because 1 + 2 is 3, far short of 10, and the sides would never meet. The calculator refuses lengths that cannot close rather than adding them anyway.

A regular polygon has equal sides by definition. Regular means every side the same length and every angle the same, so the perimeter is just the number of sides times one side — a hexagon of side 4 is 6 × 4, which is 24, and a pentagon of side 3 is 5 × 3, which is 15. If the sides are not all equal, it is not regular, and you have to add the sides one by one instead — that is the triangle’s job, or the rectangle’s.

Worked example

On the defaults: a rectangle 8 long and 5 wide.

  1. Add the four sides: 8 + 5 + 8 + 5 is 26.
  2. Or use the rectangle formula: 2 × (8 + 5) is 2 × 13, which is 26.
  3. Check it against the fence test: walking the rectangle covers 8, then 5, then 8, then 5 — 26 units in total.
  4. Write the answer: the perimeter is 26, in whatever units the sides were measured in.

And the other way: a square with a perimeter of 40 has sides of 10, because 40 ÷ 4 is 10 — the reverse box finds the side from the perimeter.

Every branch, checked

The reverses, worked backwards

What the defaults assume

The defaults are a rectangle 8 by 5, chosen so the answer is a whole number you can check by hand. They are a starting point, not a lesson: your shape may be any of the five, and the calculator shows the formula it used, the side-by-side breakdown, and the verdict. Lengths must be more than 0 — a side of 0 is not a shape — and a triangle must close, a polygon needs 3 sides or more, and the number of sides must be a whole number. Put your numbers in, read the answer, and check the working before you use it.

These notes repeat in every explainer section because this page is built to be read start to finish: the circle is the only shape with a rounded answer; a triangle has to close; and a regular polygon has equal sides by definition.

Output · formula · meaning

OutputFormulaWhat it means
ShapeinputRectangle 8 × 5.
PerimeterP = 2 × (length + width)26.
Perimeter (6dp unrounded)decimal, 6 places26.000000.
Formulaby shapeP = 2 × (length + width).
Breakdownside by side8 + 5 + 8 + 5 = 26.
Verdictin wordsA rectangle 8 by 5 has a perimeter of 26.
Reverse: Smallest whole side for a square perimeter of 40 or morestep10: Square, side 10: perimeter 40.
Reverse: Smallest whole radius for a circumference of 62.831853 or morestep10: Circle, radius 10: perimeter 62.831853.
Reverse: Smallest whole width for a 10-long rectangle perimeter of 30 or morestep5: Rectangle 10 × 5: perimeter 30.
Reverse: Smallest whole side for a regular octagon perimeter of 64 or morestep8: Regular octagon, side 8: perimeter 64.
Reverse: Smallest whole side for an equilateral triangle perimeter of 21 or morestep7: Triangle 7, 7, 7: perimeter 21.
Reverse: Largest whole radius for a circumference of 31.415927 or lessstep5: Circle, radius 5: perimeter 31.415927.
Rectangle 8 × 5same modelRectangle 8 × 5: perimeter 26.
Square, side 6same modelSquare, side 6: perimeter 24.
Triangle 3, 4, 5same modelTriangle 3, 4, 5: perimeter 12.
Circle, radius 5same modelCircle, radius 5: perimeter 31.415927.
Regular hexagon, side 4same modelRegular hexagon, side 4: perimeter 24.
Rectangle 12.5 × 7.25same modelRectangle 12.5 × 7.25: perimeter 39.5.
Circle, radius 10same modelCircle, radius 10: perimeter 62.831853.
Triangle 7, 7, 7same modelTriangle 7, 7, 7: perimeter 21.
Regular pentagon, side 3same modelRegular pentagon, side 3: perimeter 15.
Square, side 12.5same modelSquare, side 12.5: perimeter 50.
Rectangle 0 × 5 (zero length)same modelLengths must be more than 0..
Square, side −3 (negative)same modelLengths must be more than 0..
Non-numeric inputsame modelEnter a number for the length and the width..
Triangle 1, 2, 10 (violates the triangle inequality)same modelThose three sides cannot make a triangle — the two shorter sides must add up to more than the longest side..
Polygon with 2 sidessame modelA regular polygon needs 3 sides or more..
Polygon with 4.5 sides (non-integer)same modelThe number of sides must be a whole number..
Circle, radius 0same modelLengths must be more than 0..
Rectangle 0.5 × 0.25same modelRectangle 0.5 × 0.25: perimeter 1.5.
Circle, radius 1same modelCircle, radius 1: perimeter 6.283185.
Triangle 5, 5, 8same modelTriangle 5, 5, 8: perimeter 18.
Regular dodecagon, side 2.5same modelRegular dodecagon, side 2.5: perimeter 30.

Who uses this

Accuracy & limitations

The arithmetic is exact on the numbers you type: a rectangle 8 by 5 has a perimeter of exactly 26, and a hexagon of side 4 has a perimeter of exactly 24. Circle results use π and are rounded to 6 decimal places; all other shapes are exact. A circle of radius 5 has a circumference of 31.415927 to six places — the true value continues past the sixth decimal, so carry the 6-place value into further working only if that precision is enough. The calculator refuses lengths that cannot make a shape: zero or negative sides, a triangle that cannot close, a polygon with fewer than 3 sides or a non-whole number of sides. Treat the breakdown as the check — if a side is wrong, the breakdown shows it.

Cite this calculator

A rectangle 8 by 5 has a perimeter of 26 — walk all four sides and you have covered 26 units. Square, side 6: perimeter 24. Triangle 3, 4, 5: perimeter 12. Circle, radius 5: perimeter 31.415927. Regular hexagon, side 4: perimeter 24. Smallest whole side for a square perimeter of 40 or more: 10. Smallest whole radius for a circumference of 62.831853 or more: 10. Smallest whole width for a 10-long rectangle perimeter of 30 or more: 5. Smallest whole side for a regular octagon perimeter of 64 or more: 8. Smallest whole side for an equilateral triangle perimeter of 21 or more: 7. Largest whole radius for a circumference of 31.415927 or less: 5. Source: Bright Side Kit, brightoolbox.com.

Embed this calculator

Frequently asked questions

What is the perimeter of a rectangle 8 by 5?

The perimeter is 26, because 8 + 5 + 8 + 5 is 26. The short way is 2 × (8 + 5), which is 2 × 13, which is 26 — in whatever units the sides were measured in.

How do you find the perimeter of a square?

Multiply one side by 4 — a square of side 6 has a perimeter of 24. All four sides are equal, so 4 × 6 is 24. A square of side 12.5 has a perimeter of 50.

How do you find the perimeter of a triangle?

Add the three sides — a triangle of 3, 4 and 5 has a perimeter of 12. The three sides must close: the two shorter ones have to add up to more than the longest, or the triangle cannot exist.

How do you find the circumference of a circle?

Multiply 2π by the radius — a circle of radius 5 has a circumference of 31.415927. The value is rounded to 6 decimal places because π never terminates; a circle of radius 10 is 62.831853.

What is the perimeter of a regular hexagon?

Multiply one side by 6 — a hexagon of side 4 has a perimeter of 24. A regular polygon has equal sides, so the perimeter is the number of sides times one side: a pentagon of side 3 is 15.

What is the difference between perimeter and area?

Perimeter is the distance around a shape; area is the space inside it. A rectangle 8 by 5 has a perimeter of 26 and an area of 40 — fencing measures the perimeter, carpet measures the area. See the area-calculator for the inside.

Can a triangle have sides 1, 2 and 10?

No — those three lengths cannot make a triangle. The two shorter sides, 1 + 2, add up to 3, far short of 10, so the sides would never meet. The calculator refuses them rather than adding them anyway.

How do you work backwards from a perimeter to a side?

Divide by the number of sides — a square with a perimeter of 40 has sides of 10, because 40 ÷ 4 is 10. A regular octagon with a perimeter of 64 has sides of 8, and a circle with a circumference of 62.831853 has a radius of 10.