# Law of Cosines Calculator

URL: https://speedycalculator.com/calculators/math/law-of-cosines/
Last updated: 2026-10-25

> The law of cosines calculator finds the third side of any triangle from two sides and the angle between them, and then the remaining angles and the area.

## Inputs

- Side a
- Side b
- Angle C (between a and b) (°)

## Results

- Side c
- Angle A
- Angle B
- Area

## Formula

```
c² = a² + b² − 2ab cos(C)
```

## Explanation

The law of cosines generalises the Pythagorean theorem to triangles without a right angle.

### How to use the Law of Cosines Calculator

- **Side a**
- **Side b**
- **Angle C (between a and b)**

Results update as you type, and every field accepts the units shown in its menu.

### How it works

Plug two sides and the included angle into the formula to get the third side, then use it again for the other angles.

### Inputs explained

FieldWhat to enterSide aA numberSide bA numberAngle C (between a and b)In °

### What each result means

- **Side c** = sqrt([Side a]^2 + [Side b]^2 - 2×[Side a]×[Side b]×cos(rad([Angle C (between a and b)])))
- **Angle A** = deg(acos(([Side b]^2 + [Side c]^2 - [Side a]^2)÷(2×[Side b]×[Side c])))
- **Angle B** = 180 - [Angle A] - [Angle C (between a and b)]
- **Area** = [Side a]×[Side b]×sin(rad([Angle C (between a and b)]))÷2

### Example values

How the main result changes when **Side a** changes and everything else stays at the example values above:

Side aSide c3.58.20095.257.750577.68188.758.004710.58.67551410.7712

## Worked example

Inputs — Side a: 7; Side b: 10; Angle C (between a and b): 50 °.

Results — **Side c = 7.681779**; Angle A = 44.271 °; Angle B = 85.729 °; Area = 26.811556.

## FAQ

**When do I use the law of sines instead?**
When you know two angles and a side, or two sides and a non-included angle.

**What if C is 90°?**
The formula reduces to Pythagoras.

**What formula does the Law of Cosines Calculator use?**
c² = a² + b² − 2ab cos(C).

