Triangle Calculator

Enter any three sides or angles of a triangle, including at least one side, to find the rest, with the area, perimeter, heights, medians and the inscribed and circumscribed circles.

Your results

–

Save this calculation and come back to it any time. Members only — $5 every 3 months, ad-free.

Become a member

How to use the triangle calculator

  1. Enter exactly three of the six values, and make at least one of them a side. Leave the other three boxes empty.
  2. Sides are a, b and c. Angle A is opposite side a, angle B is opposite b, and angle C is opposite c. Angles are in degrees.
  3. Read the area at the top, then the full solution: all three sides and angles, perimeter, heights, medians, inradius and circumradius.
  4. If two different triangles fit your values, the calculator shows both side by side.

Any length unit works, as long as all the sides use the same one. The area comes out in that unit squared.

How a triangle is solved

The calculator first works out which case you have, then uses the two classic rules:

Law of cosines c² = a² + b² − 2ab cos C Law of sines a / sin A = b / sin B = c / sin C Angle sum A + B + C = 180° Area ½ab sin C, or Heron: √(s(s − a)(s − b)(s − c)), s = (a + b + c) / 2
  • SSS (three sides): the law of cosines gives each angle.
  • SAS (two sides and the angle between them): the law of cosines gives the third side.
  • ASA or AAS (two angles and a side): the third angle is 180° minus the other two, then the law of sines gives the missing sides.
  • SSA (two sides and an angle that is not between them): the law of sines gives a second angle, and here there can be no triangle, one triangle or two.

The heights are 2 × area ÷ side. The inradius r (the largest circle that fits inside) is area ÷ s, and the circumradius R (the circle through all three corners) is a ÷ (2 sin A).

Worked example

The calculator starts with the sides a = 5, b = 6 and c = 7, an SSS case.

  1. Check it is a triangle: 5 + 6 = 11, which is more than 7.
  2. A = arccos((6² + 7² − 5²) ÷ (2 × 6 × 7)) = arccos(60 ÷ 84) ≈ 44.4153°.
  3. B = arccos((5² + 7² − 6²) ÷ (2 × 5 × 7)) = arccos(38 ÷ 70) ≈ 57.1217°.
  4. C = 180° − 44.4153° − 57.1217° ≈ 78.463°.
  5. Area by Heron's formula: s = 18 ÷ 2 = 9, so area = √(9 × 4 × 3 × 2) = √216 ≈ 14.6969.

The perimeter is 18, the inradius is 14.6969 ÷ 9 ≈ 1.633 and the circumradius is 5 ÷ (2 sin 44.4153°) ≈ 3.5722. Every angle is under 90° and the sides all differ, so it is a scalene, acute triangle.

The ambiguous case (SSA)

Two sides and an angle that is not between them don't always pin down one triangle. Take a = 5, b = 7 and A = 40°. The law of sines gives sin B = 7 × sin 40° ÷ 5 ≈ 0.8999. Two angles have that sine: B ≈ 64.15° and B ≈ 115.85°. Both leave room for a third angle, so two triangles fit:

Triangle 1 Triangle 2
Angle B 64.1453° 115.8547°
Angle C 75.8547° 24.1453°
Side c 7.5428 3.1819
Area 16.9694 7.1584

Picture side a as a swinging arm of length 5: it can meet the base line in two places. If a were shorter than about 4.5, the arm couldn't reach at all and there would be no triangle; if a were longer than b, only one triangle would fit.

Frequently asked questions

Why do I need at least one side?

Angles fix a triangle's shape but not its size. A triangle with angles of 30°, 60° and 90° can be any size, from a set square to a roof truss. One side sets the scale, and the calculator works out the rest from it.

What does "these sides can't make a triangle" mean?

The two shorter sides must add up to more than the longest one; this is the triangle inequality. With sides 1, 2 and 3, the short sides only just reach, so the "triangle" lies flat with zero area. The calculator asks for different values instead of giving a flat result.

How do I solve a right triangle?

Enter 90 for the right angle plus two other values, or use the right triangle calculator, which is set up for legs and a hypotenuse. If you know two sides of a right triangle, the Pythagorean theorem calculator finds the third in one step.

Are the angles in degrees or radians?

Degrees. To convert radians to degrees, multiply by 180 and divide by π (about 3.14159), so 1 radian is about 57.2958°.

Related calculators

  • Right Triangle Calculator — Enter any two of the legs, hypotenuse, angles or area to solve a right triangle completely.
  • Pythagorean Theorem Calculator — Find the hypotenuse or a missing leg of a right triangle with a² + b² = c², shown step by step.
  • Area Calculator — Area of a square, rectangle, triangle, circle, ellipse, trapezoid, parallelogram, sector or regular polygon.
  • Circle Calculator — Radius, diameter, circumference and area from any one of them, plus arc length and sector area for an angle.

Results are calculated in your browser. Double-check anything important before you rely on it. See our disclaimer.