Triangle Inequality Theorem: Validation Rules for Checking Work
Triangle inequality theorem: any two sides must add to more than the third. Plus the hypotenuse, Pythagorean, angle-sum and trig checks for your answers.
Calculate perimeter, area, and angles from three side lengths
Enter three sides to calculate triangle properties
The perimeter of a triangle is the total distance around it: the sum of its three side lengths. This calculator also checks that the sides can form a triangle and gives the area and the three angles. Cuemath covers perimeter formulas for all triangle types, and Third Space Learning has step-by-step perimeter examples.
The perimeter (P) of a triangle with sides a, b, and c is calculated using the simple formula:
P = a + b + c
Not every set of three lengths can form a triangle, though. The Triangle Inequality Theorem tells you which ones can.
For any triangle to exist, the sum of any two sides must be greater than the third side. This must be true for all three combinations:
Our calculator automatically validates these conditions. If your input violates the triangle inequality, you'll receive an error message explaining which condition failed.
The semiperimeter (s) is half the perimeter and is used to calculate the triangle's area:
s = P/2 = (a + b + c)/2
With the semiperimeter, Heron's Formula gives the area:
Area = √[s(s-a)(s-b)(s-c)]
It finds the area of any triangle from the three side lengths alone, with no angles or heights required. Our calculator uses Heron's formula automatically when you enter three sides.
When you know all three sides, you can determine all three angles using the Law of Cosines. For any angle, such as angle A opposite side a:
cos(A) = (b² + c² - a²) / (2bc)
The calculator applies this formula to all three angles. This helps in surveying and construction, where distances are easy to measure but angles are not.
The general method is the same regardless of triangle type: add up the three side lengths. What changes between problems is how you arrive at those three sides. You can be given them directly, or you may need to compute the missing one(s) using the Law of Cosines, the Law of Sines, the Pythagorean theorem, or the distance formula.
The simplest case. Just add the three lengths.
P = a + b + c
If you know two sides (a, b) and the angle C between them, the third side comes from the Law of Cosines:
c = √(a² + b² − 2ab × cos C)
Then add: P = a + b + c. This is exactly how surveyors compute property perimeters when one side can't be measured directly.
If you know two angles and the side between them, find the third angle (since A + B + C = 180°), then use the Law of Sines to compute the missing sides:
a / sin A = b / sin B = c / sin C
Each triangle type has a shortcut formula worth memorizing:
All three sides are equal, so multiply one side by three. Try our dedicated equilateral triangle calculator for area and height too.
P = 3a
Two equal sides (a) plus the base (b). For full sides/angles/area, see the isosceles triangle calculator.
P = 2a + b
Add the two legs and the hypotenuse. The hypotenuse comes from the Pythagorean theorem.
P = a + b + √(a² + b²)
No two sides are equal — just add the three different side lengths. This is the most general case and the formula every other type reduces to.
A triangle has sides 7, 10, and 12 cm. Find the perimeter.
Verify with the calculator above by entering 7, 10, and 12.
You're fencing a triangular garden bed. Two sides measure 8 ft and 6 ft, meeting at a 60° angle. How much fencing do you need?
Order about 22 ft of fencing to be safe.
Find the perimeter of the triangle with vertices A(1, 2), B(5, 5), and C(6, 1).
Common uses:
To use our Triangle Perimeter Calculator effectively:
If the side lengths cannot form a triangle, the calculator shows which inequality failed instead of a result.
The perimeter of a triangle is calculated by adding all three side lengths together: P = a + b + c. The formula works for every type of triangle: equilateral, isosceles, scalene, right, acute, or obtuse. Just make sure all measurements are in the same units.
You need a third piece of information. If you know the angle between the two sides, the Law of Cosines gives the third side; if you know an angle opposite one of the known sides, start with the Law of Sines. Then add all three. For a right triangle with two known legs, the hypotenuse comes from c = √(a² + b²) and the perimeter is a + b + c. You can't find perimeter from two sides alone without one more measurement.
Since all three sides are equal, the perimeter is simply P = 3 × a, where a is the side length. For example, an equilateral triangle with side 5 has a perimeter of 15. The same formula works in any unit — inches, meters, feet — as long as you stay consistent.
P = a + b + √(a² + b²), where a and b are the two legs. The square root term is the hypotenuse, which the Pythagorean theorem gives you. If you already know all three sides, just add them: P = a + b + c.
Use the distance formula on each pair of vertices. For points A(x₁,y₁), B(x₂,y₂), C(x₃,y₃): side AB = √[(x₂−x₁)² + (y₂−y₁)²]. Compute all three side lengths the same way, then add them together for the perimeter.
Subtract the known sides from the perimeter. If P = 24 and two sides are 7 and 9, the third side is 24 − 7 − 9 = 8. Always verify the result satisfies the triangle inequality (the sum of any two sides must exceed the third).
The triangle inequality theorem states that the sum of the lengths of any two sides of a triangle must be greater than the length of the third side. This must be true for all three combinations of sides. If this condition isn't met, the three lengths cannot form a valid triangle. For example, sides of 2, 3, and 10 cannot form a triangle because 2 + 3 is not greater than 10.
The semiperimeter is half of the perimeter (s = P/2). It is the main input to Heron's formula, which calculates a triangle's area from the three side lengths. It also appears in the formula for the radius of the inscribed circle (incircle): r = Area / s.
No, you cannot determine the area from perimeter alone. Many different triangles can have the same perimeter but different areas. However, if you know all three individual side lengths (not just their sum), you can calculate the area using Heron's formula: Area = √[s(s-a)(s-b)(s-c)], where s is the semiperimeter.
When you know all three sides, you can find each angle using the Law of Cosines. For angle A opposite side a, use: cos(A) = (b² + c² - a²) / (2bc), then take the inverse cosine (arccos) to find angle A. Repeat this process for the other two angles.
You can use any unit of length - inches, feet, meters, centimeters, etc. The key is to use the same unit for all three sides. The calculator will return the perimeter and area in the same unit system you use for input.
Deepen your understanding of triangles and trigonometry with our guides and tutorials:
Triangle inequality theorem: any two sides must add to more than the third. Plus the hypotenuse, Pythagorean, angle-sum and trig checks for your answers.
Acute, right and obtuse triangles: tell them apart with the a² + b² vs c² test, and see which formulas (SOH-CAH-TOA, Law of Cosines, Heron's) fit each.
Equilateral triangle: three equal sides, three 60° angles. Height (√3/2)s, area (√3/4)s², the 30-60-90 link, a table of common sizes and worked problems.
Triangles are the strongest shape in engineering: three fixed sides lock the angles. The geometry, a worked force example, and how trusses use it.
The Law of Sines, a/sin A = b/sin B = c/sin C, solves non-right triangles in AAS, ASA and SSA cases. When to use it, worked examples, the ambiguous case.
How to check your triangle answers: the 180° angle sum, Pythagorean and triangle inequality tests, Law of Sines ratios, area checks and a worked example.
Formulas and results last reviewed . How we check accuracy · Corrections log · Report an error