Triangle Calculator

Solving a triangle means finding all three sides and angles from the ones you know. This triangle calculator handles three sides (SSS), two sides and the included angle (SAS), two angles and a side (ASA), and the ambiguous case (SSA), which can give two triangles. It draws each triangle to scale.

Try:

How to use the triangle calculator

  1. Choose what you know, such as three sides.
  2. Enter the sides and angles (angles in degrees).
  3. Press Calculate to see every side, angle, the area and a scale drawing.

Formula

asin⁡A=bsin⁡B=csin⁡C\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}
c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C

Worked example: SSS 5, 6, 7

  • What do you know?: Three sides (SSS)
  • Side a: 5
  • Side b: 6
  • Side c: 7

✓ Answer checked

a=5,  b=6,  c=7,  A≈44.4153∘,  B≈57.1217∘,  C≈78.463∘a = 5,\; b = 6,\; c = 7,\; A \approx 44.4153^\circ,\; B \approx 57.1217^\circ,\; C \approx 78.463^\circ
Area
14.69693814.696938
Perimeter
1818
Type
scalene, acute
Circumradius R / inradius r
3.57217  /  1.632993.57217 \;/\; 1.63299
A 44.42°B 57.12°C 78.46°c = 7a = 5b = 6
The triangle drawn to scale.
Step-by-step working (4 steps)
  1. Law of cosines for A Law of cosines

    Rearrange the law of cosines to find an angle from three sides.

    cos⁡A=b2+c2−a22bc=6084⇒A≈44.4153∘\cos A = \frac{b^2 + c^2 - a^2}{2bc} = \frac{60}{84} \Rightarrow A \approx 44.4153^\circ
  2. Law of cosines for B Law of cosines

    Do the same for B.

    cos⁡B=a2+c2−b22ac⇒B≈57.1217∘\cos B = \frac{a^2 + c^2 - b^2}{2ac} \Rightarrow B \approx 57.1217^\circ
  3. Angle sum Angle sum = 180°

    The angles of a triangle add to 180°.

    C=180∘−A−B≈78.463∘C = 180^\circ - A - B \approx 78.463^\circ
  4. Area Area = ½ab sin C

    Half the product of two sides and the sine of the angle between them.

    Area=12absin⁡C≈14.696938\text{Area} = \tfrac{1}{2}ab\sin C \approx 14.696938
Formulas used
asin⁡A=bsin⁡B=csin⁡C\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}
c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C
How this was checked
  • ✓ The three angles add to 180°.
  • ✓ The law of sines ratios are equal for all three sides.
  • ✓ Heron's formula gives the same area as ½ab sin C.

Angles in degrees. Decimals rounded to 6–8 significant figures.

Frequently asked questions

When do I use the law of cosines?

When you know three sides, or two sides and the angle between them. Otherwise use the law of sines.

Why can SSA give two triangles?

Because sin B = sin(180° − B), two different angles can fit. The calculator checks both and shows each valid triangle.

What is the triangle inequality?

Each side must be shorter than the other two added together. If not, the sides cannot form a triangle.

Related calculators

Related guides