Perimeter Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Pick a shape and enter its dimensions to get the perimeter (the distance around it) and the area.
Result
Perimeter (length units)
Area (square units)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Shape: choose Rectangle (a = length, b = width), Square (a = side), Triangle (a, b, c = sides), Circle (a = radius) or Regular polygon (a = side, b = number of sides).
- Dimension a (length units): enter 0 or more.
- Dimension b (length units, or number of sides): enter 0 or more.
- Dimension c (length units, triangle only): enter 0 or more.
- Read the result: Perimeter (length units); the panel also shows Area (square units).
How this calculator works
Rectangle: P = 2(l + w). Square: P = 4s. Triangle: P = a + b + c. Circle (circumference): C = 2πr. Regular polygon with n sides of length s: P = n × s.
Areas: l × w, s², Heron's formula √(s(s − a)(s − b)(s − c)) with s the half-perimeter, πr², and n s² ÷ (4 tan(π/n)) for a regular polygon. A triangle whose sides break the triangle inequality shows a dash.
Worked example
| Shape | Rectangle (a = length, b = width) |
|---|---|
| Dimension a (length units) | 8 |
| Dimension b (length units, or number of sides) | 5 |
| Perimeter (length units) | 26 |
|---|---|
| Area (square units) | 40 |
Frequently asked questions
What is the perimeter of an 8 by 5 rectangle?
2 × (8 + 5) = 26 units, and its area is 40 square units.
What is the difference between perimeter and area?
The perimeter is a length (the distance around the shape); the area is the surface inside it, in square units.
What is the perimeter of a circle called?
The circumference: 2πr, about 12.5664 for a radius of 2.