Perimeter of a Triangle Calculator
Find the perimeter of a triangle using whichever values you already know. Choose the SSS mode if you have all three side lengths, SAS if you have two sides and the angle between them, or ASA if you have one side and the two angles at its endpoints. The calculator applies the law of cosines or law of sines to find any missing sides, then sums them. You also get the semi-perimeter (half the perimeter), which appears in many area and geometry formulas.
What is the perimeter of a triangle?
The perimeter of a triangle is the total distance around its boundary: the sum of the lengths of all three sides. If the sides are labelled a, b, and c, the formula is simply P = a + b + c. The unit of the perimeter is always the same as the unit of the sides, whether that is metres, centimetres, feet, or inches. Perimeter is used whenever you need to measure a boundary: the length of fencing to enclose a triangular plot, the amount of trim around a triangular frame, or the distance a runner covers on a triangular track.
How to calculate the perimeter when you do not have all three sides
You do not always start with three known side lengths. Two other combinations of sides and angles are enough to define a unique triangle. SAS (two sides + included angle): if you know two sides and the angle between them, the law of cosines gives the missing side. With sides a and b and included angle C: c = sqrt(a^2 + b^2 - 2ab x cos(C)). The perimeter is then a + b + c. ASA (one side + two adjacent angles): if you know one side and the angles at each of its endpoints, the third angle is 180 - A - B, and the law of sines gives the other two sides. With known side a and angles A and B: b = (a / sin(A)) x sin(B) and c = (a / sin(A)) x sin(C). The perimeter is then a + b + c. This calculator handles all three cases automatically.
The semi-perimeter and why it matters
The semi-perimeter s is simply P / 2 (half the perimeter). It is used in several important geometry formulas. Heron's formula expresses the area of a triangle using only the three side lengths: Area = sqrt(s(s - a)(s - b)(s - c)). The inradius (radius of the inscribed circle) is r = Area / s, and the exradii can be expressed similarly. The semi-perimeter also appears in the formula for the circumradius and in many proofs in classical geometry. Calculating the perimeter first, then halving it, is the natural path to all of these.
Special triangle perimeters
For an equilateral triangle all three sides are equal, so P = 3a. For an isosceles right triangle with legs of length a, the hypotenuse is a times sqrt(2), giving P = a(2 + sqrt(2)) which is approximately 3.414a. For a 30-60-90 triangle with short leg a, the sides are a, a*sqrt(3), and 2a, so P = a(3 + sqrt(3)) which is approximately 4.732a. These shortcuts are useful for quick estimates without a calculator.
Triangle types by sides and angles
| Type | Side condition | Angle condition | Perimeter formula |
|---|---|---|---|
| Equilateral | a = b = c | A = B = C = 60 deg | P = 3a |
| Isosceles | a = b != c | A = B != C | P = 2a + c |
| Scalene | a != b != c | A != B != C | P = a + b + c |
| Right | c^2 = a^2 + b^2 (hyp c) | One angle = 90 deg | P = a + b + sqrt(a^2+b^2) |
| Isosceles right | a = b, c = a*sqrt(2) | A = B = 45, C = 90 deg | P = a(2 + sqrt(2)) |
Identifying a triangle by the relationship between its sides and angles.
Frequently asked questions
What is the perimeter of a triangle formula?
The general formula is P = a + b + c, where a, b, and c are the three side lengths. If you do not have all three sides, the law of cosines (SAS case) or law of sines (ASA case) lets you compute the missing sides first, and then you add all three.
How do I find the perimeter with only two sides and an angle?
Use the law of cosines. If you know sides a and b and the angle C between them, the third side is c = sqrt(a^2 + b^2 - 2ab x cos(C)). Once you have c, the perimeter is a + b + c. This calculator does the cosine step automatically when you select the SAS mode.
How do I find the perimeter with one side and two angles?
Use the law of sines. If you know side a and the angles A and B at each end of it, the third angle is C = 180 - A - B. Then b = (a / sin(A)) x sin(B) and c = (a / sin(A)) x sin(C). Add all three sides for the perimeter. Select ASA mode in this calculator and it handles the trigonometry for you.
What is the semi-perimeter of a triangle?
The semi-perimeter s is half the perimeter: s = (a + b + c) / 2. It is used in Heron's formula for the area (Area = sqrt(s(s-a)(s-b)(s-c))), in the inradius formula (r = Area / s), and in several other geometry results. This calculator always displays it alongside the perimeter.
What is the perimeter of an equilateral triangle?
An equilateral triangle has three equal sides, so its perimeter is simply 3 times one side length: P = 3a. If you enter equal values for all three sides in SSS mode, the calculator will confirm the equilateral classification.
Can any three lengths form a triangle?
No. The triangle inequality requires that the sum of any two sides must be greater than the third side. If a + b <= c (or any rotation of that inequality), the three lengths cannot form a closed triangle and the perimeter is undefined. This calculator returns no result if the triangle inequality is violated.