Triangle Perimeter Calculator
Enter the three side lengths of a triangle to get its perimeter, semi-perimeter, area (Heron's formula), interior angles and full classification — with step-by-step working. Switch on the reverse solver to recover a missing side from the perimeter or from the area and two sides.
🔁 Find the Missing Side
Know the perimeter or the area, plus two sides? Enter them below to recover the third side. When solving from the area, there may be two valid triangles — both are shown.
What Is the Perimeter of a Triangle?
The perimeter of a triangle is the total length of its three sides — the distance you would walk if you traced its boundary exactly once. For a triangle with side lengths a, b and c, the perimeter is simply the sum of those three lengths:
P = a + b + c
Unlike the area, the perimeter is a one-dimensional measurement, so it is always in linear units (cm, m, in, ft…) — never in square units.
The Triangle Inequality Theorem
A triangle with side lengths a, b and c exists if and only if each side is shorter than the sum of the other two:
a + b > c a + c > b b + c > a
Equivalently, the sum of the two shorter sides must exceed the longest side. If equality holds exactly — for example 3, 4 and 7 — the three points are collinear, and the "triangle" is a degenerate flat segment.
Special Triangles and Their Perimeters
| Type | Side condition | Perimeter formula | Example |
|---|---|---|---|
| Equilateral | a = b = c = s | P = 3s | 6, 6, 6 → 18 |
| Isosceles | two sides equal, say a = b | P = 2a + c | 5, 5, 8 → 18 |
| Scalene | all three sides different | P = a + b + c | 3, 4, 5 → 12 |
| Right | a² + b² = c² (legs a, b; hypotenuse c) | P = a + b + √(a² + b²) | 5, 12, 13 → 30 |
Heron's Formula for Area
Once the perimeter is known, the semi-perimeter s = P/2 makes it easy to compute the area from the sides alone, without needing a height:
A = √( s (s − a) (s − b) (s − c) )
For a 3-4-5 triangle, s = 6 and A = √(6 · 3 · 2 · 1) = √36 = 6 square units — exactly matching the familiar ½ × 3 × 4 = 6 obtained from the legs.
Interior Angles from the Law of Cosines
Each angle follows from the three sides via the law of cosines. For the angle at vertex A (opposite side a):
cos A = (b² + c² − a²) / (2bc)
The same pattern applies cyclically for the other two angles. The three angles always sum to 180°.
Worked Examples
| a | b | c | Perimeter | Area | Type |
|---|---|---|---|---|---|
| 3 | 4 | 5 | 12 | 6 | Right scalene |
| 6 | 6 | 6 | 18 | 15.5885 | Equilateral |
| 5 | 5 | 8 | 18 | 12 | Acute isosceles |
| 7 | 8 | 9 | 24 | 26.8328 | Acute scalene |
| 2 | 3 | 4 | 9 | 2.9047 | Obtuse scalene |
How to Find a Missing Side
The perimeter formula can be rearranged to solve for an unknown side, provided you know enough other information. The two most common cases are handled by the reverse solver above:
1. From the perimeter and two sides
c = P − a − b
For example, if P = 20 m and the known sides are 7 m and 5 m, then c = 20 − 7 − 5 = 8 m. The reverse solver also checks that the resulting side satisfies the triangle inequality.
2. From the area and two sides
Given two sides a, b and the area A, the third side c satisfies a quartic that reduces to a quadratic in c². The closed-form solutions are:
c = √( a² + b² ± 2√(a²b² − 4A²) )
Two solutions typically exist — one giving an acute triangle and one an obtuse triangle with the same base sides and the same area. When A = ab/2 (the maximum possible), the two solutions coincide and the triangle is right-angled.
Real-World Applications
- Land surveying — perimeter of a triangular plot gives the fencing length.
- Roofing and trusses — the perimeter of triangular gable sections gives rafter and trim quantities.
- Sails and kites — the perimeter of the sail determines the tape and bolt-rope length.
- Navigation and geodesy — a triangle of three landmarks is often measured by perimeter and angles.
- Structural engineering — triangular bracing is sized by its perimeter for material take-off.
- Textiles — flags and pennants are triangular, and the perimeter gives the hemming length.
Units and Precision
All three sides must be entered in the same linear unit: millimetres, centimetres, metres, kilometres, inches, feet, yards or miles. The perimeter is reported in that same unit, the area in the corresponding square unit, and the angles in degrees. Mixing units — say a length in inches and a width in centimetres — gives a meaningless result.
The calculator rounds results to the precision you choose, from 0 to 10 decimal places. When a side is exact and the sum is exact, trailing zeros are removed. When the area or angles are irrational, the value is rounded at the last decimal place shown.
Assumptions and Limitations
- All three sides must be positive real numbers; decimals are accepted.
- The three sides must satisfy the triangle inequality. If they do not, no triangle exists and the calculator will say so.
- When solving from the area, the value must not exceed ab/2 for the two known sides — no triangle with those sides can have a larger area.
- The reverse solver from area can return two valid triangles; both are shown with their perimeters.
- This calculator handles 2D triangles only. For three-dimensional bodies, use a volume calculator.
❓ Triangle Perimeter FAQ
What is the perimeter of a triangle?
The perimeter of a triangle is the total length of its three sides — the distance around its boundary. For a triangle with side lengths a, b and c, the perimeter is P = a + b + c. For example, a 3-4-5 triangle has a perimeter of 3 + 4 + 5 = 12 units.
What is the formula for the perimeter of a triangle?
P = a + b + c, where a, b and c are the three side lengths, all measured in the same unit. Unlike area, the perimeter has no square root and no square units — it is simply the sum of three lengths.
How do I find the perimeter of a right triangle?
If the two legs are a and b and the hypotenuse is c, then c = √(a² + b²), so P = a + b + √(a² + b²). For example, legs 5 and 12 give c = 13 and P = 30. If you know only one leg and the hypotenuse, use the other leg = √(c² − a²).
What is the triangle inequality theorem?
A triangle with sides a, b and c exists if and only if each side is shorter than the sum of the other two: a + b > c, a + c > b and b + c > a. Equivalently, the sum of the two shorter sides must exceed the longest side. If equality holds exactly, the triangle is degenerate — a flat line segment.
How do I find a missing side of a triangle from its perimeter?
Rearrange P = a + b + c to isolate the unknown side: c = P − a − b. For example, if P = 20 m and the two known sides are 7 m and 5 m, then c = 20 − 7 − 5 = 8 m. The calculator's reverse mode does this automatically and checks the triangle inequality.
What is the perimeter of an equilateral triangle?
An equilateral triangle has three equal sides s, so its perimeter is P = 3s. For example, an equilateral triangle with side 6 cm has a perimeter of 18 cm. Conversely, from the perimeter you get the side as s = P/3.
What is the perimeter of an isosceles triangle?
An isosceles triangle has two equal sides. If the two equal sides are a each and the base is b, the perimeter is P = 2a + b. For example, sides 5, 5 and 8 give P = 18.
How do I find the perimeter from the area?
Area alone is not enough — many triangles share the same area but have different perimeters. You need at least two sides in addition to the area, and there may even be two valid triangles. The reverse solver on this page finds the missing third side from the area and two sides, and shows both solutions when they exist.
What is the semi-perimeter of a triangle?
The semi-perimeter is half the perimeter, s = P/2 = (a + b + c)/2. It appears in Heron's formula for area, A = √(s(s−a)(s−b)(s−c)), and in the inradius formula r = A/s.
What is Heron's formula?
Heron's formula gives the area of a triangle from its three sides: A = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2 is the semi-perimeter. For a 3-4-5 triangle, s = 6, so A = √(6·3·2·1) = √36 = 6 square units.
What is the difference between perimeter and area of a triangle?
Perimeter is the length of the boundary (a 1D measurement in linear units such as cm or m); area is the amount of surface enclosed (a 2D measurement in square units such as cm² or m²). For a triangle, perimeter = a + b + c and area = ½ × base × height (or, from the sides only, Heron's formula).
Can the perimeter of a triangle be measured in square units?
No. Perimeter is a one-dimensional length, so it uses linear units (mm, cm, m, km, in, ft, yd, mi). Square units are used for area, not perimeter.