Law of Sines Calculator

Enter two angles and any side, or two sides and an angle that is not between them, and get the missing pieces with every step shown. When your numbers describe two different triangles, this calculator finds both instead of quietly picking one.

Put this calculator on your website for free

Copy one snippet and give your visitors a working Law of Sines Calculator.

How the law of sines works

Every triangle carries a hidden constant. Take any side, divide it by the sine of the angle sitting opposite that side, and note the answer. Do it again with a different side and its opposite angle. You get the same number. Do it a third time and you get it again.

That shared value is the whole engine. It means a single matched pair, one side together with the angle facing it, gives you a ratio you can carry to any other corner of the triangle. Know one pair and one more piece, and the rest of the shape unfolds. It is a far lighter tool than the law of cosines, with no squares and no rearranging, which is why it is worth reaching for first whenever it applies.

The formula

a ÷ sin A = b ÷ sin B = c ÷ sin C

Sides a, b and c each sit opposite angles A, B and C. Opposite is the important word: the angle must be the one looking across the triangle at that side, not touching it. To find a missing side you cross-multiply one pair against another:

b = a × sin B ÷ sin A

And to find a missing angle, flip it the other way: sin B = b sin A ÷ a. That second form is the one that hides a trapdoor, and the rest of this page is largely about it.

Worked example

Two angles and a side. A surveyor stands at one end of a 12 metre baseline. From that end a landmark sits 40 degrees off the line; from the far end it sits 75 degrees off. How far is the landmark from each end?

First, the free angle: C = 180° − 40° − 75° = 65°.

b = 12 × sin 75° ÷ sin 40° = 12 × 0.9659 ÷ 0.6428 = 18.03 metres
c = 12 × sin 65° ÷ sin 40° = 12 × 0.9063 ÷ 0.6428 = 16.92 metres

The triangle closes with an area of 98.06 square metres. Notice that the two angles alone were never enough: they fix the triangle's shape but not its size, and infinitely many triangles share those angles. The 12 metre baseline is what pinned down which one.

The ambiguous case, where one measurement makes two triangles

Here is the trapdoor. Suppose you know two sides and an angle, but the angle is not the one between them. You measure side a as 7, side b as 9, and angle A as 40 degrees. Reasonable numbers. One triangle, surely?

Two. And they are not subtly different:

 First triangleSecond triangle
Angle B55.73°124.27°
Angle C84.27°15.73°
Side c10.842.95
Area31.348.54

One of these triangles is nearly four times longer along side c than the other, and covers almost four times the area. Both are completely valid. Both use your three measurements exactly. If you measured a real field and wrote down those numbers, you genuinely cannot tell from the numbers alone which field you walked.

The cause is simple once you see it. You solve for angle B by taking an inverse sine, and sine cannot distinguish an angle from its supplement: sin 55.73° and sin 124.27° are the same value to the last decimal place. Your calculator picks the acute one because it has to pick something, and the obtuse one sits there quietly being equally true.

How to tell how many triangles you have

You do not have to guess. Drop a perpendicular from the top corner down to the base and call its height h = b sin A. That height is the shortest possible reach from that corner to the base. Now compare your side a against it:

In the example above, h = 9 sin 40° = 5.79, and 5.79 < 7 < 9, which lands squarely in the two-triangle band. The calculator runs this test on every SSA problem and tells you which case you are in before it hands over any answers.

Worth saying plainly: none of this is a flaw in anyone's working, and it is not a trick question either. It is a real geometric fact about what three measurements can and cannot pin down, and it is the reason careful surveyors record a fourth measurement they do not strictly need. If you know in advance that your triangle is obtuse, or you can measure any third side, the ambiguity vanishes immediately. The law of cosines has no ambiguous case at all, because inverse cosine returns obtuse angles directly. And if you would rather hand over whatever you happen to know and let something else choose the method, the triangle calculator does exactly that.

Frequently asked questions

What is the law of sines?

In any triangle, each side divided by the sine of the angle opposite it gives the same number: a / sin A = b / sin B = c / sin C. That shared value is the ratio you carry across the triangle, and it is what lets one matched side-and-angle pair unlock everything else.

What is the ambiguous case?

It happens when you know two sides and an angle that is not between them (SSA). The known side can sometimes swing to touch the base in two different places, producing two genuinely valid triangles from one set of measurements. Both are correct, and the numbers alone cannot tell you which one you measured.

How do I know how many triangles my SSA numbers make?

Compare your known opposite side against the height h = b sin A. If it is shorter than h, it cannot reach the base and there is no triangle. If it equals h, it just touches and there is exactly one right triangle. If it is longer than h but shorter than the other side, there are two. If it is at least as long as the other side, there is one.

When should I use the law of cosines instead?

Use the law of cosines when you know all three sides, or two sides and the angle between them. Those are the two cases the law of sines cannot start, because it needs a side paired with the angle opposite it before it can do anything.

Why does the ambiguous case exist at all?

Because inverse sine cannot tell an acute angle from its obtuse partner. Sine of 55 degrees and sine of 125 degrees are the same number, so when you solve for an angle the arithmetic hands back one value while the other remains just as valid. The law of cosines uses inverse cosine, which does not have this blind spot.

Are ASA and AAS actually different problems?

Not really. Once you know two angles, the third comes free by subtracting from 180 degrees, and after that you hold all three angles either way. Whether the side you know sits between your two angles or off to one side changes nothing about the method.

Can I use the law of sines to find the area?

Yes. Once you have two sides and the angle between them, area = ½ ab sin C. This calculator reports the area for every triangle it finds, including both of them in the ambiguous case, where the two areas can differ enormously.

Why do my two answers add up to 180 degrees?

That is the signature of the ambiguous case. The two candidate angles are always supplementary, meaning they sum to exactly 180, because they are the two angles sharing a sine value. If your calculator only ever shows you one, subtract it from 180 to see the one it left out.

Related calculators