What this calculator does
Find the distance around almost any flat shape, from a garden bed to a circle. The perimeter is the total length of a shape's edge. It's the distance you'd walk if you went once around the outside. For shapes with straight sides, you add up the side lengths. For circles and other curved shapes, you need π (pi, about 3.14159).
This calculator covers rectangles, squares, triangles, parallelograms, trapezoids and other four-sided shapes. It also handles regular polygons such as hexagons and octagons, plus circles, semicircles and quarter circles. You can even enter any polygon as a list of side lengths, or by the coordinates (grid points) of its corners. It shows the formula and puts in your numbers. It checks that the sides can really form the shape. Wherever your inputs allow it, it gives the area as well.
Where it's used
Why this math matters outside the classroom:
- Fencing a yard. A homeowner fencing a 30 ft by 20 ft yard needs 2 × (30 + 20) = 100 ft of fence before allowing for a gate.
- Picture framing. A framer cutting moulding for an 8 in by 10 in photo needs at least 36 in of frame, plus extra for the mitred corners.
- Running track laps. A coach marking a rectangular course 100 m by 50 m knows each lap covers 300 m, so 5 laps make 1.5 km.
- Garden edging. A gardener edging a semicircular bed of radius 2 m buys about 2π + 4 ≈ 10.3 m of edging strip.
- Classroom geometry. Students find the perimeter of the triangle with corners (0, 0), (4, 0) and (4, 3) by adding sides 4, 3 and 5 to get 12.
Grade level and standards: Grades 3–4; Common Core State Standards for Mathematics 3.MD.D.8, 4.MD.A.3. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.
How to use it
- Pick the shape, then the unit your lengths are measured in.
- Enter the measurements the shape asks for. Use the same unit for every length.
- For a polygon on a grid, type the corners in order around the edge, such as (0, 0), (4, 0), (4, 3). The last corner joins back to the first.
- Read the perimeter at the top. The area (where it can be found) and the working are below.
What the inputs mean
- Shape
- A trapezoid, kite or irregular four-sided shape all use the four-sides option. Its area needs a height or angle as well, so only the perimeter is given.
- Length unit
- Used to label the answer. Enter every length in this unit.
- Corners in order around the shape
- Go around the shape in order, clockwise or anticlockwise. If you jump across the shape out of order, the sides cross and you get a different, longer boundary.
- Side lengths
- Useful for irregular fields, rooms and garden beds measured side by side with a tape.
Formula and method
Rectangle: P = 2(l + w) Square: P = 4s Triangle: P = a + b + c Parallelogram: P = 2(a + b) Any polygon: P = sum of all sides Regular n-gon: P = n × s Circle: C = 2πr Semicircle: P = πr + 2r Quarter circle: P = πr ÷ 2 + 2r From corners: each side = √((x₂ − x₁)² + (y₂ − y₁)²)
In these formulas, P is the perimeter and C is a circle's circumference. l is the length, w the width and s one side. a, b and c are the sides of a triangle or parallelogram. n is the number of sides, and r is a circle's radius (centre to edge). (x₁, y₁) and (x₂, y₂) are the grid points of two neighbouring corners.
Every straight-sided formula is a shortcut for adding up the sides. A rectangle has two equal lengths and two equal widths, so its perimeter is twice their sum. A square or regular polygon has all sides equal. So its perimeter is the side length times the number of sides.
A circle's perimeter, its circumference, is π times the diameter, or 2πr. A semicircle's edge is half that curve plus the straight diameter across the bottom. A quarter circle's edge is a quarter of the curve plus two radii.
When a polygon is drawn on a grid, each side length comes from the distance formula above. The perimeter is the sum of those distances, including the closing side from the last corner back to the first. The shoelace formula, a standard method that works from the corner points, then gives the area inside.
Sides only form a closed shape if the longest one is shorter than all the others combined. For triangles this is called the triangle inequality, and the same rule applies to any polygon. The calculator checks this before answering.
Worked example
A rectangular garden bed is 8 cm by 5 cm on a scale drawing, and a triangular corner piece has sides of 3, 4 and 5 cm.
- Rectangle: P = 2 × (8 + 5) = 2 × 13 = 26 cm. Its area is 8 × 5 = 40 cm².
- Triangle: the longest side, 5, is less than 3 + 4 = 7, so the triangle exists.
- Triangle perimeter: 3 + 4 + 5 = 12 cm.
- Heron's formula, which finds a triangle's area from its sides, uses half the perimeter, s = 6. It gives √(6 × 3 × 2 × 1) = √36 = 6 cm².
- For comparison, a circle of radius 5 cm has a circumference of 2 × π × 5 ≈ 31.4159 cm.
Result: The rectangle's perimeter is 26 cm and the triangle's is 12 cm. A circle of radius 5 cm would measure about 31.4159 cm around.
Understanding the result
Perimeter is a length, measured in plain units such as metres or feet. Area is measured in square units. Two shapes with the same perimeter can have very different areas. Among all rectangles with a 40 m perimeter, the 10 m square holds the most.
For real projects such as fencing, edging or trim, the perimeter is the least material you'll need. Add extra for gates, overlaps, corners and waste.
For a shape drawn from grid points, a perimeter far larger than expected usually means the corners were entered out of order. That makes the edges cross.
Assumptions and limitations
- All lengths are in the same unit, and the shape is flat (two-dimensional).
- Corners entered as grid points are joined in the order given, with straight sides. The last corner connects back to the first.
- The circle options use the exact value of π, not 3.14.
- Shapes with other curved edges, such as ellipses (ovals) or sectors (pie slices), have their own calculators.
- The four-sided and list-of-sides options can't give an area. The same sides can be hinged into many shapes with different areas.
- The shoelace area only makes sense when the polygon's sides don't cross each other.
Frequently asked questions
How do you find the perimeter of a rectangle?
Add the length and the width, then double the result: P = 2(l + w). A rectangle 8 cm long and 5 cm wide has a perimeter of 2 × 13 = 26 cm.
What is the difference between perimeter and area?
Perimeter is the distance around a shape, a length in units such as metres. Area is the amount of surface inside it, in square units such as square metres. Fencing a yard uses its perimeter. Seeding the lawn uses its area.
Is circumference the same as perimeter?
Yes. Circumference is the name for the perimeter of a circle. It equals π times the diameter, or 2πr. So a circle with a 5 cm radius has a circumference of about 31.42 cm.
How do I find the perimeter of a semicircle?
Add half the circumference to the diameter: P = πr + 2r. For a radius of 5, that's 5π + 10 ≈ 25.71. Forgetting the straight edge is the most common mistake.
How do I find the perimeter of a shape on a coordinate grid?
Use the distance formula for each side between neighbouring corners, then add them up. Include the side from the last corner back to the first. The triangle with corners (0, 0), (4, 0) and (4, 3) has sides 4, 3 and 5, so its perimeter is 12.
How this calculator is checked
Method: Standard perimeter formulas for polygons and circles, the triangle (polygon) inequality, Heron's formula, the regular-polygon area n·s²/(4·tan(π/n)), the distance formula and the shoelace formula. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this Perimeter Calculator on your own website or blog for free. Paste this code where you want it to appear: