What Is Perimeter?
Perimeter is the total distance around the outside boundary of a two-dimensional shape. For polygons, you can find it by adding the lengths of all outer sides. Regular shapes use shorter formulas, such as P = 4s for a square and P = 2(l + w) for a rectangle. The perimeter of a circle is called its circumference.
Use the calculator above for rectangles, squares, triangles, circles, parallelograms, trapezoids, rhombuses, kites, ellipses, annuli, regular polygons, irregular polygons, semicircles, and circular sectors. All dimensions should use the same measurement unit.
Perimeter Formulas by Shape
| Shape | Formula | Required Values |
|---|---|---|
| Square | P = 4s | Side length |
| Rectangle | P = 2(l + w) | Length and width |
| Triangle | P = a + b + c | Three side lengths |
| Circle | C = 2πr or C = πd | Radius or diameter |
| Parallelogram | P = 2(a + b) | Two adjacent sides |
| Trapezoid | P = a + b + c + d | Four side lengths |
| Rhombus | P = 4s | Side length |
| Kite | P = 2(a + b) | Two pairs of adjacent equal sides |
| Ellipse | P ≈ π[3(a+b) − √((3a+b)(a+3b))] | Semi-major and semi-minor axes |
| Annulus | P = 2Ï€(R + r) | Outer and inner radii |
| Regular Polygon | P = ns | Number of sides and side length |
| Semicircle | P = πr + 2r | Radius |
| Circular Sector | P = 2r + (θ/360)(2πr) | Radius and central angle |
Need the space inside a shape instead of the boundary length? Use our Area Calculator.
How to Calculate Perimeter
- Identify the shape. Decide which perimeter formula applies.
- Measure the required dimensions. Use the same unit for every input.
- Substitute the values into the formula.
- Calculate and keep the result in a linear unit such as cm, m, in, or ft.
For any polygon, the general idea is simple: add the lengths of all outside edges exactly once.
Worked Perimeter Examples
Rectangle Example
A rectangle is 12 cm long and 8 cm wide.
P = 2(l + w)
P = 2(12 + 8)
P = 2(20)
P = 40 cm
The total distance around the rectangle is 40 cm.
Triangle Example
A triangle has side lengths of 7 m, 9 m, and 12 m.
P = a + b + c
P = 7 + 9 + 12
P = 28 m
The triangle's perimeter is 28 m.
Circle Example
A circle has a radius of 7 cm.
C = 2Ï€r
C = 2 × π × 7
C = 14Ï€
C ≈ 43.9823 cm
The circumference is approximately 43.9823 cm.
Perimeter vs. Area
| Aspect | Perimeter | Area |
|---|---|---|
| Meaning | Distance around a shape | Space inside a shape |
| Units | Linear units such as cm, m, ft | Square units such as cm², m², ft² |
| Rectangle Formula | P = 2(l + w) | A = l × w |
| Typical Use | Fencing, edging, framing | Flooring, painting, covering |
Common Perimeter Mistakes
- Mixing units: Convert every dimension to the same unit before calculating.
- Using square units: Perimeter uses linear units, not cm², m², or ft².
- Missing an outside edge: Every external side must be counted exactly once.
- Double-counting shared edges: Internal edges of composite shapes are not part of the outside perimeter.
- Confusing radius and diameter: Diameter is twice the radius. Use C = 2πr for radius or C = πd for diameter.
How to Check Your Answer
First confirm that every measurement uses the same unit. Then check that every outside edge has been included exactly once. For regular shapes, verify the result using the standard formula. Finally, make sure the answer is written in a linear unit such as cm, m, in, or ft.
For a right triangle with a missing side, you can first use our Pythagorean Theorem Calculator and then calculate the perimeter.
Perimeter of Irregular and Composite Shapes
For an irregular polygon, measure each outside edge and add all side lengths together. The calculator's Custom / Irregular Polygon mode lets you enter side lengths such as 4, 7, 5, 9, 3, which gives:
P = 4 + 7 + 5 + 9 + 3 = 28 units
For composite shapes, count only the exposed outer boundary. Shared interior edges should not be added.
Working with a circular sector and need its area rather than boundary length? Use the Circle Sector Area Calculator.
Real-World Uses of Perimeter
Perimeter is useful when estimating fencing around a garden, trim around a room, borders around artwork, edging around landscaping, or any material that follows the outside boundary of a shape.
For surface measurements, try the Area Calculator. For three-dimensional measurements, use the Volume Calculator or Surface Area Calculator.
Frequently Asked Questions
For any polygon, add the lengths of all outside sides. Regular shapes also have shorter formulas, such as P = 4s for a square and P = 2(l + w) for a rectangle.
Use P = 2(l + w), where l is the length and w is the width.
Add the three side lengths: P = a + b + c. The three values must form a valid triangle.
Circumference is the term normally used for the perimeter of a circle. It is calculated with C = 2πr when the radius is known or C = πd when the diameter is known.
Perimeter uses linear units such as millimeters, centimeters, meters, kilometers, inches, feet, yards, or miles.
Measure every outside side and add the side lengths together. Do not include interior edges. You can also use the Custom / Irregular Polygon option in the calculator above.
Yes. Area measures the space inside a shape, while perimeter measures boundary length, so shapes with equal areas can still have different perimeters.
Usually not. Additional information about the shape is generally required. For a square, for example, the side can be found from the area and then used in P = 4s.
An ellipse does not have a simple elementary perimeter formula. This calculator uses Ramanujan's accurate approximation based on the semi-major axis a and semi-minor axis b.
For an annulus, the total boundary length includes both the outer circumference and the inner circumference, so P = 2Ï€(R + r).
Calculation methodology
Utilixea uses standard Euclidean geometry formulas for each supported shape. Inputs are treated as linear measurements, and results are returned in the selected unit. Circle-based calculations use JavaScript's built-in numerical approximation of π, and displayed results are rounded to up to six decimal places.
About this calculator: This tool is maintained by Utilixea. The calculation logic, examples, and validation rules are checked whenever the calculator is updated.
Last reviewed: July 22, 2026
Need another geometry measurement? Explore the Geometry Calculators collection for area, volume, surface area, distance, triangle, and circle tools.