Formula and Method for Triangle Length
This calculator solves a triangle given two sides and the angle between them — the classic "side-angle-side" (SAS) case. From side a, side b, and the included angle C, it finds the missing third side using the Law of Cosines: c² = a² + b² − 2ab·cos(C). This is a direct generalization of the Pythagorean theorem to triangles that are not right triangles — when C = 90°, cos(C) = 0 and the formula collapses exactly to c² = a² + b².
How the calculation works
First the calculator finds side c with the Law of Cosines above. Once all three side lengths are known, it finds angle A (opposite side a) by rearranging the Law of Cosines: cos(A) = (b² + c² − a²) / (2bc), then takes the inverse cosine. Angle B follows immediately from the triangle angle sum: B = 180° − C − A. Using the Law of Cosines for angle A (rather than the Law of Sines) avoids the "ambiguous case," because inverse cosine always returns a unique angle between 0° and 180°, while inverse sine cannot distinguish an acute angle from its obtuse supplement.
Common mistakes
- Using the wrong angle: the Law of Cosines requires the angle between sides a and b (the included angle) — an angle at a different vertex will give a wrong side length.
- Degrees vs. radians: this calculator expects the angle in degrees. Entering a radian value (like 1.05 instead of 60) will produce a nonsensical result.
- Invalid angle range: the included angle must be strictly between 0° and 180°. At those limits the three points become collinear and no triangle exists.
- Mixed units: enter both side lengths in the same unit (both feet, both meters, etc.) before calculating; the result inherits whatever unit you selected.
Real-world applications
- Surveying and construction use the Law of Cosines to find an unmeasurable distance (across a river, around an obstacle) from two measurable sides and the angle between them.
- Navigation and triangulation use it to compute distances between points when direct measurement is not possible.
- Engineering and truss design use it to verify member lengths and angles in non-right-triangle structures.
- Physics problems involving vector addition (resultant magnitude and direction) reduce to exactly this SAS triangle calculation.