Skip to content
Math

Perimeter Calculator

Calculate the perimeter of 10 common 2D shapes in metric or imperial units. Choose a shape, enter its dimensions, and get the exact perimeter with a step-by-step breakdown. Triangle mode lets you solve from three sides, two sides and an angle, or two angles and a side.

Your details

ft
ft
Perimeter
32
Perimeter (converted)9.7536
Perimeter (your units)32
Perimeter (converted)9.7536

The perimeter is 32 ft.

  • That is 9.7536 m in the other unit system.
  • Perimeter is the total length of the boundary, measured in linear units.
  • Perimeter and area measure different things: perimeter is a length, area is the enclosed surface.

Next stepUse the area calculator to find the surface this shape encloses.

Formula

Prect=2(l+w),Psquare/rhombus=4s,P=a+b+c,Ccircle=2πr,Pellipseπ(a+b) ⁣(1+3h10+43h)P_{\text{rect}} = 2(l+w),\quad P_{\text{square/rhombus}} = 4s,\quad P_{\triangle} = a+b+c,\quad C_{\text{circle}} = 2\pi r,\quad P_{\text{ellipse}} \approx \pi(a+b)\!\left(1+\frac{3h}{10+\sqrt{4-3h}}\right)

Worked example

A rectangle 10 ft long and 6 ft wide: 2 × (10 + 6) = 32 ft. A circle of radius 5 ft: 2 × π × 5 = 31.416 ft. A triangle with sides 3, 4, 5: 3 + 4 + 5 = 12 ft. An ellipse with a = 8 ft and b = 5 ft: Ramanujan gives approximately 42.11 ft.

What perimeter means

The perimeter of a two-dimensional shape is the total length of its boundary, the distance you would travel walking once all the way around its edge. For any polygon you find it by adding together the lengths of every side. Because a circle has no straight edges, the distance around it gets a special name, the circumference, but it is the same idea. In practical work perimeter tells you how much fencing, edging, molding, or weather-stripping you need for a project.

Formulas for every supported shape

A rectangle uses 2 times (length plus width) because opposite sides are equal. A square and a rhombus each have four equal sides, so the perimeter is 4 times the side. A triangle is simply a + b + c, though those three lengths must pass the triangle inequality to form a real shape. A circle uses circumference = 2 times pi times the radius; if you know the diameter, use pi times diameter instead. A semicircle adds the curved half-circumference (pi times r) to the straight diameter (2r). An ellipse has no exact closed-form solution, so this calculator uses Ramanujan's first approximation, which has an error below 0.5% for any axis ratio. A parallelogram mirrors the rectangle formula with its two pairs of equal sides. A trapezoid is the straight sum of all four sides since no two pairs are necessarily equal. A regular polygon of n sides each of length s has perimeter n times s; a hexagon with side 5 is 30, for example. For a custom shape, simply list every side separated by commas.

Triangle solving modes

Most calculators only support three-sides-known (SSS) triangles. This calculator also handles SAS (two sides and the angle between them) and ASA (two angles and the side between them). For SAS the law of cosines gives the missing side: c = sqrt(a squared + b squared minus 2ab times cos(angle)). For ASA the third angle is 180 minus the other two, and then the law of sines gives the two unknown sides. All three modes then sum the three sides to find the perimeter.

Perimeter versus area

Perimeter and area answer different questions, and mixing them up is a common mistake. Perimeter is a one-dimensional length measured in units such as metres or feet, and it tells you how much material runs along the boundary. Area is two-dimensional, measured in square units, and tells you how much surface a shape covers. Two shapes can share the same perimeter yet enclose very different areas, which is why both measurements matter. A square, for instance, encloses more area than any other rectangle of the same perimeter.

Unit conversion

Choose your preferred length unit from the units dropdown and every dimension input and result will reflect that choice. The calculator also shows a converted result in the complementary system: metric inputs are converted to feet, and imperial inputs are converted to metres. This makes it straightforward to check a figure in both systems without switching units manually.

Perimeter formulas by shape

ShapeFormulaVariables
Rectangle2 × (l + w)l = length, w = width
Square4 × ss = side length
Triangle (SSS)a + b + ca, b, c = sides
Triangle (SAS)a + b + sqrt(a²+b²-2ab cos θ)θ = included angle
Triangle (ASA)law of sines then sum sidestwo angles + enclosed side
Circle2 × π × rr = radius
Semicircleπ × r + 2rr = radius
EllipseRamanujan approx.a = semi-major, b = semi-minor
Parallelogram2 × (a + b)a, b = adjacent sides
Trapezoida + b + c + da, b = bases, c, d = legs
Rhombus4 × ss = side length
Regular polygonn × sn = sides, s = side length
Customsum of all entered sidescomma-separated list

All shapes supported by this calculator with their formulas and variable definitions.

Frequently asked questions

What is the difference between perimeter and circumference?

They measure the same concept, the total length of the boundary around a 2D shape. "Circumference" is the conventional word used specifically for circles and other curved shapes. For polygons with straight sides the word "perimeter" is used instead.

How do I find the perimeter of a triangle if I only know two sides and an angle?

Use SAS mode. Enter the two known sides and the angle between them. The calculator applies the law of cosines to find the missing third side, then sums all three sides to produce the perimeter.

Why do my triangle sides give no result?

The sides must satisfy the triangle inequality: each side must be strictly less than the sum of the other two. If the longest side equals or exceeds the sum of the other two, no real triangle exists and there is no perimeter to report.

How accurate is the ellipse perimeter calculation?

The calculator uses Ramanujan's first approximation, which has a maximum relative error below 0.5% regardless of how elongated the ellipse is. For most practical purposes this precision is more than sufficient. An exact formula for ellipse perimeter does not exist in terms of elementary functions.

How do I find the perimeter of a shape not in the list?

Choose "Custom sides" from the shape dropdown and enter every side length separated by commas. The calculator sums them to give the total perimeter. Make sure to enter all sides, including any sides that are equal by symmetry.

What is the perimeter of a regular hexagon with side 5?

A regular hexagon has 6 equal sides, so the perimeter is 6 times 5 = 30 in whatever unit you choose. Select "Regular polygon", set n = 6, enter 5 for the side length, and the calculator confirms the result.

Sources

Written by Dr. Elena Vasquez, PhD Mathematician · Lisbon, Portugal

Translating rigorous geometric theory into accurate, reliable calculation tools trusted by engineers, students, and researchers worldwide.

Search 3,500+ calculators

Loading search…