Triangle Side Calculator (Law of Cosines)
Use this calculator to find the length of the third side of a triangle when you know the lengths of two sides and the measure of the included angle (the angle between those two sides).
Result:
Understanding the Triangle Side Calculator
Triangles are fundamental shapes in geometry, and often, you need to determine the length of one of their sides. This calculator specifically uses the Law of Cosines to find the length of an unknown side when you have two known sides and the angle included between them (SAS – Side-Angle-Side).
What is the Law of Cosines?
The Law of Cosines is a generalization of the Pythagorean theorem that can be used for any triangle, not just right-angled ones. It relates the lengths of the sides of a triangle to the cosine of one of its angles. The formula used in this calculator is:
c² = a² + b² - 2ab cos(C)
Where:
aandbare the lengths of two known sides of the triangle.Cis the angle included between sidesaandb(opposite to sidec).cis the length of the unknown side you want to calculate.
If the angle C is 90 degrees (a right angle), then cos(90°) = 0, and the formula simplifies to c² = a² + b², which is the Pythagorean theorem. This demonstrates how the Law of Cosines extends the Pythagorean theorem to all triangles.
How to Use This Calculator
- Enter Side 'a' Length: Input the length of the first known side of your triangle.
- Enter Side 'b' Length: Input the length of the second known side of your triangle.
- Enter Included Angle 'C' (degrees): Input the measure of the angle that is *between* Side 'a' and Side 'b'. Ensure this angle is in degrees.
- Click "Calculate Side 'c'": The calculator will then apply the Law of Cosines and display the length of the third side, 'c'.
Examples
Example 1: Finding the Third Side of an Obtuse Triangle
Imagine you have a triangle where:
- Side 'a' = 10 units
- Side 'b' = 12 units
- Included Angle 'C' = 120 degrees
Using the Law of Cosines:
c² = 10² + 12² - 2 * 10 * 12 * cos(120°)
c² = 100 + 144 - 240 * (-0.5)
c² = 244 + 120
c² = 364
c = √364 ≈ 19.0788
The calculator would output: 19.0788 units.
Example 2: Finding the Hypotenuse of a Right Triangle
Although this calculator is for general triangles, it can also solve right triangles. Consider a right triangle with legs:
- Side 'a' = 3 units
- Side 'b' = 4 units
- Included Angle 'C' = 90 degrees
Using the Law of Cosines:
c² = 3² + 4² - 2 * 3 * 4 * cos(90°)
c² = 9 + 16 - 24 * 0
c² = 25
c = √25 = 5
The calculator would output: 5.0000 units, which is the expected hypotenuse.
Other Methods for Finding Triangle Sides
While the Law of Cosines is powerful, other methods are used depending on the known information:
- Pythagorean Theorem: Used exclusively for right-angled triangles (
a² + b² = c²) when two sides are known. - Law of Sines: Used when you know two angles and one side (AAS or ASA), or two sides and a non-included angle (SSA – ambiguous case). The formula is
a/sin(A) = b/sin(B) = c/sin(C).
This calculator focuses on the Law of Cosines (SAS) to provide a precise solution for a common triangle problem.