Formula and method for the ABC Triangle Calculator
In geometry, a triangle's vertices are conventionally labeled A, B, and C, with lowercase side a opposite vertex A, side b opposite vertex B, and side c opposite vertex C. Given only the three side lengths — the SSS (side-side-side) case — this calculator solves the whole triangle: the three interior angles, the area, and the perimeter.
How the calculation works
First, the three lengths are checked against the triangle inequality: a valid triangle only exists if a + b > c, a + c > b, and b + c > a. If any of those fail, no triangle can be formed with those lengths.
The angles are found with the Law of Cosines, rearranged to solve for an angle from three known sides:
- cos(A) = (b² + c² − a²) / (2bc)
- cos(B) = (a² + c² − b²) / (2ac)
- C = 180° − A − B (since a triangle's interior angles always sum to 180°)
The area is found with Heron's formula, which needs only the three side lengths (no angle or height required). First compute the semi-perimeter s = (a + b + c) / 2, then:
- Area = √(s(s − a)(s − b)(s − c))
The perimeter is simply a + b + c. Finally, the triangle is classified two ways: by its sides (equilateral if all three are equal, isosceles if exactly two are equal, scalene if all three differ) and by its largest angle (acute if under 90°, right if exactly 90°, obtuse if over 90°).
Common mistakes
- Failing the triangle inequality: lengths like 2, 3, and 10 cannot form a triangle — the two shorter sides (2 + 3 = 5) never reach the longer one. The calculator flags this instead of returning a false answer.
- Mismatched units: all three sides must be in the same unit (all in feet, or all in centimeters) before entering them — mixing units silently produces a wrong triangle.
- Mixing up which side is which: side a must be opposite vertex A, and so on. Swapping two sides swaps the angles that come out, even though the shape itself is unaffected.
Real-world applications
- Carpentry and framing use the 3-4-5 rule (a special right triangle) to square corners without measuring angles directly
- Surveying and navigation use triangulation, which relies on solving triangles from measured distances
- Engineering and architecture check truss and bracket angles from known member lengths before fabrication
- Geometry and trigonometry coursework use the Law of Cosines and Heron's formula as core problem-solving tools