Formula and Method for Perimeter
The perimeter of a shape is the total distance around its outer boundary — the sum of the lengths of all its sides. This calculator supports five common shapes, each with its own standard formula: a rectangle (P = 2(l + w)), a square (P = 4s), a circle, whose perimeter is called the circumference (C = 2πr), a triangle given three side lengths (P = a + b + c), and a regular polygon with n equal sides (P = n × s). It also reports the matching area for reference.
How the calculation works
Choose the shape, then enter only the measurements that shape needs — the input fields update automatically. For a rectangle, enter length and width. For a square, enter one side. For a circle, enter the radius (half the diameter); the calculator applies C = 2πr. For a triangle, enter all three side lengths — the tool checks the triangle inequality (each side must be shorter than the sum of the other two) before summing them. For a regular polygon, enter the side length and the number of sides n, and the calculator multiplies them together. Keep all measurements in the same unit before entering them.
Common mistakes
- Radius vs. diameter: circle formulas here use the radius. If you only know the diameter d, divide it by 2 first (r = d/2), or the circumference will be doubled.
- Invalid triangles: not every three lengths form a triangle. If one side is longer than the sum of the other two (or equal to it), no triangle exists and there is no valid perimeter.
- Irregular vs. regular polygons: the P = n × s formula only works when all sides and angles are equal. For an irregular polygon, you must measure and add each side individually.
Real-world applications
- Fencing and edging projects use perimeter directly to estimate how much linear material to buy.
- Framing, trim, and baseboard installation use the perimeter of a room to calculate material length.
- Running or track distances often follow the perimeter (or circumference) of a field or track.
- Landscaping and garden borders use perimeter to plan edging, hedging, or irrigation tubing.