Perimeter of a Triangle Calculator

Find the perimeter of any triangle from three sides or two sides and an angle. Includes area, angles, and triangle classification.

△ Perimeter of a Triangle Calculator
Side a
units
Side b
units
Side c
units

△ What is the Perimeter of a Triangle?

The perimeter of a triangle is the total length of its three sides added together. If a triangle has side lengths a, b, and c, then its perimeter is P = a + b + c. The result is always expressed in the same linear unit as the sides - centimetres, metres, inches, feet, or any other unit of length. Perimeter represents the total distance you would travel walking all the way around the outside boundary of the triangle.

Unlike area, which measures the two-dimensional surface enclosed by the triangle, perimeter is a one-dimensional measurement of the boundary. Both quantities matter in real-world problems. Perimeter tells you how much fencing is needed to border a triangular plot, how much trim is required to edge a triangular tile, or how long the frame of a triangular structure must be. Area tells you how much material fills the interior of that same triangle.

Triangles are classified by their side lengths. A scalene triangle has all three sides different, with all three angles also different. An isosceles triangle has exactly two sides equal - these equal sides are called legs, and the remaining side is the base; the two base angles are also equal. An equilateral triangle has all three sides equal and all three interior angles equal to exactly 60 degrees. The universal formula P = a + b + c applies to all types, though simplified forms exist: isosceles perimeter = 2 × leg + base; equilateral perimeter = 3 × side.

Triangles are also classified by their largest angle. An acute triangle has all three angles less than 90 degrees. A right triangle has one angle exactly equal to 90 degrees, making the Pythagorean theorem applicable: the longest side (hypotenuse) satisfies c² = a² + b². An obtuse triangle has one angle greater than 90 degrees. This calculator classifies each triangle by both side type and angle type, so you always know exactly what kind of triangle you are working with.

This calculator offers two input modes. The Three Sides (SSS) mode directly sums the three given lengths to find the perimeter, then applies Heron's formula for area and the Law of Cosines to compute all three interior angles. The Two Sides + Angle (SAS) mode uses the Law of Cosines to find the missing third side, then proceeds with the full set of results. In every case, the calculator validates the triangle inequality before computing anything.

Formulas and Methods

Method 1 — Three Sides (SSS): Perimeter

P = a + b + c
a, b, c = The three side lengths in any consistent unit
P = Perimeter (same unit as the sides)

This is the fundamental definition of perimeter for any polygon: sum all the side lengths. For a triangle there are exactly three sides. The triangle inequality must hold: a + b > c, a + c > b, and b + c > a must all be true. If any condition fails, no valid triangle can be formed from those three lengths and no perimeter exists.

Area from SSS: Heron's Formula

s = P / 2  →  Area = √(s(s − a)(s − b)(s − c))
s = Semi-perimeter = half the total perimeter

Heron's formula computes the area of any triangle directly from its three side lengths, without requiring an angle or height measurement. It was described by Hero of Alexandria around 60 AD. The semi-perimeter s is the bridge between the perimeter and the area: compute P first, halve it to get s, then apply the square-root formula. For the classic 3-4-5 right triangle: s = (3+4+5)/2 = 6, Area = √(6 × 3 × 2 × 1) = √36 = 6 square units.

All Three Angles: Law of Cosines

cos A = (b² + c² − a²) / (2bc)  →  A = arccos(…)
A = Angle opposite side a; similarly for B and C

Given all three sides, each interior angle can be found by rearranging the Law of Cosines. Compute two angles with the formula and find the third from A + B + C = 180°. Right-angle check: if a² + b² = c² (within floating-point tolerance), the triangle is a right triangle with C = 90°.

Method 2 — Two Sides and Included Angle (SAS)

r = √(p² + q² − 2pq ⋅ cos C)  →  P = p + q + r
p, q = The two known side lengths
C = The included angle between sides p and q (degrees)
r = The computed third side via the Law of Cosines

The Law of Cosines generalises the Pythagorean theorem to all triangles. When C = 90°, cos(90°) = 0 and the formula reduces to r² = p² + q², the Pythagorean identity. For acute angles (C < 90°) the cosine term is positive, making r shorter. For obtuse angles (C > 90°) the cosine term is negative, making r longer than the Pythagorean prediction. Once r is known, the area in SAS mode is computed as Area = ½ × p × q × sin(C).

How to Use This Calculator

  1. Choose your input mode — click Three Sides (SSS) if you know all three side lengths, or Two Sides + Angle (SAS) if you know two sides and the angle directly between them.
  2. Enter your measurements — type the side lengths in any consistent unit. For SAS mode, enter the included angle in degrees (must be strictly between 0 and 180).
  3. Click Calculate — the calculator instantly returns the perimeter, area, all three interior angles, and the triangle classification (e.g. Right / Scalene).
  4. Review the step-by-step note — the grey box below the results shows the full arithmetic, so you can follow or verify each step manually.

Example Calculations

Example 1 — 3-4-5 Right Triangle (SSS)

Triangle with sides a = 3, b = 4, c = 5 units

1
Check triangle inequality: 3 + 4 = 7 > 5 ✓, 3 + 5 = 8 > 4 ✓, 4 + 5 = 9 > 3 ✓
2
Perimeter = 3 + 4 + 5 = 12 units
3
s = 12 / 2 = 6. Area = √(6 × 3 × 2 × 1) = √36 = 6 sq units
4
Angle check: 3² + 4² = 25 = 5² → Right angle at C. All sides different → Scalene
Perimeter = 12.0000 units  ·  Area = 6.0000 sq units  ·  Type: Right / Scalene
Try this example →

Example 2 — Equilateral Triangle with Side 6 (SSS)

Equilateral triangle with all sides = 6 units

1
Perimeter = 6 + 6 + 6 = 18 units
2
s = 18 / 2 = 9. Area = √(9 × 3 × 3 × 3) = √243 ≈ 15.5885 sq units
3
All sides equal → Equilateral. All angles = 60.00° → Acute
Perimeter = 18.0000 units  ·  Area ≈ 15.5885 sq units  ·  Type: Acute / Equilateral
Try this example →

Example 3 — Isosceles Triangle 8-8-5 (SSS)

Isosceles triangle with legs 8 and 8, base 5 units

1
Check: 8 + 8 = 16 > 5 ✓, 8 + 5 = 13 > 8 ✓
2
Perimeter = 8 + 8 + 5 = 21 units
3
s = 21 / 2 = 10.5. Area = √(10.5 × 2.5 × 2.5 × 5.5) ≈ √360.9375 ≈ 18.9983 sq units
4
Two sides equal (8, 8) → Isosceles. Largest side² = 64 < 64 + 25 = 89 → Acute
Perimeter = 21.0000 units  ·  Area ≈ 18.9983 sq units  ·  Type: Acute / Isosceles
Try this example →

Example 4 — SAS: Sides 5 and 7, Included Angle 60°

Triangle with two sides 5 and 7 units, included angle 60°

1
Third side r = √(5² + 7² − 2 × 5 × 7 × cos 60°) = √(25 + 49 − 35) = √39 ≈ 6.2450 units
2
Perimeter = 5 + 7 + 6.2450 ≈ 18.2450 units
3
Area = ½ × 5 × 7 × sin 60° = 17.5 × 0.8660 ≈ 15.1554 sq units
4
All sides different (5, 6.245, 7) → Scalene. No angle = 90° and all acute → Acute
Perimeter ≈ 18.2450 units  ·  Area ≈ 15.1554 sq units  ·  Type: Acute / Scalene
Try this example →

Frequently Asked Questions

What is the formula for the perimeter of a triangle?+
Perimeter = a + b + c, where a, b, and c are the three side lengths. This is the total boundary length of the triangle. For an equilateral triangle: P = 3a. For an isosceles triangle with legs l and base b: P = 2l + b. For a right triangle with legs p, q and hypotenuse h: P = p + q + h, where h = √(p² + q²).
How do I find the perimeter if I know two sides and an angle?+
Use the Law of Cosines to find the third side: c = √(a² + b² − 2ab·cos(C)), where C is the included angle between sides a and b. Then perimeter = a + b + c. For example: sides 5 and 7, included angle 60° → c = √(25 + 49 − 70·cos60°) = √(74 − 35) = √39 ≈ 6.245. Perimeter ≈ 5 + 7 + 6.245 = 18.245.
What is Heron's formula and how does it relate to perimeter?+
Heron's formula computes triangle area from the three side lengths. First compute the semi-perimeter s = (a+b+c)/2 = perimeter/2. Then Area = √(s(s−a)(s−b)(s−c)). So the perimeter feeds directly into Heron's formula. For a 3-4-5 right triangle: s = 6, Area = √(6×3×2×1) = √36 = 6 square units. This calculator shows both perimeter and area together.
How do I find the perimeter of a right triangle?+
Use the Pythagorean theorem to find the hypotenuse: c = √(a² + b²). Then perimeter = a + b + c. Example: right triangle with legs 6 and 8 → hypotenuse = √(36+64) = 10 → perimeter = 6 + 8 + 10 = 24 units. Alternatively, if you know the hypotenuse and one leg: missing leg = √(c²−a²), then sum all three.
What is the perimeter of an equilateral triangle?+
An equilateral triangle has all three sides equal. Perimeter = 3 × side. For example, an equilateral triangle with side 7 units has perimeter = 21 units. Each angle is exactly 60°. The height of an equilateral triangle is h = (√3/2) × side ≈ 0.866 × side, and the area is (√3/4) × side².
What is the triangle inequality theorem?+
For three lengths to form a valid triangle, each must be less than the sum of the other two: a + b > c, a + c > b, and b + c > a. If any of these fails, the three sides cannot close into a triangle. Example: sides 1, 2, and 10 fail because 1 + 2 = 3 < 10. This calculator validates the triangle inequality before calculating.
How does perimeter relate to the area of a triangle?+
Perimeter (sum of sides) and area measure different geometric properties - perimeter is the boundary length, area is the enclosed surface. They are related through Heron's formula (which uses the semi-perimeter to compute area) and through the inradius: Area = inradius × semi-perimeter. A triangle can have a large perimeter but a small area (if very flat/obtuse), or vice versa.
Can I find the perimeter of a triangle with only two sides?+
Not uniquely - you need a third piece of information. With two sides and the included angle (SAS), use the Law of Cosines to find the third side. With two sides and the opposite angle (SSA), be aware of the ambiguous case (two possible triangles). With just two sides and no angle, there are infinitely many valid triangles. This calculator supports the SAS case.
What are scalene, isosceles, and equilateral triangles?+
Scalene: all three sides different lengths, all angles different. Perimeter = a + b + c with all distinct. Isosceles: two sides equal (legs), one different (base). Base angles are equal. Perimeter = 2 × leg + base. Equilateral: all three sides equal, all angles 60°. Perimeter = 3 × side. This calculator automatically classifies the triangle from the entered side lengths.
What is the semi-perimeter of a triangle?+
The semi-perimeter s = (a + b + c) / 2 = perimeter / 2. It appears in Heron's formula for triangle area: Area = √(s(s−a)(s−b)(s−c)). It also equals the inradius times the area divided by the area: s = Area / r_in where r_in is the inradius. For a 3-4-5 triangle: s = 6, Area = √(6×3×2×1) = 6, inradius = Area/s = 1.