Perimeter Calculator
Pick a shape, enter its measurements in any mix of units and read the perimeter in the unit you choose. The guide lists the formula for each shape with a worked example.
Related calculators
Created by the Reeliy Editorial Team. Last updated: Oct 19, 2026
How to calculate the perimeter of any shape
The perimeter of a flat shape is the length of its boundary, the distance you walk if you go once around the edge. It is a length, so it is measured in mm, cm, m, in, ft and so on, never in square units. For a circle the same quantity is called the circumference.
- Choose the shape in Perimeter of. The form shows only the measurements that shape needs.
- Enter each measurement and pick its unit. Units can differ from one field to the next.
- Pick Metric, the unit you want the perimeter in, then press Calculate Perimeter.
| Shape | You enter | Perimeter |
|---|---|---|
| Square | Side a | 4a |
| Rectangle | Width w, length l | 2(w + l) |
| Triangle | Three known measurements | a + b + c |
| Circle | Radius r | 2πr |
| Parallelogram | Base b, side s | 2(b + s) |
| Trapezoid | Bases b₁ and b₂, legs c and d | b₁ + b₂ + c + d |
| Ellipse | Major radius a, minor radius b | ≈ π(a + b)(1 + h/4 + h²/64 + …) |
| Sector | Radius r, angle θ | 2r + r·θ (θ in radians) |
| Regular octagon | Side a | 8a |
Squares, rectangles and other polygons
For a polygon the perimeter is simply the sum of its sides. Equal sides let you shorten the sum into a multiplication.
Perimeter of a square
P = 4 × a
A square with a side of 3 cm has a perimeter of 4 × 3 = 12 cm. If the side is entered as 450 cm and the Metric is set to metres, the answer is 4 × 4.5 = 18 m.
Perimeter of a rectangle
P = 2 × (w + l)
A room 7.5 m wide and 4.2 m long has 2 × (7.5 + 4.2) = 23.40 m of wall to skirt. The calculator shows 23.40 rather than 23.4 because it pads one-decimal results to two decimals.
Perimeter of a parallelogram
P = 2 × (b + s)
Use the slanted side s, not the height. With a base of 9.5 cm and a slanted side of 6.25 cm, P = 2 × (9.5 + 6.25) = 31.50 cm. The height only matters for the area.
Perimeter of a trapezoid
P = b₁ + b₂ + c + d
Add the two parallel bases and the two legs. For bases of 12 and 20 and legs of 7 and 9, P = 12 + 20 + 7 + 9 = 48. If you only know the height and the bases, find each leg with the Pythagorean theorem first.
Perimeter of a regular octagon
P = 8 × a
A regular octagon with a side of 2.5 cm has a perimeter of 20 cm. To find the space it covers, use the octagon area calculator.
Perimeter of a triangle
P = a + b + c
If all three sides are known, choose SSS and add them. If not, choose the rule that matches your data: SAS (two sides and the angle between them), SSA (two sides and an angle opposite one of them), ASA (two angles and the side between them) or AAS (two angles and a side opposite one of them). The calculator finds the missing sides with the law of cosines or the law of sines.
Example (SAS). Sides b = 5 and c = 7 enclose a 60° angle. The third side is √(25 + 49 − 70 × cos 60°) = √39 ≈ 6.244998, so the perimeter is 18.244998.
SSA can describe two different triangles. With b = 5, c = 7 and β = 30° the calculator shows both: 21.632892 and, as Perimeter (2-nd possible), 14.491464. When the data cannot form a triangle it answers Such a triangle cannot exist! The perimeter of a triangle calculator has a longer explanation and also supports a hypotenuse-and-leg input.
Circles, ellipses and sectors
Round shapes need π. Circles, ellipses and sectors show a result only when the radius (the major radius for an ellipse) is greater than zero.
Circumference of a circle
C = 2π × r = π × d
A circular pond with a radius of 3.2 m has a circumference of 2π × 3.2 ≈ 20.106193 m. A wheel with a diameter of 30 cm has C = π × 30, which is the same as a radius of 15 cm: 94.247780 cm. There is also a dedicated circumference of a circle calculator.
Circumference of an ellipse (oval)
An ellipse has no simple closed formula for its perimeter; the exact value needs an elliptic integral. The calculator sums the first seven terms of a standard series. With a the major radius, b the minor radius and h = ((a − b) ÷ (a + b))²:
C ≈ π × (a + b) × (1 + h/4 + h²/64 + h³/256 + 25h⁴/16384 + 49h⁵/65536 + 441h⁶/1048576)
For radii of 5 and 3 this gives 25.526999, matching the exact value to six decimals. When a equals b the series collapses to the circle formula: radii of 4 and 4 give 25.132741. Very thin ellipses are the weak spot. For radii of 10 and 1 the calculator returns 40.638741 while the true figure is about 40.639742, a difference of 0.0025%.
Perimeter of a sector
P = 2r + r × θ, with θ = angle × π ÷ 180Two straight radii plus the curved arc.
For a pie slice with r = 8 cm and an angle of 45°, the arc is 8 × 0.785398 ≈ 6.283185 and the perimeter is 16 + 6.283185 = 22.283185 cm. A 180° sector of radius 4 is a half disc: 8 + 4π ≈ 20.566371. Leave the angle blank and you get just 2r.
Units, blank fields and accuracy
- Mixed units. A trapezoid with bases of 1 m and 20 cm and legs of 500 mm and 0.1 m, with Metric set to dm, comes to 10 + 2 + 5 + 1 = 18 dm. Everything is converted before it is added.
- Metric versus the unit selects. Metric sets the unit of the answer. Every measurement has its own unit select, and each starts at cm, so set them to match your data.
- Blank fields count as zero. A rectangle with a width of 3 and no length returns 6.
- Angles run from 0 to 360 degrees, and lengths cannot be negative.
- Rounding. Results keep up to six decimals. Trailing zeros are removed in pairs, which is why you may see 19.50 or 0.0060 but never 19.5000.
Where a perimeter calculator helps
Perimeters decide how much material runs along an edge: fencing around a yard, trim and skirting in a room, edging around a flower bed, framing for a picture, or the run of a running track. They also appear in packing and manufacturing, where the length of a cut or weld follows the outline of a part.
Perimeter measures length along the boundary. If you need how much surface a shape covers, you want its area: see the area of a rectangle, area of a triangle or area of a circle calculators.
Frequently asked questions
What is the perimeter of a shape?
It is the total length of its boundary. For a polygon, add up the lengths of all sides. For a circle the boundary is called the circumference and equals 2πr.
Can I mix units, such as feet and inches?
Yes. Each measurement has its own unit select and the calculator converts everything to the Metric you choose before it adds up the lengths.
Why is the ellipse circumference approximate?
No simple exact formula exists; the exact answer is an elliptic integral. The calculator uses a seven-term series that is accurate to six decimals for ordinary ellipses and a little rougher for very elongated ones.
Why does my circle show no result?
Circle, ellipse and sector need a radius larger than zero. A blank or zero radius shows a note instead of a number.
How do I find the perimeter of a triangle when I know angles?
Choose SAS, SSA, ASA or AAS, enter the known sides and angles, and the calculator finds the missing sides with the law of cosines or the law of sines before adding all three.
Cite this calculator and page
If you use this page in your work, you can cite it as:
Reeliy Editorial Team. (2026). Perimeter Calculator. Reeliy. https://reeliy.com/calculators/perimeter-calculator“Perimeter Calculator.” Reeliy, 2026, https://reeliy.com/calculators/perimeter-calculator.