Home » Law of Cosines Calculator

Law of Cosines Calculator

Law of Cosines Calculator

Calculate Law of Cosines

Enter triangle values to calculate unknown sides or angles instantly.

Solve Triangle Sides & Angles

Enter two sides and the included angle, or all three sides, to solve for the missing value.

How It Works

The Law of Cosines is an extension of the Pythagorean Theorem. Instead of working only with right triangles, it applies to any triangle.

  • If you know two sides and one included angle, the calculator finds the third side.
  • If you know three sides, the calculator finds the unknown angle.

User Guide

  1. Choose whether you want to solve for a missing side or an unknown angle.
  2. Enter your known triangle values into the calculator. You only need to enter three values.
  3. Press "Calculate" to get results instantly.

Formulas

The Law of Cosines uses two main formulas, depending on what you're trying to find.

To find a side:

$$c^2 = a^2 + b^2 - 2ab \cdot \cos(C)$$

To find an angle:

$$\cos(C) = \frac{a^2 + b^2 - c^2}{2ab}$$

Law of Cosines Formula Table

Input Type Formula Used Output
Two sides + included angle $$c^2 = a^2 + b^2 - 2ab \cos(C)$$ Finds side c
Three sides $$\cos(C) = \frac{a^2 + b^2 - c^2}{2ab}$$ Finds angle C

Triangle Representation

A visual representation, such as a triangle chart, can show how changing the angle $C$ affects the length of side $c$. For example:

  • When $C=60^\circ$, $c$ is shorter.
  • When $C=120^\circ$, $c$ is much longer.
Scroll to Top