Triangle Calculator

Solve any triangle from three known values, including at least one side. Get every missing side and angle, the area, perimeter, heights and type of triangle.

Triangle calculator

Enter any three values, including at least one side. Side a is opposite angle A, side b opposite angle B and side c opposite angle C.

°
°
°
Triangle solved

Uses the law of cosines, the law of sines and Heron's formula. Angles are in degrees and results are rounded to 4 decimal places. When two sides and a non-included angle are given (SSA), there can be two different triangles; both are shown.

On this page

A triangle calculator finds every missing side and angle of a triangle from any three known values, as long as at least one is a side, and then works out the area, perimeter, heights, inradius, circumradius and type of triangle. It handles all the standard cases, SSS, SAS, ASA, AAS and the ambiguous SSA case, and explains which rule it used.

For example, sides of 5, 7 and 8 give angles of about 38.2132°, 60° and 81.7868° and an area of 17.3205. Two sides of 5 and 7 with a 60° angle between them give a third side of 6.245 and an area of 15.1554. Sides of 3, 4 and 5 form a right triangle with an area of exactly 6.

How to use the triangle calculator

  1. Label your triangle so that side a is opposite angle A, side b is opposite angle B and side c is opposite angle C.
  2. Enter exactly three known values, including at least one side. Leave the other boxes empty.
  3. Enter angles in degrees.
  4. Press Calculate to see all six measurements and the extra properties.

Which three values do you need?

A triangle has six measurements, three sides and three angles, and three of them are usually enough to fix the rest:

  • SSS (three sides): always gives one triangle, provided any two sides add up to more than the third.
  • SAS (two sides and the angle between them): always gives one triangle.
  • ASA or AAS (two angles and any side): always gives one triangle, as long as the two angles add up to less than 180°.
  • SSA (two sides and an angle not between them): may give no triangle, one triangle or two different triangles. This is called the ambiguous case.
  • AAA (three angles): fixes the shape but not the size, so you need at least one side.

The formulas used

Angle sum

A + B + C = 180°

The angles of any triangle add up to 180 degrees, so knowing two gives the third.

Law of sines

a ÷ sin A = b ÷ sin B = c ÷ sin C

Used when you know an angle and its opposite side. With angles of 40° and 60° and side c = 10, the third angle is 80°, and a = 10 × sin 40° ÷ sin 80° ≈ 6.527.

Law of cosines

c² = a² + b² − 2ab cos C

Used for SSS and SAS. For sides 5 and 7 with a 60° angle between them, c² = 25 + 49 − 70 × 0.5 = 39, so c = √39 ≈ 6.245. Rearranged, it gives an angle from three sides: cos A = (b² + c² − a²) ÷ 2bc. When C is 90°, the cosine term disappears and the law becomes the Pythagorean theorem.

Area

Heron’s formula: Area = √(s(s − a)(s − b)(s − c)), where s = (a + b + c) ÷ 2

For sides 5, 7 and 8, s = 10 and the area is √(10 × 5 × 3 × 2) = √300 ≈ 17.3205. Other area formulas give the same answer: ½ × base × height, or ½ab sin C.

The ambiguous case (SSA)

When you know two sides and an angle that isn’t between them, the third vertex can sometimes sit in two places. With a = 6, b = 8 and A = 40°, the law of sines gives sin B = 8 sin 40° ÷ 6 ≈ 0.857, which fits two angles: about 58.987° and 121.013°. Both make valid triangles, one acute with c ≈ 9.2198 and one obtuse with c ≈ 3.037, so the calculator shows both. If side a were only 2, it would be too short to reach the third side and no triangle would be possible.

Types of triangles

By sides

  • Equilateral: all three sides equal, all angles 60°.
  • Isosceles: two sides equal, and the angles opposite them are equal.
  • Scalene: all sides and angles different.

By angles

  • Acute: all angles less than 90°.
  • Right: one angle exactly 90°.
  • Obtuse: one angle more than 90°.

Other properties

  • Height (altitude): the perpendicular distance from a side to the opposite corner, equal to 2 × area ÷ that side.
  • Inradius: the radius of the largest circle that fits inside, equal to area ÷ s.
  • Circumradius: the radius of the circle passing through all three corners, equal to a ÷ (2 sin A).
  • Perimeter: the sum of the three sides.

Right triangles

If you know one angle is 90°, you can use simpler tools: the Pythagorean theorem, a² + b² = c², for sides, and sine, cosine and tangent for angles. This calculator handles right triangles too; just enter 90 for the right angle along with two other values.

The triangle inequality

Three lengths only make a triangle if each pair adds up to more than the third. Sides of 1, 2 and 5 can’t form a triangle, because 1 + 2 is less than 5; the short sides can’t meet. The calculator checks this and tells you if your sides are impossible.

Special triangles worth knowing

  • 45-45-90 triangle: the two short sides are equal and the long side is √2 times longer. With short sides of 1, the hypotenuse is about 1.4142.
  • 30-60-90 triangle: the sides are in the ratio 1 : √3 : 2. The side opposite 30° is half the hypotenuse.
  • 3-4-5 triangle: the simplest right triangle with whole-number sides, used by builders to check corners are square. Multiples like 6-8-10 and 9-12-15 work too.
  • Equilateral triangle: with side s, the height is s × √3 ÷ 2 and the area is s² × √3 ÷ 4. A side of 5 gives an area of about 10.8253.

Worked examples

Measuring across a river

You can’t measure straight across a river, but you can measure along the bank. Walk 50 metres along the bank between two points, and from each point measure the angle to a tree on the far side: say 70° and 65°. The angle at the tree is 180° − 70° − 65° = 45°. With two angles and the side between them (ASA), the calculator finds the distances to the tree, and from those the river’s width.

A sloping roof

A roof spans 8 metres, and each side rises at 30°. The two rafters and the span form an isosceles triangle with a base of 8 and base angles of 30°. Enter c = 8, A = 30° and B = 30°: each rafter is about 4.6188 metres long, and the roof’s height at the ridge is about 2.3094 metres.

Area of an irregular plot

A triangular corner of a garden has sides of 12, 15 and 20 metres. Heron’s formula gives s = 23.5 and an area of about 89.6657 square metres, useful for working out turf, seed or fertiliser.

Tips for accurate results

  • Label the triangle carefully: each side letter must match the angle opposite it.
  • Use angles in degrees, not radians.
  • Keep extra decimal places in your measurements; rounding inputs early can change the answers noticeably, especially for thin triangles.
  • For SSA problems, check whether both possible triangles make sense in your situation.

Practical uses

  • Construction and carpentry: roof pitches, rafter lengths and bracing.
  • Surveying and navigation: finding distances you can’t measure directly using angles and one known length.
  • Land and garden plots: the area of an irregular plot can be split into triangles and added up.
  • Physics and engineering: resolving forces and vectors.

Related calculations

You may also find the area calculator useful to find the area of common shapes, while the circle calculator lets you find a circle’s radius, diameter, circumference and area.

Frequently asked questions

With two sides and the angle between them, use the law of cosines. With an angle and its opposite side, use the law of sines. For right triangles, the Pythagorean theorem is quickest.

Use the law of cosines: cos A = (b² + c² − a²) ÷ 2bc. For sides 5, 7 and 8, the angles are about 38.2°, 60° and 81.8°.

Use ½ × base × height, ½ab sin C, or Heron's formula with three sides. Sides 3, 4 and 5 give an area of 6.

When two sides and a non-included angle are known (SSA), there may be zero, one or two possible triangles.

It's a basic property of triangles on a flat surface. Knowing any two angles therefore gives the third.

No. Each pair of sides must add up to more than the third side. 1, 2 and 5 can't form a triangle.

No. Three angles fix the shape but not the size; you need at least one side length.

An acute triangle has all angles under 90°; an obtuse triangle has one angle over 90°.

They are in the ratio 1 : √3 : 2. The side opposite the 30° angle is half the hypotenuse.

About 4.6188 metres, found by entering the 8 metre base and two 30° base angles.

The radius of the circle that passes through all three corners. It equals a ÷ (2 sin A); for a 3-4-5 triangle it's 2.5.

Area = √(s(s − a)(s − b)(s − c)), where s is half the perimeter. It finds the area from the three sides alone.