By · Updated

Law of Sines Calculator

Ambiguous SSA Case, Sine Rule and Cosine Rule for Missing Sides and Angles

No ratings yet
Result

—

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Law of Sines and Cosines Calculator works

This law of sines calculator finds a missing side or angle of any triangle, and switches to the law of cosines when that is the rule you need. It handles the ambiguous SSA case, telling you when two triangles fit, and writes out every line of the working so you can follow it.

Both laws work for any triangle, not just right triangles. Side a is opposite angle A, b opposite B and c opposite C. Which law to use depends on what you know.

Law of sines calculator or law of cosines?

The law of sines formula is a ÷ sin A = b ÷ sin B = c ÷ sin C. Use it when you know a side and its opposite angle plus one more value. The law of cosines formula is c² = a² + b² − 2ab cos C. Use it when you know two sides and the angle between them, or all three sides.

First example. With A = 40°, B = 65° and a = 8, the law of sines gives b = 8 × sin 65° ÷ sin 40° ≈ 11.28.

Second example. Sides of 10 and 10 with 60° between them give c² = 100 + 100 − 200 × 0.5 = 100, so c = 10: an equilateral triangle.

How many triangles fit a = 7, b = 10 and A = 40°? sin B = 10 × sin 40° ÷ 7 ≈ 0.918, so B is 66.67° or 113.33°, and both leave room for C. Two triangles fit.

Third side c from the law of cosines with a = 10 and b = 10 as angle C opens

Angle C cos C sin C Side c
7.5° 0.9914 0.1305 1.308
15° 0.9659 0.2588 2.611
22.5° 0.9239 0.3827 3.902
30° 0.8660 0.5000 5.176
37.5° 0.7934 0.6088 6.429
45° 0.7071 0.7071 7.654
52.5° 0.6088 0.7934 8.846
60° 0.5000 0.8660 10.000
67.5° 0.3827 0.9239 11.111
75° 0.2588 0.9659 12.175
82.5° 0.1305 0.9914 13.187
90° 0.0000 1.0000 14.142
97.5° -0.1305 0.9914 15.037
105° -0.2588 0.9659 15.867
112.5° -0.3827 0.9239 16.629
120° -0.5000 0.8660 17.321
127.5° -0.6088 0.7934 17.937
135° -0.7071 0.7071 18.478
142.5° -0.7934 0.6088 18.939
150° -0.8660 0.5000 19.319
157.5° -0.9239 0.3827 19.616
165° -0.9659 0.2588 19.829
172.5° -0.9914 0.1305 19.957
180° -1.0000 0.0000 20.000

Tips

FAQ

When do you use the law of sines instead of the law of cosines?

Use the law of sines when you know a side and the angle opposite it, plus one more side or angle. Use the law of cosines when no such pair exists: two sides and the angle between them, or three sides. The cosine rule never has an ambiguous case, which makes it the safer choice when it fits.

What is the ambiguous case of the law of sines?

It happens when you know two sides and an angle that is not between them. The sine of an angle and of 180° minus that angle are equal, so the inverse sine can hide a second answer. If both angles leave room for the third, two different triangles fit. The calculator checks this for you.

Can the law of cosines find an angle?

Yes. Rearrange it to cos C = (a² + b² − c²) ÷ 2ab and take the inverse cosine. With sides of 5, 6 and 7, cos C = (25 + 36 − 49) ÷ 60 = 0.2, so C ≈ 78.46°. A negative cosine means the angle is obtuse, which the law of sines alone cannot tell you.

Do these laws work on right triangles?

They do. In a right triangle the law of sines reduces to the SOH CAH TOA ratios, and the law of cosines with C = 90° becomes c² = a² + b², which is Pythagoras. For right triangles the right triangle calculator is quicker because it needs only two values.

See also: all Algebra and Geometry tools, Arithmetic, Number Theory, Statistics, Trigonometry and Calculus.

Related tools