Triangle Solver
by Freya Holmér

Click sides & angles to mark them as known or unknown,
and it will display what is solvable or cursed
;;;-;
;;;-;
;;;-;
;;;-;
;;;-;
;;;-;
Code
Additional known sides or angles required
Formulas
Sum of angles
A+B+C=τ/2A+B+C=\tau / 2
Law of cosines
a2=c2+b22cbcosAb2=a2+c22accosBc2=b2+a22bacosC\begin{aligned} a^2 & ={c^2+b^2-2cb} \cos A\\ b^2 & ={a^2+c^2-2ac} \cos B\\ c^2 & ={b^2+a^2-2ba} \cos C \end{aligned}
Law of sines
asinA=bsinB=csinC{a \over \sin A} = {b \over \sin B} = {c \over \sin C}
Right triangle formulas
Pythagorean theorem
c2=a2+b2 c^2 = a^2+b^2
Trigonometric ratios
sinA=acsinB=bccosA=bccosB=actanA=abtanB=ba\begin{aligned} \sin A &= {a \over c} & \sin B &= {b \over c} \\ \cos A &= {b \over c} & \cos B &= {a \over c} \\ \tan A &= {a \over b} & \tan B &= {b \over a} \end{aligned}