How to Calculate the Perimeter of a Triangle

Updated 14 November 2026

The perimeter is the total distance around a triangle. Add its three side lengths, using the same unit for all three.

Triangle perimeter
\[P=a+b+c\]

Perimeter is a length, so report it in cm, m, or another length unit—not square units.

Triangle perimeter calculator

Enter three side lengths. The calculator checks that the sides can form a triangle before adding them.

Each side must be positive and no more than 1,000,000, with at most six decimal places.

How to calculate it

  1. Identify the three outside edges of the triangle.
  2. Convert the side lengths to the same unit if necessary.
  3. Add all three lengths and include the length unit in your answer.

Example 1: three unequal sides

A triangle has sides 5 cm, 7 cm, and 9 cm.

\[P=5+7+9=21\,\mathrm{cm}\]

The sides are valid because the two shorter sides add to more than the longest: \(5+7>9\).

TAKE A CLOSER LOOKImage previewJPG · 52 KB
triangle1
Download image

Example 2: a right triangle

The sides are 12 cm, 16 cm, and 20 cm. A right triangle uses the same perimeter rule as every other triangle.

\[P=12+16+20=48\,\mathrm{cm}\]

The right angle does not change the addition. The Pythagorean theorem is needed only if a side must first be found.

TAKE A CLOSER LOOKImage previewJPEG · 27 KB
triangle3
Download image

Special triangles

Equilateral: all three sides are equal
\[P=3s\]

If each side is 8 cm, \(P=3\times8=24\) cm.

Isosceles: two equal sides of length a and base b
\[P=2a+b\]

With equal sides of 7 cm and base 10 cm, \(P=2\times7+10=24\) cm.

Check the number of sides first

The shape below has four sides, so it is a quadrilateral, not a triangle. Its perimeter is still the sum of its outside edges:

\[P=5+4+3+6=18\,\mathrm{cm}\]
TAKE A CLOSER LOOKImage previewJPG · 23 KB
triangle2
Download image
Do not add an internal height or diagonal. Perimeter follows only the outside boundary. Area measures the surface inside and uses square units.

What if a side is missing?

If the perimeter and two sides are known, rearrange the formula to \(c=P-a-b\). Use the missing-side calculator and worked examples.

Can 2 cm, 3 cm, and 7 cm be triangle sides?

No. The two shorter sides add to only 5 cm, which is less than 7 cm. Adding the numbers gives 12 cm, but they cannot form a triangle, so it would be misleading to call that a triangle’s perimeter.