Enter the lengths of sides A and B and their included angle C to determine the length of the third side (Side C) using the Law of Cosines. You can also enter all three side lengths (A, B, and C) to solve for angle C.

Law of Cosines (SAS) Calculator

Fill in Side A and Side B, then enter either Angle C or Side C (leave the other blank).


Related Calculators

Hinge Theorem Formula

This calculator finds the length of the third side of a triangle when you know two side lengths and the included angle between them. Strictly speaking, the hinge theorem is a comparison theorem, while the actual numeric side calculation is done with the closely related law of cosines. In practice, they describe the same geometric idea: as the included angle opens wider, the opposite side gets longer.

c = \sqrt{a^2 + b^2 - 2ab\cos(C)}
Variable Meaning Requirement
a First known side length Must be positive
b Second known side length Must be positive
C Included angle between side A and side B Must be the angle formed by the two known sides
c Unknown third side opposite angle C Returned in the same unit as the inputs

How to Use the Calculator

  1. Enter the length of side A.
  2. Enter the length of side B.
  3. Enter the included angle between those two sides.
  4. Select degrees or radians so the angle is interpreted correctly.
  5. Calculate the result to find side C.

Important: the angle must be the one directly between the two known sides. If you use a different angle, the result will not represent the intended triangle.

What the Hinge Theorem Means

Imagine two triangles built from the same two side lengths. If one included angle is larger, the side across from that angle must also be larger. This is why the theorem is called the hinge theorem: the two known sides act like rigid arms connected by a hinge at the angle.

a_1 = a_2,\; b_1 = b_2,\; C_1 > C_2 \Rightarrow c_1 > c_2

That comparison principle gives intuitive meaning to the calculator output. Keeping the two known sides fixed:

  • a smaller included angle produces a shorter third side,
  • a right angle produces a middle case,
  • and a larger included angle produces a longer third side.

Angle Limits and Valid Input

For a real triangle, the included angle must be greater than zero and less than a straight angle.

0^\circ < C < 180^\circ

If you are using radians, the same condition is:

0 < C < \pi

Also keep both side inputs in the same unit. If side A is entered in feet and side B is entered in inches, the result will be inconsistent unless you convert them first.

Example

Suppose side A is 5, side B is 7, and the included angle is 60 degrees.

c = \sqrt{5^2 + 7^2 - 2(5)(7)\cos(60^\circ)}
c = \sqrt{25 + 49 - 70(0.5)}
c = \sqrt{39} \approx 6.245

So the third side is approximately 6.245 units.

Useful Special Cases

When the included angle is 90 degrees, the formula becomes the Pythagorean relationship for a right triangle.

c = \sqrt{a^2 + b^2}

As the included angle gets very small, the third side approaches the difference of the two known sides. As the angle approaches 180 degrees, the third side approaches their sum.

C \to 0^\circ \Rightarrow c \to |a-b|
C \to 180^\circ \Rightarrow c \to a+b

Common Mistakes

  • Using an angle that is not between the two known sides.
  • Mixing degrees and radians.
  • Entering side lengths in different units without converting.
  • Using zero, negative lengths, or an angle of 0 or 180 degrees.

Where This Calculation Is Used

  • triangle geometry and trigonometry problems,
  • roof, frame, and brace layout,
  • surveying and navigation,
  • mechanical linkages and structural analysis,
  • any situation where two sides and the included angle are known but the closing side is not.

If you know two sides and the angle between them, this calculator is the direct way to determine the missing third side accurately and quickly.