Triangle Calculator

Enter any three values of a triangle — sides, angles or a mix, with at least one side — to solve every side and angle, the area, perimeter, heights, inradius and circumradius, with the law of sines or cosines worked through and the ambiguous case reported.

Triangle type
Check your inputs—Complete valid inputs to calculate a current result.

Enter any three values, including at least one side, and leave the rest blank. Angle A is opposite side a (across the triangle from it), B opposite b, C opposite c.

°
°
°

Area

6

Right scalene triangle · Three sides (SSS): law of cosines

  • Side a3
  • Side b4
  • Side c5
  • Angle A (opposite a)36.87°
  • Angle B (opposite b)53.13°
  • Angle C (opposite c)90°
  • Perimeter12
  • Heights to a, b, c4 · 3 · 2.4
  • Inradius · circumradius1 · 2.5
  • TypeRight, scalene
  • Area6

How this was calculated

  1. You know all three sides. The law of cosines (a rule that links the three sides with one angle) gives each angle. Angle A sits across from side a.cos A = (b² + c² − a²) ÷ 2bcPut in your numbers: (16.000 + 25.000 − 9.000) ÷ 40.000Answer: A = 36.87°
  2. Do the same for angle B.cos B = (a² + c² − b²) ÷ 2acPut in your numbers: (9.000 + 25.000 − 16.000) ÷ 30.000Answer: B = 53.13°
  3. The three angles of a triangle always add up to 180°, so C is what is left.C = 180° − A − BPut in your numbers: 180° − 36.87° − 53.13°Answer: C = 90.00°
  4. Area is the flat space inside the triangle. Multiply two sides and the sine of the angle between them, then halve it.Area = ½ × a × b × sin CPut in your numbers: ½ × 3 × 4 × sin 90°Answer: Area = 6
  5. s is half the perimeter (the distance around). The inradius is the radius of the biggest circle that fits inside; the circumradius is the radius of the circle through all three corners.s = perimeter ÷ 2; inradius = area ÷ s; circumradius = a ÷ (2 sin A)Put in your numbers: s = 12 ÷ 2 = 6; 6 ÷ 6; 3 ÷ (2 sin 36.87°)Answer: inradius 1, circumradius 2.5

Triangles in simple words

A triangle has three sides (a, b, c) and three angles (A, B, C). Each angle sits across from the side with the same letter. The three angles always add up to 180°.

If you know any three of these six values, and at least one of them is a side, you can work out the rest. With three sides, the law of cosines finds the angles. With a side and two angles, the law of sines finds the other sides.

Example: sides 3, 4 and 5. The biggest angle comes out as exactly 90°, so this is a right triangle. Its area is 3 × 4 ÷ 2 = 6.

Type three values and leave the others blank. The calculator picks the right rule and shows each step with your numbers.

How the calculator solves a triangle

Any three independent measurements of a triangle fix it — provided at least one is a side. The calculator looks at which three you entered, picks the right law, and shows the working. The one case with a twist is two sides and an angle that is not between them: the law of sines can then admit two different triangles, and both are reported.

What you know, and how it is solved
GivenCaseMethodNotes
Three sidesSSSLaw of cosines for each angleSides must satisfy the triangle inequality
Two sides and the angle between themSASLaw of cosines for the third side, then the anglesAlways exactly one triangle
Two sides and an angle opposite one of themSSALaw of sinesMay give two triangles, one, or none — the ambiguous case
Two angles and any sideASA / AASThird angle from 180°, then law of sinesAlways exactly one triangle
Three anglesAAA—Fixes the shape only; no size without a side

The Pythagorean theorem

In any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². The hypotenuse is always the longest side and always sits opposite the right angle.

Rearranged, the theorem finds any missing side. Given both legs, c = √(a² + b²). Given the hypotenuse and one leg, the other leg is √(c² − a²). This second form requires the hypotenuse to be longer than the known leg — otherwise no such triangle exists. For a right triangle, enter the two known sides and 90° for the angle between the legs, or the three sides if you have them.

The law of sines and the law of cosines

These two relations extend right-triangle trigonometry to every triangle. The law of sines says each side is proportional to the sine of its opposite angle, which links any angle–side pair to any other. The law of cosines generalises Pythagoras with a correction term for the included angle, and collapses back to a² + b² = c² when that angle is 90°, because cos 90° = 0.

Formulas the calculator uses
QuantityFormulaNotes
Law of sinesa ÷ sin A = b ÷ sin B = c ÷ sin CAny two angle–side pairs
Law of cosinesc² = a² + b² − 2ab cos CReduces to Pythagoras when C = 90°
Angle sumA + B + C = 180°Third angle from two
Area (two sides, included angle)½ ab sin C
Area (Heron)√[s(s−a)(s−b)(s−c)], s = (a+b+c)/2From three sides only
Height to side a2 × area ÷ a
Inradiusarea ÷ sCircle touching all three sides
Circumradiusa ÷ (2 sin A)Circle through all three corners

Finding the angles

The three trigonometric ratios relate the angles to the sides of a right triangle. For an acute angle θ: sin θ is the opposite side over the hypotenuse, cos θ is the adjacent over the hypotenuse, and tan θ is the opposite over the adjacent. The mnemonic SOH-CAH-TOA encodes all three.

In a general triangle the law of cosines does the same job: cos A = (b² + c² − a²) ÷ 2bc gives any angle from three sides. The angles of every triangle total 180°, which is a quick check on any result — and in a right triangle the two acute angles therefore sum to exactly 90°.

Exact trigonometric values worth knowing
AngleRadianssincostan
0°00 = 0.00001 = 1.00000 = 0.0000
30°0.1667π1/2 = 0.5000√3/2 = 0.8660√3/3 = 0.5774
45°0.25π√2/2 = 0.7071√2/2 = 0.70711 = 1.0000
60°0.3333π√3/2 = 0.86601/2 = 0.5000√3 = 1.7321
90°0.5π1 = 1.00000 = 0.0000undefined

Area and special triangles

For a right triangle the area is half the product of the legs. For any triangle it is half the product of two sides and the sine of the angle between them, or — from three sides alone — Heron's formula, which is what the calculator applies after solving.

Several triangles have exact integer or simple radical relationships worth recognizing. Pythagorean triples such as 3-4-5, 5-12-13, and 8-15-17 have whole-number sides. The 45-45-90 triangle has legs of equal length and a hypotenuse of leg × √2. The 30-60-90 triangle has sides in the ratio 1 : √3 : 2, which appears constantly in geometry and trigonometry.

Special triangles
TriangleSide ratioNotes
45-45-901 : 1 : √2Half a square; legs equal, hypotenuse leg × 1.4142
30-60-901 : √3 : 2Half an equilateral triangle; short leg is half the hypotenuse
Equilateral1 : 1 : 1, all angles 60°Area = (√3 ÷ 4) × side²
3-4-5 and multiples3 : 4 : 5Whole-number right triangle used to check square corners

Pythagorean triples

Whole-number right triangles. Every multiple of a triple is also a triple, and every primitive triple comes from Euclid's formula: for whole numbers m > n, the sides m² − n², 2mn and m² + n² always work.

Primitive Pythagorean triples and their multiples
Primitive tripleSome multiples
3, 4, 56-8-10, 9-12-15, 12-16-20
5, 12, 1310-24-26, 15-36-39
8, 15, 1716-30-34
7, 24, 2514-48-50
20, 21, 2940-42-58
9, 40, 4118-80-82

Where this gets used

Triangles answer a lot of practical questions. Construction uses the 3-4-5 triple to check that corners are square without a protractor. Navigation and mapping use the law of cosines for distance between two points seen from a third. Screen and television sizes are quoted as the diagonal, which is the hypotenuse of the display's width and height. Surveyors measure one baseline and two angles, then let the law of sines supply the distances they cannot walk.

It also generalizes: the distance formula between two points in a plane, √((x₂−x₁)² + (y₂−y₁)²), is the Pythagorean theorem applied to the horizontal and vertical separation.

Equilateral and isosceles triangles

Choose Equilateral to solve from a side, height, area or perimeter. Side s gives height (√3 ÷ 2)s, area (√3 ÷ 4)s² and perimeter 3s, so a side of 6 gives height 3√3 ≈ 5.196 and area 9√3 ≈ 15.588.

Choose Isosceles to solve from a leg and the base, the base and the height, or the base and the apex angle. Legs of 5 and a base of 6 give height √(5² − 3²) = 4, area ½ × 6 × 4 = 12 and an apex angle of 2 × asin(3 ÷ 5) ≈ 73.74°.

How to solve a triangle

Find every side, angle, the area and the perimeter of any triangle from three known values.

  1. Enter any three values

    Sides a, b, c and angles A, B, C, where each angle sits opposite the side of the same letter. Include at least one side; leave the others blank.

  2. Read the solved triangle

    All three sides and angles, the perimeter, the heights, the inradius and circumradius, and the triangle's type, with the area as the headline.

  3. Check for a second solution

    With two sides and an angle opposite the shorter of them, a second triangle may fit. The calculator shows both; your problem's geometry decides which applies.

Frequently asked questions

How do I find the height of an isosceles triangle?

Split it into two right triangles: h = √(leg² − (base ÷ 2)²). For legs 5 and base 6, h = √(25 − 9) = 4. Choose the Isosceles tab to see every step.

How do I find the hypotenuse of a right triangle?

Square both legs, add them, and take the square root: c = √(a² + b²). For legs of 3 and 4, c = √(9 + 16) = √25 = 5. In the calculator, enter the two legs and 90° for the angle between them.

How do I solve a triangle with two sides and an angle?

It depends where the angle is. If it is between the two sides (SAS), the law of cosines gives the third side directly. If it is opposite one of them (SSA), the law of sines gives the second angle — and there may be two valid triangles, one, or none, which the calculator reports.

What is the ambiguous case?

When you know two sides and an angle opposite the shorter of them, the unknown angle opposite the longer side can be acute or obtuse, and both may produce a valid triangle. Sine takes the same value for an angle and its supplement, so the arithmetic cannot choose between them; only the situation can.

What is a Pythagorean triple?

A set of three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13, and 8-15-17. Any multiple of a triple is also a triple, so 6-8-10 works too. Builders use 3-4-5 to verify square corners.

How do I find the angles of a triangle from its sides?

Use the law of cosines: cos A = (b² + c² − a²) ÷ 2bc, then the inverse cosine. Repeat for a second angle and subtract both from 180° for the third. For a right triangle, the inverse tangent of opposite over adjacent is quicker.

Does the Pythagorean theorem work for all triangles?

No — only right triangles. For triangles without a right angle, use the law of cosines, c² = a² + b² − 2ab·cos(C), which reduces to the Pythagorean theorem when angle C is 90° because cos(90°) = 0.

References

Last updated . Results are estimates for informational purposes only.