Triangle Calculator

Solve any triangle from what you know: three sides, two sides and an angle, two angles and a side, a right triangle, or base and height.

What do you know about the triangle?

Opposite angle A

Opposite angle B

Opposite angle C

Try

Solved triangle

a = 3, b = 4, c = 5

A = 36.87°, B = 53.13°, C = 90°

Scalene, right triangle · Area 6 (Heron's formula) · Perimeter 12

Triangle diagramTriangle drawn to scale. Sides: a = 3, b = 4, c = 5. Angles: A = 36.87°, B = 53.13°, C = 90°. Right angle at C. The dashed line is the height to side c, h = 2.4.hca = 3b = 4c = 5A36.87°B53.13°C
Height to sideh = 2.4
Triangle properties
Side a3
Side b4
Side c5
Angle A36.87°
Angle B53.13°
Angle C90°
Area6
Perimeter12
Semi-perimeter6
TypeScalene, right
Advanced properties
Height to a2 × Area / a4
Height to b2 × Area / b3
Height to c2 × Area / c2.4
Inradiusr = Area / s1
CircumradiusR = abc / (4 × Area)2.5

Trigonometric ratios

Angle A = 36.87°

  • sin(A) = a / c = 3 / 5 = 0.6 (opposite / hypotenuse)
  • cos(A) = b / c = 4 / 5 = 0.8 (adjacent / hypotenuse)
  • tan(A) = a / b = 3 / 4 = 0.75 (opposite / adjacent)

Angle B = 53.13°

  • sin(B) = b / c = 4 / 5 = 0.8 (opposite / hypotenuse)
  • cos(B) = a / c = 3 / 5 = 0.6 (adjacent / hypotenuse)
  • tan(B) = b / a = 4 / 3 = 1.33 (opposite / adjacent)

How this triangle was solved

Step 1 — Check the triangle inequality

a + b = 7 > c = 5

a + c = 8 > b = 4

b + c = 9 > a = 3

Each side is shorter than the sum of the other two, so the triangle exists.

Step 2 — Calculate the semi-perimeter

s = (a + b + c) / 2 = (3 + 4 + 5) / 2 = 6

Step 3 — Find the area with Heron's formula

Area = √[s(s − a)(s − b)(s − c)]

= √[6 × 3 × 2 × 1]

= √36 = 6

Step 4 — Find the angles with the Law of Cosines

cos A = (b² + c² − a²) / (2bc) = (16 + 25 − 9) / (2 × 4 × 5) = 0.8 → A = 36.87°

cos B = (a² + c² − b²) / (2ac) = 0.6 → B = 53.13°

cos C = (a² + b² − c²) / (2ab) = 0 → C = 90°

Check: A + B + C = 180°

Step 5 — Perimeter and heights

P = a + b + c = 3 + 4 + 5 = 12

Height to a = 2 × Area / a = 2 × 6 / 3 = 4

Height to b = 2 × Area / b = 3; height to c = 2 × Area / c = 2.4

Step 6 — Classify the triangle

All three sides are different → scalene.

Angle C is 90° → right.

Every value is calculated at full precision and rounded only for display, to 2 decimal places. For other trigonometry, use the Scientific Calculator; to convert angles to radians, use the Angle Converter; and to change the area to other units, use the Area Converter.

This triangle calculator solves a triangle from whatever you already know. Choose three sides (SSS), two sides and the angle between them (SAS), two angles and a side (ASA or AAS), two sides and a non-included angle (SSA), a right triangle, or a base and height, and it calculates every missing side and angle, the area, perimeter, heights, inradius, and circumradius, and classifies the triangle.

The result includes a diagram drawn to scale and each step of the solution with your numbers. For SSA it shows whether there are zero, one, or two possible triangles, rather than quietly picking one.

Worked Calculation Examples

ScenarioResultCalculation Step
SSS: sides 3, 4, 5Area 6, right angle at Cs = 6, so Heron's formula gives √(6 × 3 × 2 × 1) = 6. The Law of Cosines gives A ≈ 36.87°, B ≈ 53.13°, C = 90°. Perimeter 12.
SSS: sides 7, 8, 9Area ≈ 26.83s = 12, so the area is √(12 × 5 × 4 × 3) = √720 ≈ 26.83. The angles are about 48.19°, 58.41°, and 73.40°, so the triangle is scalene and acute.
SAS: a = 5, b = 7, C = 60°c ≈ 6.24, area ≈ 15.16c² = 25 + 49 − 2 × 5 × 7 × cos 60° = 39, so c = √39 ≈ 6.24. Then A ≈ 43.90°, B ≈ 76.10°, and the area is ½ × 5 × 7 × sin 60° ≈ 15.16.
ASA: A = 40°, B = 60°, c = 10a ≈ 6.53, b ≈ 8.79C = 180° − 40° − 60° = 80°. By the Law of Sines, a = 10 × sin 40° / sin 80° ≈ 6.53 and b = 10 × sin 60° / sin 80° ≈ 8.79.
SSA: a = 6, b = 8, A = 40° (two triangles)B ≈ 58.99° or 121.01°sin B = 8 × sin 40° / 6 ≈ 0.857, so B ≈ 58.99° or 121.01°. Both leave room for angle C, giving c ≈ 9.22 (area ≈ 23.71) or c ≈ 3.04 (area ≈ 7.81).
Base 10, height 6Area 30Area = ½ × 10 × 6 = 30. The sides and angles are not determined: any apex at height 6 above the base gives the same area.

How Do I Solve a Triangle?

A triangle has six parts: three sides and three angles. Knowing three of them, including at least one side, is usually enough to find the rest, but which formula you use depends on which three you know. Three angles alone are never enough, because similar triangles of every size share the same angles.

In this calculator, side a is always opposite angle A, side b opposite angle B, and side c opposite angle C, so the labels on the diagram match the formulas.

Which Triangle Formula Should I Use?

3 sides (SSS): Heron's formula for the area, then the Law of Cosines for the angles.

2 sides and the included angle (SAS): the Law of Cosines for the third side, then the Law of Cosines or Sines for the remaining angles, and Area = ½ab sin C.

2 angles and a side (ASA or AAS): the third angle is 180° minus the other two, then the Law of Sines for the other sides.

2 sides and a non-included angle (SSA): the Law of Sines, checking for zero, one, or two solutions.

Right triangle: the Pythagorean theorem and sin, cos, and tan.

Base and height: Area = ½ × base × height, which gives the area but not the sides or angles.

The SSA Ambiguous Case

When you know two sides and an angle that is not between them, the Law of Sines gives sin B = b sin A / a. If that is greater than 1, no triangle exists: side a is too short to reach the base line. If it equals 1, there is exactly one triangle, with a right angle at B. Otherwise B could be an acute angle or its supplement, 180° − B, and each is a valid triangle whenever it still leaves room for angle C.

For a = 6, b = 8, and A = 40°, both B ≈ 58.99° and B ≈ 121.01° work, so two different triangles match the same measurements. The calculator lists both and lets you switch the diagram between them.

Checking Whether Three Sides Form a Triangle

Three lengths form a triangle only if each is shorter than the sum of the other two (the triangle inequality). 3, 4, and 8 fail because 3 + 4 = 7 is less than 8. When the two shorter sides add up exactly to the longest, as with 3, 4, and 7, the result is a degenerate triangle: the three points lie on one straight line and the area is 0, so it is not treated as a proper triangle.

Triangle Formulas

Area from base and height: A = ½bh.

Heron's formula: A = √[s(s − a)(s − b)(s − c)], with semi-perimeter s = (a + b + c) / 2.

Area from two sides and the included angle: A = ½ab sin C.

Perimeter: P = a + b + c.

Law of Cosines: c² = a² + b² − 2ab cos C.

Law of Sines: a / sin A = b / sin B = c / sin C.

Pythagorean theorem (right triangles): a² + b² = c², where c is the hypotenuse.

Height to side a: hₐ = 2A / a. Inradius: r = A / s. Circumradius: R = abc / (4A).

Classifying Triangles

By sides, a triangle is equilateral (all three equal), isosceles (two equal), or scalene (all different). By angles, it is acute (all angles under 90°), right (one angle exactly 90°), or obtuse (one angle over 90°). The largest angle is always opposite the longest side, so comparing a² + b² with c² for the longest side c tells you which: equal means right, greater means acute, and less means obtuse. For example, 3-4-5 is scalene and right, 5-5-5 is equilateral and acute, and 5-5-6 is isosceles and acute.

How to Use the Triangle Calculator

  1. Under "What do you know?", pick the information you have: three sides, two sides and the angle between them, two angles and a side, two sides and a non-included angle, a right triangle, or a base and height.
  2. Enter only the values that mode asks for. Side a is always opposite angle A, side b opposite angle B, and side c opposite angle C, as labelled on the diagram.
  3. Choose a length unit and the number of decimal places to display. Angles are always in degrees, and every calculation uses full precision; only the display is rounded.
  4. Read the solved triangle: all sides and angles, area, perimeter, and type. The diagram is drawn to scale; choose a side under "Height to side" to see its altitude.
  5. Open Advanced properties for the heights, inradius, and circumradius, and follow "How this triangle was solved" for each step with your numbers.
  6. For SSA, check whether there are zero, one, or two triangles; when there are two, both are listed and you can switch the diagram between them.

Frequently Asked Questions

How do I solve a triangle when I know three sides?

Use Heron's formula for the area, with s = (a + b + c) / 2 and Area = √[s(s − a)(s − b)(s − c)], and the Law of Cosines for each angle: cos A = (b² + c² − a²) / (2bc). First check that each side is shorter than the sum of the other two.

How do I find a missing side?

If you know the other two sides and the angle between them, use the Law of Cosines: c² = a² + b² − 2ab cos C. If you know two angles and a side, use the Law of Sines: a / sin A = b / sin B. In a right triangle, use the Pythagorean theorem, a² + b² = c².

How do I find a missing angle?

If you know two angles, the third is 180° minus their sum. If you know all three sides, use the Law of Cosines, cos A = (b² + c² − a²) / (2bc). In a right triangle, use inverse sine, cosine, or tangent of a side ratio, such as A = arctan(a / b).

What is the difference between SSS, SAS, ASA, AAS, and SSA?

The letters list the known parts in order around the triangle. SSS is three sides. SAS is two sides with the angle between them. ASA is two angles with the side between them; AAS is two angles and a side that is not between them. SSA is two sides and an angle that is not between them, the only one of these that can match more than one triangle.

Can two sides and an angle produce two triangles?

Yes, when the angle is not between the two sides (SSA). If the side opposite the known angle is shorter than the other known side but long enough to reach the base line, it can meet it at two points, giving two different triangles. The calculator shows both.

How do I calculate triangle area?

With a base and its perpendicular height, Area = ½ × base × height. With three sides, use Heron's formula. With two sides and the angle between them, Area = ½ab sin C. For a right triangle, Area = ½ × leg × leg.

How do I calculate triangle height?

Divide twice the area by the side you are measuring the height to: hₐ = 2 × Area / a. Every triangle has three heights, one to each side; for an obtuse triangle, the heights to the two shorter sides fall outside the triangle, onto the extended sides.

How do I know if three sides form a triangle?

Each side must be shorter than the sum of the other two. For example, 3, 4, and 5 work (3 + 4 > 5), but 3, 4, and 8 do not (3 + 4 < 8). If the two shorter sides add up exactly to the longest, the points lie on a straight line, a degenerate triangle with zero area.

When should I use Heron's formula?

When you know all three sides and want the area without finding a height or an angle first. It is also the method this calculator uses in 3 Sides mode.

When should I use the Law of Cosines?

Use it when you know two sides and the angle between them (to find the third side), or all three sides (to find an angle). It works for any triangle, not just right triangles, and reduces to the Pythagorean theorem when the angle is 90°.

How do I solve a right triangle?

Use the Pythagorean theorem, a² + b² = c², when you know two sides, and sin, cos, and tan when you know a side and an acute angle: sin A = opposite / hypotenuse, cos A = adjacent / hypotenuse, tan A = opposite / adjacent. The two acute angles always add up to 90°.

Last updated: September 27, 2026.