Law of Cosines Calculator (Non-Right Triangles)

The Law of Cosines is used to solve any general triangle (non-right triangle) when you know either all three sides (**SSS**) or two sides and the angle between them (**SAS**). Select your known case below.

Select Your Known Case

The Three Forms of the Law of Cosines

The Law of Cosines is a powerful tool because it works for any triangle. It relates the three sides of a triangle to the cosine of one of its angles.

Formulas to Find a Missing Side (SAS Case)

If you know two sides and the included angle (SAS), use one of these formulas to find the third side:

$$a^2 = b^2 + c^2 - 2bc \cos(\alpha)$$ $$b^2 = a^2 + c^2 - 2ac \cos(\beta)$$ $$c^2 = a^2 + b^2 - 2ab \cos(\gamma)$$

Formulas to Find a Missing Angle (SSS Case)

If you know all three sides (SSS), you can rearrange the primary formula to find any angle:

$$\alpha = \cos^{-1} \left( \frac{b^2 + c^2 - a^2}{2bc} \right)$$ $$\beta = \cos^{-1} \left( \frac{a^2 + c^2 - b^2}{2ac} \right)$$ $$\gamma = \cos^{-1} \left( \frac{a^2 + b^2 - c^2}{2ab} \right)$$

Law of Cosines vs. Law of Sines

The Law of Cosines is typically the starting point for solving a triangle in the **SAS** and **SSS** cases. Once you have used the Law of Cosines to find one missing value, it is often easier and less ambiguous to use the **Law of Sines** to find the remaining angles.

The Law of Sines (used in ASA, AAS, and SSA cases) is:

$$\frac{a}{\sin(\alpha)} = \frac{b}{\sin(\beta)} = \frac{c}{\sin(\gamma)}$$

The Law of Cosines avoids the "ambiguous case" (SSA), making it the safer choice when applicable.

Frequently Asked Questions (FAQ)

What is the Law of Cosines used for?

What is the Law of Cosines formula for finding side 'a'?

When should I use the Law of Cosines instead of the Law of Sines?

Does the Law of Cosines work for right triangles?