Triangle Angle Calculator

Find all three angles of a triangle from its three sides, using the law of cosines.

Largest angle
Adjust the inputs

Your result updates live as you type.

The law of cosines generalises Pythagoras to triangles that are not right-angled. It states that the square on one side equals the sum of the squares on the other two, minus twice their product times the cosine of the angle between them. When that angle is 90 degrees the cosine is zero and the correction term vanishes, leaving Pythagoras exactly.

Rearranged for the angle it becomes a direct formula, and applying it three times gives every angle in the triangle. The sign of the cosine tells you the type immediately: a negative cosine means an obtuse angle, zero means right-angled and all positive means acute. The three angles must sum to 180 degrees, which the page reports as an arithmetic check.

The formula

cos A = (b2 + c2 − a2) ÷ 2bc
a, b, c
The three side lengths
A
The angle opposite side a
B, C
The angles opposite sides b and c

How it works, step by step

  1. Enter the three side lengths.
  2. The gauge shows the largest angle, which is always opposite the longest side.
  3. All three angles appear below along with the sum check.
  4. The classification tells you whether the triangle is acute, right-angled or obtuse.

Worked examples

Sides of 7, 10 and 5

The largest angle is opposite the 10 side: cos B = (49 + 25 − 100) ÷ 70 = -0.371429, giving 111.804 degrees. The negative cosine confirms an obtuse triangle.

A 3-4-5 triangle

cos of the angle opposite the 5 side is (9 + 16 − 25) ÷ 24 = 0, so that angle is exactly 90 degrees. The other two are 36.870 and 53.130 degrees.

How to read your score

0–60.0001Equilateral or nearThe largest angle is at most 60 degrees, so all three are equal.
60.0001–90Acute triangleEvery angle is under 90 degrees.
90–120Mildly obtuseOne angle exceeds a right angle.
120–—Strongly obtuseOne angle dominates the triangle.

Frequently asked questions

How does this relate to Pythagoras?

It is the general case. When the angle is 90 degrees its cosine is zero and the law of cosines collapses to a squared plus b squared equals c squared.

Which angle is the largest?

Always the one opposite the longest side. That relationship holds in every triangle and is a useful sanity check on your arithmetic.

How do I tell an obtuse triangle from the sides alone?

Compare the square of the longest side with the sum of the squares of the other two. If it is larger, the triangle is obtuse; equal means right-angled; smaller means acute.

Why do I get an error for some side combinations?

Because they violate the triangle inequality. If one side is at least as long as the other two combined, no triangle can be formed and no angles exist.

Angles from side lengths

All three angles for selected triangles
SidesAngle opposite aAngle opposite bAngle opposite cType
3, 4, 536.8753.1390.00Right-angled
5, 5, 560.0060.0060.00Acute
7, 10, 540.54111.8027.66Obtuse
6, 7, 846.5757.9175.52Acute
5, 12, 1322.6267.3890.00Right-angled
2, 3, 428.9646.57104.48Obtuse
10, 10, 672.5472.5434.92Acute

In every row the three angles sum to 180 degrees.

Related calculators