Perimeter Calculator: Distance Around 12 Shapes
Choose a shape and type its side lengths. The distance around it shows up immediately, with the addition or formula written out so you can check each number.
This tool runs in your browser. Nothing you type is uploaded or saved, and there is nothing to install or sign up for.
Perimeter is the walk around the edge
If you started at one corner of a field and walked along its boundary until you were back where you began, the distance covered would be the perimeter. It is a length, so it is measured in ordinary units such as feet or meters, never in square units.
People look it up for fencing, picture frames, baseboards, ribbon around a cake, the lines on a sports court and, of course, geometry homework. This perimeter calculator works for a square, rectangle, triangle, circle, semicircle, sector, parallelogram, rhombus, trapezoid, regular polygon and ellipse. For anything else with straight edges there is an Any polygon option where you simply list the sides.
How to get a perimeter with this tool
- Choose your figure in the Shape menu.
- Pick the Length unit you measured with. It labels the answer; no conversion happens.
- Fill in the blue panel. A rectangle asks for Length and Width, a triangle for three sides, a circle for its Radius.
- For Any polygon, type every side into Side lengths with commas or spaces between the numbers.
- The answer is in the navy panel, and the lines below it show the formula and the sum.
- Tap Copy result for a line of text you can paste, or Reset to bring back the 12 by 8 rectangle.
Worked example: fencing a 12 ft by 8 ft garden
The tool starts with a rectangular plot 12 ft long and 8 ft wide.
- Add one length and one width: 12 + 8 = 20.
- A rectangle has two of each, so double it: 2 × 20 = 40 ft.
You would need 40 ft of fencing before allowing for a gate. The extra lines say the diagonal of the plot is 14.4222 ft, that a square using the same 40 ft of fence would be 10 ft on each side, and that a circle would have a radius of 6.3662 ft.
An irregular five-sided plot
Switch to Any polygon and leave the sample list 5, 7, 4, 6, 3 in place. The tool adds 5 + 7 + 4 + 6 + 3 = 25 ft. It also counts 5 sides, picks out 3 and 7 as the shortest and longest, and gives an average side of 5 ft.
A semicircular window
Choose Semicircle with a radius of 12. The curved edge is half a circumference, π × 12 = 37.6991, and the straight edge is the diameter, 24. Together they make 61.6991. Forgetting the straight edge is the classic mistake with this shape.
Perimeter formulas, shape by shape
| Shape | Formula | Sample values | Result |
|---|---|---|---|
| Square | 4 * s | s = 12 | 48 |
| Rectangle | 2 * (l + w) | 12, 8 | 40 |
| Triangle | a + b + c | 12, 8, 10 | 30 |
| Circle | 2 * pi * r | r = 12 | 75.3982 |
| Semicircle | pi * r + 2 * r | r = 12 | 61.6991 |
| Sector | 2 * r + r * t | r = 12, 90° | 42.8496 |
| Parallelogram | 2 * (a + b) | 12, 8 | 40 |
| Trapezoid | a + b + c + d | 12, 8, 10, 6 | 36 |
| Regular polygon | n * s | 6 sides of 12 | 72 |
| Ellipse | approximation | 12, 8 | 63.4618 |
In the sector row, t is the central angle in radians. An angle in degrees is multiplied by π and divided by 180 first, so 90° becomes 1.5708 and the arc is 12 × 1.5708 = 18.8496. With 1 radian the arc is exactly one radius long, giving a perimeter of 36 for the same radius.
Why the ellipse is only approximate
Unlike a circle, an ellipse has no short exact formula for the distance around it. The tool uses a well-known approximation published by the mathematician Srinivasa Ramanujan:
P = pi * (3 * (a + b) - sqrt((3a + b) * (a + 3b)))
Here a and b are the half-widths, measured from the center to the edge along the long and short directions. For 12 and 8 the square root term is 39.7995 and the result is 63.4618. The estimate is very close for ordinary ovals and becomes less precise for extremely long, thin ones. When both half-widths are equal the formula returns the exact circumference of a circle.
Checks the tool makes on your sides
Not every set of lengths can form a closed figure. Three sticks of 1, 2 and 8 cannot make a triangle, because the two short ones cannot reach each other across the long one. The rule for any polygon is the same: the longest side must be shorter than all the others added together. When your numbers break that rule, the calculator explains the problem instead of printing a meaningless total.
It also names triangles as it goes. Sides of 12, 8 and 10 are labelled scalene, 5, 5 and 8 isosceles, and three equal sides equilateral.
Common perimeter mistakes
- Mixing it up with area. A 12 by 8 rectangle has a perimeter of 40 ft and an area of 96 sq ft. Fencing needs the first number, turf the second. The area calculator handles the inside.
- Adding only two sides of a rectangle. Length plus width is half the answer.
- Using the height of a parallelogram or trapezoid. Perimeter needs the actual slanted side lengths, not the straight-up height used for area.
- Different units in one sum. Change everything to one unit first with the length converter.
- Diameter in the radius box. For round shapes, halve the distance across before typing it.
The answer is the geometric outline only. Real projects need extra for corners, overlaps, gates and waste, and that allowance depends on the material you are buying.
Handy uses at home and in class
Measuring a room for baseboard? Use the rectangle option, then subtract the width of each doorway. Edging an L-shaped flower bed? Walk around it, note each straight run and put the six numbers in the Any polygon list. Framing a picture? The perimeter of the picture is the minimum length of molding before the corner cuts.
A good classroom investigation is to fix the perimeter and change the shape. With 40 ft of fence, the 12 by 8 rectangle encloses 96 sq ft, the 10 by 10 square encloses 100 sq ft, and the circle with radius 6.3662 ft encloses more than either. Students can test other rectangles and discover that the square always wins among them.
Some shapes have dedicated pages with more detail: the circumference calculator for circles, the arc length calculator for curved pieces and the triangle calculator when you know angles instead of all three sides. See the full set of math calculators for other topics, or head to the main list of free online tools.
Frequently asked questions
How do I find the perimeter of a rectangle?
Add the length and the width, then double the result. A rectangle 12 ft by 8 ft has a perimeter of 2 times 20, which is 40 ft.
How do I find the perimeter of an irregular shape?
If the edges are straight, measure every side and add them all. Sides of 5, 7, 4, 6 and 3 give a perimeter of 25.
What is the perimeter of a semicircle?
It is the curved half of the circumference plus the straight diameter: pi times the radius plus twice the radius. For a radius of 12 that is about 37.6991 plus 24, or 61.6991.
Is the perimeter of a circle the same as its circumference?
Yes. Circumference is the special name for the perimeter of a circle. It equals 2 times pi times the radius, so a radius of 12 gives about 75.3982.
Can two shapes have the same perimeter but different areas?
Yes. A 12 by 8 rectangle and a 10 by 10 square both have a perimeter of 40, but their areas are 96 and 100 square units.
How do I find the perimeter of a regular hexagon?
Multiply the side length by 6, because all six sides are equal. A hexagon with sides of 12 has a perimeter of 72.
