Perimeter Calculator for Common Shapes

Calculate the perimeter or circumference of common shapes

Select a shape, enter its dimensions, and click Calculate perimeter to get the boundary length and the formula used.

Perimeter and circumference formulas for common two-dimensional shapes

Perimeter is the total length of the boundary of a two-dimensional shape. If you walked along the edge of a shape from one point and returned to the same point, the total distance you covered would be the perimeter. For a circle, the boundary has a special name: circumference. This calculator handles both perimeter and circumference under one tool, covering the five most commonly needed shapes: rectangle, square, triangle, circle, and regular polygon.

To use the calculator, select your shape from the dropdown and enter the relevant dimension values. Each shape requires different inputs. For a rectangle you need length and width. For a square you need the side length. For a triangle you need all three side lengths. For a circle you need the radius. For a regular polygon (all sides equal, all angles equal) you need the number of sides and the length of one side. After entering your values, click Calculate perimeter and the result will show both the numerical answer and the formula used to reach it.

The rectangle formula is 2 times the sum of length and width, commonly written as 2(L + W). This is because a rectangle has two pairs of equal sides. The square formula is simply 4 times the side length, since all four sides are equal. The triangle perimeter is the sum of all three sides, with no simplification required unless it is an equilateral or isosceles triangle.

The circle circumference formula is 2 times pi times the radius. Pi is approximately 3.14159265. If you know the diameter rather than the radius, you can divide the diameter by two to get the radius, or use the equivalent formula C = pi times d directly. The regular polygon formula is the number of sides times the length of one side. A regular hexagon with a side of 5 units has a perimeter of 30 units.

How perimeter differs from area

Perimeter and area are both measurements of two-dimensional shapes, but they measure different properties. Perimeter measures the length of the boundary, expressed in linear units such as metres or feet. Area measures the enclosed space, expressed in square units such as square metres or square feet. They are related but not interchangeable, and changing one does not necessarily change the other in a predictable way.

A classic demonstration is the isoperimetric problem: among all shapes with the same perimeter, a circle encloses the greatest area. This means that if you had a fixed length of fencing and wanted to maximise the enclosed area, the ideal shape would be a circle. Squares enclose more area than rectangles with the same perimeter when the rectangle is elongated, which is why rooms that are nearly square tend to feel more spacious than long narrow ones of the same total floor area.

In practical terms, perimeter tells you how much edging, fencing, framing, or border material you need for a shape, while area tells you how much surface you need to cover or fill. A gardener planning a rectangular bed needs the perimeter to know how much border timber to buy and the area to know how much topsoil to order.

Regular polygons explained

A regular polygon is a polygon in which all sides are equal in length and all interior angles are equal. Common examples include equilateral triangles (3 sides), squares (4 sides), regular pentagons (5 sides), regular hexagons (6 sides), regular octagons (8 sides), and so on. Because all sides are equal, the perimeter is simply the number of sides multiplied by the length of one side.

As the number of sides increases, a regular polygon increasingly resembles a circle. A regular polygon with 360 sides of the right length would be visually indistinguishable from a circle to the naked eye. This relationship between regular polygons and circles is fundamental to understanding why the circle's circumference formula involves pi.

If your shape is not regular (sides of different lengths), calculate the perimeter by adding all side lengths individually. The triangle mode in this calculator already handles this by accepting three separate side lengths. For irregular quadrilaterals, pentagons, and other shapes, you can add all sides together manually using a basic addition approach.

Last updated: 2026-05-06