Law of cosines and sines · area · diagram

Law of cosines: cos α = (b²+c²−a²)/(2bc). Area (Heron's formula): √[s(s−a)(s−b)(s−c)], s = perimeter/2.
Solving a triangle with trigonometric theorems. Given three sides (SSS), the angles follow from the law of cosines:
and the area from Heron's formula , where .
Given two sides and the included angle (SAS), the third side comes from , and the area from . The calculator computes every angle, the area and the perimeter, and draws the triangle to scale.
Use the law of cosines when you know three sides (SSS) or two sides and the included angle (SAS). Use the law of sines when you have a side and two angles, or a side opposite a known angle.
From the triangle inequality: the sum of the two shorter sides must be greater than the longest side. The calculator checks this and warns you when the triangle does not exist.
Teaching? Embed this calculator on your site.
Free widget — paste it on your school site, blog or notes. It links to the full version.