Sine & Cosine Law Solver
Given AAS, ASA, SAS, SSS or SSA, automatically solve the remaining sides and angles, flagging the SSA ambiguous case (two solutions).
Input Data
Results
At a glance:The sine law a/sinA = b/sinB = c/sinC solves for sides when two angles and a side are known (ASA/AAS). The cosine law a² = b² + c² − 2bc·cosA solves SSS or SAS. SSA (two sides and a non-included angle) may yield 0, 1 or 2 solutions — the ambiguous case.
Formula
Sine law: a / sin A = b / sin B = c / sin C.
Cosine law: a² = b² + c² − 2bc·cos A.
Angle from sides: cos A = (b² + c² − a²) / (2bc).
Angle sum: A + B + C = 180°.
$$\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}$$$$a^{2} = b^{2} + c^{2} - 2bc\cos A$$How to Use
- Pick the known combination (SSS / SAS / ASA / AAS / SSA).
- Fill in the corresponding sides and angles (grey fields are solved).
- The tool completes the triangle and flags double solutions for SSA in the note.
- Compare with the case studies to check your trigonometry working.
Method for each known condition
| Case | Known | Main formula | Note |
|---|---|---|---|
| SSS | a, b, c | Cosine law for angles | Unique |
| SAS | b, c, A | a²=b²+c²−2bc·cosA | Unique |
| ASA | A, c, B | Sine law for a, b | Unique |
| AAS | A, B, a | Sine law for b, c | Unique |
| SSA | a, b, A | Sine law for B | 0/1/2 solutions |
SSA is ambiguous: sin B > 1 means no solution; sin B = 1 means one (right) solution; otherwise possibly two.
Case Studies
SSS: a=5, b=6, c=7
cos A = (6²+7²−5²)/(2·6·7) = 60/84 ≈ 0.7143 → A ≈ 44.4153°.
Similarly B ≈ 57.1217°, C ≈ 78.4630°.
Check A+B+C ≈ 180°.
SAS: b=4, c=5, A=60°
a² = 4²+5²−2·4·5·cos60° = 21 → a ≈ 4.5826.
B = asin(4·sin60°/a) ≈ 46.1021°, C ≈ 73.8979°.
ASA: A=40°, c=10, B=60°
C = 180−40−60 = 80°.
a = c·sinA/sinC = 10·sin40°/sin80° ≈ 6.5270.
b = c·sinB/sinC ≈ 8.8235.
AAS: A=30°, B=45°, a=8
C = 180−30−45 = 105°.
b = a·sinB/sinA = 8·sin45°/sin30° ≈ 11.3137.
c = a·sinC/sinA ≈ 15.4548.
SSA single: a=10, b=6, A=30°
sin B = b·sinA/a = 0.3 → B₁ ≈ 17.4576°.
B₂ = 180−B₁ ≈ 162.5424°, but A+B₂ > 180, so only one solution.
C ≈ 132.5424°, c ≈ 15.0369.
SSA double: a=7, b=10, A=30°
sin B ≈ 0.7143 → B₁ ≈ 45.5847°, B₂ ≈ 134.4153°.
Both satisfy A+B < 180, so two triangles exist.
Sol 1: C₁≈104.4153°, c₁≈13.3994; Sol 2: C₂≈15.5847°, c₂≈3.7353.
FAQ
When to use sine law vs cosine law?
Use the sine law for two angles and a side (ASA/AAS); use the cosine law for three sides (SSS) or two sides with the included angle (SAS). SSA uses the sine law but watch the ambiguous case.
What is the SSA ambiguous case?
When two sides and a non-included angle are known (SSA), there may be 0, 1 or 2 triangles. The tool states the number of solutions in the note.
Why can SSA have two solutions?
After the sine law gives sin B, both B and 180°−B (supplementary) can satisfy it, each giving a triangle as long as A+B<180°.
Angles don't sum to 180°?
Every valid triangle satisfies A+B+C=180°. If your inputs contradict the sides, results may be meaningless — check your entries.
SAS vs SSA?
SAS is two sides and their included angle (cosine law, unique); SSA is two sides and a non-included angle (ambiguous). The key is whether the angle lies between the two known sides.
Negative or NaN result?
Usually means no triangle can be formed (e.g. SSS with two sides summing to less than the third) or SSA with sin B > 1 (no solution). Check sides and angles.
Can I use radians?
Angles are entered in degrees. If your data is in radians, convert first (radians × 180/π).
When is SSA impossible?
No triangle exists when a < b·sinA (the opposite side is shorter than the altitude), or when the found B makes A+B ≥ 180°.
Related Tools
References
Content review: Calculatorism Science Team. Sine law, cosine law and the SSA ambiguous-case detection have been verified. Results are for reference only.