Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Third Side (c)
6.245
length opposite angle C
Perimeter (a + b + c) 18.245
Triangle area 15.1554

What this calculator does

This tool solves the classic SAS (side-angle-side) triangle problem: given two sides of a triangle and the angle between them, it finds the length of the third side using the Law of Cosines. It also returns the triangle's perimeter and area so you get a complete picture of the shape from a single calculation.

Triangle with two sides a and b and included angle, opposite unknown side c
The SAS setup: two known sides a and b enclose the angle C, opposite the unknown third side c.

How to use it

Enter the two known sides, a and b, in any consistent unit (cm, m, in — just be consistent). Then enter the included angle C in degrees — this is the angle formed where sides a and b meet, opposite the side you want to find. Click calculate and the third side c, the perimeter, and the area appear instantly.

The formula explained

The Law of Cosines generalises the Pythagorean theorem to any triangle:

$$c = \sqrt{a^{2} + b^{2} - 2ab\cdot\cos C}$$

When \(C = 90°\), \(\cos C = 0\), so the formula collapses to \(c = \sqrt{a^{2} + b^{2}}\) — exactly Pythagoras. As C grows past 90°, \(\cos C\) becomes negative, making c longer; as C shrinks toward 0°, c shrinks toward \(|a - b|\). The area is found with the companion formula \(\text{Area} = \tfrac{1}{2}\cdot a\cdot b\cdot\sin C\).

Worked example

Suppose \(a = 5\), \(b = 7\), and the included angle \(C = 60°\). Then \(\cos 60° = 0.5\), so $$c^{2} = 25 + 49 - 2\cdot 5\cdot 7\cdot 0.5 = 74 - 35 = 39,$$ giving \(c = \sqrt{39} \approx 6.245\). The perimeter is \(5 + 7 + 6.245 \approx 18.245\) and the area is \(\tfrac{1}{2}\cdot 5\cdot 7\cdot\sin 60° \approx 15.155\).

Triangle illustrating a worked law of cosines example with labeled sides and angle
Worked example: plug the two sides and included angle into the formula to solve for c.

FAQ

What is the "included" angle? It is the angle between the two sides you entered. The unknown side is always opposite this angle.

Can the angle be more than 90°? Yes — the Law of Cosines works for any angle from 0° to 180°, including obtuse triangles.

Do the units matter? Use the same length unit for both sides; the result comes back in that unit, and area in that unit squared.

Last updated: