Perimeter Calculator

Pick a shape, enter its dimensions, and get its perimeter (or circumference) instantly using the correct standard formula.

Quick Facts

Rectangle
P = 2(l + w)
Twice the sum of length and width.
Square
P = 4s
Four equal sides.
Circle
C = 2πr
Called the circumference, using the radius.
Triangle & Polygon
P = a+b+c or P = n×s
Sum the sides, or sides × side length for a regular polygon.

Your Results

Calculated
Perimeter
-
Total distance around the shape
Area
-
For reference, same shape
Formula Used
-
Applied to your inputs
Notes
-
Validity / interpretation

Ready

Choose a shape, enter its dimensions and unit, then press Calculate.

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.

Frequently Asked Questions

What is the formula for the perimeter of a rectangle?
Add the length and width, then double the result: P = 2(l + w). A rectangle 12 ft long and 8 ft wide has a perimeter of 2(12 + 8) = 40 ft.
How do I find the perimeter of a circle?
A circle's perimeter is called its circumference, found with C = 2πr, where r is the radius. A circle with a 5 ft radius has a circumference of 2 × π × 5 ≈ 31.42 ft. If you only know the diameter d, use C = πd instead.
Can any three side lengths form a triangle?
No. By the triangle inequality theorem, the sum of any two sides must be greater than the third side (a + b > c, a + c > b, and b + c > a). If this fails, no triangle exists and the perimeter calculation is invalid.
How is the perimeter of a regular polygon calculated?
Multiply the number of sides by the length of one side: P = n × s. A regular hexagon (n = 6) with 4 in sides has a perimeter of 6 × 4 = 24 in.