Calculators/Mathematics/Triangle Trigonometry

Triangle Trigonometry

Law of cosines and sines · area · diagram

Triangle Trigonometry — illustration
α (A)
36.87°
β (B)
53.13°
γ (C)
90°
Area
6
Perimeter
12
Angle sum = 180° ✓
c = 5b = 4a = 3ABC

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:

cos⁡α=b2+c2−a22bc\cos\alpha=\frac{b^2+c^2-a^2}{2bc}

and the area from Heron's formula P=s(s−a)(s−b)(s−c)P=\sqrt{s(s-a)(s-b)(s-c)}, where s=a+b+c2s=\tfrac{a+b+c}{2}.

Given two sides and the included angle (SAS), the third side comes from c2=a2+b2−2abcos⁡γc^2=a^2+b^2-2ab\cos\gamma, and the area from P=12absin⁡γP=\tfrac12 ab\sin\gamma. The calculator computes every angle, the area and the perimeter, and draws the triangle to scale.

Examples

SSS: a=3, b=4, c=5
→ angles 36.87° / 53.13° / 90° (right triangle), area 6
SAS: a=5, b=7, γ=60°
→ c = √39 ≈ 6.24, area = ½·5·7·sin60° ≈ 15.16

Frequently asked questions

When do I use the law of sines and when the law of cosines?+

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.

How do I know the triangle exists?+

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.

Found this calculator useful? Share it.

It's free — send it to a friend who's revising.

Teaching? Embed this calculator on your site.

Free widget — paste it on your school site, blog or notes. It links to the full version.

Teaching a class or tutoring? Guide students in NexTutor →