Perimeter Calculator
Find the distance around squares, rectangles, triangles, circles, regular polygons, ellipses, and irregular polygons. Enter measurements in one unit to see the formula and a worked result.
🧮 Perimeter Calculator
Select any shape below, enter your measurements, and calculate the perimeter instantly.
Square Perimeter Calculator
A square is a regular quadrilateral with four equal sides and four right angles (90°). The perimeter is the total distance around the square.
Choose the unit used for every dimension. Changing this label does not convert entered numbers.
📚 All Perimeter Formulas
Quick reference for all shape perimeter formulas with variable definitions.
⬜ Square
s = side length. All 4 sides equal.
▬ Rectangle
l = length, w = width.
△ Triangle
Sum of all 3 sides.
⭕ Circle
r = radius, d = diameter.
▱ Parallelogram
a, b = adjacent sides.
◇ Rhombus
s = side. All 4 sides equal.
⏢ Trapezoid
Sum of all 4 sides.
⬠ Regular pentagon
s = side. 5 equal sides.
⬡ Regular hexagon
s = side. 6 equal sides.
🛑 Regular octagon
s = side. 8 equal sides.
⬭ Ellipse
Ramanujan approximation; a and b are semi-axis lengths, each measured from the center to the edge.
🔷 Regular n-gon
n is a whole number of sides (at least 3); s is the common side length.
📏 Irregular polygon
Add the length of each outside side. This works when the sides are unequal.
How to calculate perimeter
Perimeter is the distance around a flat shape. For a polygon, add the lengths of its outside sides. A circle's perimeter is called its circumference.
Use the calculator in four steps
- Choose the shape. The pentagon, hexagon, octagon, and n-gon modes assume a regular polygon, so their sides must all be equal. Use irregular polygon for different side lengths.
- Measure the needed dimensions. Enter the side lengths for polygons, the radius for a circle, or both semi-axes for an ellipse. Keep every length in the same measurement unit.
- Choose a unit. This labels the answer; it does not convert your measurements. Convert mixed units first with the NUM8ERS unit converter.
- Calculate and inspect the working. The answer is a linear length, such as cm or ft. Check the substitution shown beneath it.
Perimeter versus area
Perimeter follows the boundary; area measures the region inside. A rectangle 8 cm long and 5 cm wide has perimeter 2(8 + 5) = 26 cm. Its area is 8 × 5 = 40 cm². Because these describe different quantities, do not compare 26 cm with 40 cm² as if they were the same kind of number. See our rectangle area and perimeter guide for more worked examples.
Doubling every side length doubles perimeter, while it multiplies area by four. This scale check helps catch mistakes when a result feels too large or small. If a square has side 4 m, its perimeter is 16 m. If the side becomes 8 m, its perimeter is 32 m.
Worked perimeter examples
Square: A tile with side 12 cm has perimeter 4 × 12 = 48 cm. Measure one side only when the four sides really are equal.
Rectangle: A garden 18 m by 11 m needs 2(18 + 11) = 58 m of boundary before gates or overlaps. For a fence, subtract any opening that will remain unfenced; a gate itself may need separate material.
Triangle: Sides 5 cm, 7 cm, and 9 cm make a valid triangle because each pair totals more than the remaining side. Its perimeter is 5 + 7 + 9 = 21 cm. Sides 2, 3, and 6 do not make a triangle, even though their sum is 11.
Circle: A wheel with radius 7 cm has circumference 2π × 7 ≈ 43.9823 cm. If you know diameter instead, divide it by two before entering the radius, or use C = πd. The arc length calculator helps when you need only part of a circular edge.
Regular hexagon: Six equal sides of 4 in give P = 6 × 4 = 24 in. For a hexagon whose sides differ, use the irregular polygon mode and list every side.
Irregular polygon: A four-sided plot with edge lengths 9 m, 12 m, 8 m, and 11 m has a boundary length of 9 + 12 + 8 + 11 = 40 m. Lengths alone give the boundary sum; they do not describe the exact angles or area of the plot.
Which dimensions should you enter?
Circle: Enter the radius, the center-to-edge distance. The diameter spans the whole circle through its center and equals 2r. Ellipse: Enter the semi-major and semi-minor axes, both measured from the center to the curve; they are half the full major and minor axis lengths. The ellipse result uses Ramanujan's approximation and is marked with ≈.
Trapezoid: Enter both bases and both legs. The tool sums those four lengths; the numbers alone do not verify that a particular trapezoid can be constructed. Regular polygon: Enter a whole number of sides (at least three) and one common side length. An irregular polygon requires each individual side.
For a real project, treat the calculated perimeter as the measured boundary. Extra cutting allowance depends on material, joins, waste, and the installation plan, so check those details instead of automatically adding a fixed percentage.
Frequently asked perimeter questions
Answers to common questions about dimensions, formulas, and results.
What is perimeter?
Perimeter is the total distance around the boundary of a two-dimensional shape. For a polygon, add its outside side lengths. For a circle, this boundary length is called circumference.
Is perimeter the same as area?
No. Perimeter is a length written in units such as centimeters or feet. Area is the space inside a shape and uses square units such as cm² or ft². A shape can have the same area as another shape but a different perimeter.
How do I find an irregular shape's perimeter?
Measure each straight outside side in the same unit, then add them. Use the irregular polygon mode for three or more unequal sides. If the boundary includes curves, measure or calculate those curved lengths separately before adding them.
Can I use this calculator for a rectangle and a square?
Yes. For a rectangle, enter its length and width; the formula is 2(l + w). For a square, enter the common side length; the formula is 4s. Both answers are in the same unit as the entered lengths.
Why does the triangle mode reject some positive lengths?
Three positive lengths make a nondegenerate triangle only when the sum of any two is greater than the third. For example, 3, 4, and 8 fail because 3 + 4 is less than 8. The calculator checks this before showing a perimeter.
What is the difference between circle radius and diameter?
Radius goes from the center to the edge. Diameter runs across the circle through the center and equals twice the radius. The circle mode takes radius. If you know diameter, divide it by two first. The circumference formulas are C = 2πr and C = πd.
Do the pentagon, hexagon, and octagon formulas work for irregular shapes?
The one-side shortcuts 5s, 6s, and 8s apply when all sides have the same length, as in a regular polygon. If sides vary, choose irregular polygon and enter every length. A polygon's perimeter is always the sum of its side lengths.
What does the ellipse answer mean?
The ellipse mode estimates boundary length with Ramanujan's formula, using the two semi-axis lengths. Its result is approximate, so the working uses ≈. For a circle, the two semi-axes are equal and the expression reduces to its circumference.
Does selecting cm or ft convert my numbers?
No. The unit selector labels all inputs and the answer. Convert measurements before entry if they start in different units. For instance, do not add 2 meters and 30 centimeters as 2 + 30.
Further reading
For definitions and foundational perimeter and circumference methods, see OpenStax: Polygons, Perimeter, and Circumference.