Home·Geometry

Law of Cosines Calculator

You do not need a right angle — three sides are enough. The cosine of an angle is the sum of the other two sides squared, minus the opposite side squared, over twice their product.

Your numbers

Angle (°)

48.19°

Interior angle

58.412°

Exterior angle

73.398°

Formula

Angle (°) = acos((Side b² + Side c² − Side a²) ÷ (2 × Side b × Side c))

The angle facing the longest side is the largest; if it exceeds 90° the triangle is obtuse.

What to enter

InputDefaultAccepted range
Side a (cm)The length of the first side.70 and up
Side b (cm)The length of the second side.80 and up
Side c (cm)The third side; it must be shorter than the other two combined.90 and up

Step by step

FormulaAngle (°) = acos((Side b² + Side c² − Side a²) ÷ (2 × Side b × Side c))
With the default numbersAngle (°) = acos((8² + 9² − 7²) ÷ (2 × 8 × 9))
AnswerAngle (°) = 48.19 °

Quick reference table

Results when only Side a (cm) changes and everything else stays put.

Side a (cm)Angle (°) (°)Interior angle (°)Exterior angle (°)
3.522.79862.33694.866
5.2535.35961.86482.776
748.1958.41273.398
10.576.03647.67956.285
14110.74232.30336.955

What each result means

ResultAt default values
Angle (°) (°)An angle in degrees; a full turn is 360°.48.19
Interior angle (°)The interior angle at one corner of a regular polygon.58.412
Exterior angle (°)How far you turn at a corner; they always add to 360°.73.398

Common mistakes

The angle facing the longest side is the largest; if it exceeds 90° the triangle is obtuse.

Glossary

Side a
The length of the first side.
Side b
The length of the second side.
Side c
The third side; it must be shorter than the other two combined.
Angle (°)
An angle in degrees; a full turn is 360°.
Interior angle
The interior angle at one corner of a regular polygon.
Exterior angle
How far you turn at a corner; they always add to 360°.

Frequently asked questions

Q. How is Law of Cosines Calculator calculated?

Angle (°) = acos((Side b² + Side c² − Side a²) ÷ (2 × Side b × Side c)) — You do not need a right angle — three sides are enough. The cosine of an angle is the sum of the other two sides squared, minus the opposite side squared, over twice their product.

Q. Can you walk through an example?

With Side a 7cm, Side b 8cm, Side c 9cm, the answer is Angle (°) 48.19°.

Q. What do I need to enter?

Enter Side a, Side b, Side c. The result recalculates as you type, and an empty box counts as zero.

Q. How much does the answer move if I change a number?

Changing only Side a (cm) moves the answer to Side a (cm) 3.5 → Angle (°) (°) 22.798 and Side a (cm) 14 → Angle (°) (°) 110.742. The table below lays out five steps.

Q. How are the numbers rounded?

Money is shown to the nearest whole unit, percentages to one decimal place and everything else to two. What you see is rounded; the calculation itself carries the unrounded value forward.

Q. Anything to watch out for?

The angle facing the longest side is the largest; if it exceeds 90° the triangle is obtuse.

Related calculators

Keep your length units consistent across inputs — mixing centimetres and metres throws results far off.