Home › Math & Science › Triangle Calculator

Triangle Calculator

Work out every unknown in a triangle with this free triangle calculator. Give it three pieces of information — three sides, two sides and the angle between them, two angles and a side, or the legs of a right-angled triangle — and it finds all three sides, all three angles, the perimeter and the area, and tells you what kind of triangle it is. Impossible triangles are refused with a friendly explanation.

Enter the three sides. Angles are named after the side opposite them: angle A faces side a, and so on.

Area = 6 • Perimeter = 12
Sides a = 3, b = 4, c = 5 • Angles A = 36.87°, B = 53.13°, C = 90° • Right-angled, scalene
How it was solved:
  1. Angles from the cosine rule: cos A = (b² + c² − a²) ÷ (2bc)
  2. Area from Heron’s formula with s = half the perimeter = 6

How to use

  1. Choose what you know from the What do you know? list — three sides, two sides with the angle between them, two angles with the side between them, or a right triangle.
  2. Type the three values. The box labels change to match your choice, so you always know which value goes where.
  3. Press Solve triangle. The full answer appears: area and perimeter in big type, then every side, every angle, and the triangle’s type.
  4. Read the “How it was solved” box to see which rule — cosine rule, sine rule, Pythagoras or Heron — produced each part of the answer.

Famous triangles, solved

SidesAnglesPerimeterAreaType
3, 4, 536.87°, 53.13°, 90°126Right-angled, scalene
5, 5, 560°, 60°, 60°1510.8253Equilateral, acute
5, 5, 836.87°, 36.87°, 106.26°1812Isosceles, obtuse
6, 8, 1036.87°, 53.13°, 90°2424Right-angled, scalene
7, 10, 540.54°, 111.80°, 27.66°2216.2481Obtuse, scalene

Check any row with SSS mode above.

How it works

A triangle is fixed — completely, size and shape — by just three facts about it, as long as they include at least one side. That is why three well-chosen values are enough for this calculator to find the other three. Three sides (SSS) pin the triangle because the sides can only meet at one set of angles. Two sides with the angle trapped between them (SAS) and two angles with the side between them (ASA) work the same way, and a right-angled triangle needs only two sides because the third fact — the 90° angle — is already known.

Three rules do all the work. The cosine rule, c² = a² + b² − 2ab cos C, finds a side from two sides and the angle between them, and turned around it finds any angle when all three sides are known. The sine rule, a ÷ sin A = b ÷ sin B = c ÷ sin C, pairs each side with the angle opposite it, so once one complete pair is known, other sides and angles fall out. And in right triangles, Pythagoras (a² + b² = c²) handles the sides while the angles come from simple ratios. The area uses Heron’s formula: with s = half the perimeter, area = √[s(s−a)(s−b)(s−c)], which works for every triangle, even when no height is known.

Cosine rule: c² = a² + b² − 2ab cos C  |  Sine rule: a ÷ sin A = b ÷ sin B = c ÷ sin C  |  Angles: A + B + C = 180°  |  Heron’s area: √[s(s−a)(s−b)(s−c)], where s = (a + b + c) ÷ 2  |  Right triangles: a² + b² = c²

Not every three numbers can be a triangle. The iron rule is the triangle inequality: each side must be shorter than the other two added together. Sides of 1, 2 and 10 fail it — the 1 and the 2, laid end to end, cannot even reach across the 10 — so no such triangle exists, and this calculator says so plainly instead of printing nonsense. Angles have their own rule: they must add to exactly 180°, which is why ASA mode asks for only two — the third is whatever is left.

The type labels are worth knowing. By sides, a triangle is equilateral (all equal), isosceles (two equal) or scalene (all different). By angles it is acute (all under 90°), right-angled (one exactly 90°) or obtuse (one over 90°). The 3-4-5 triangle is both right-angled and scalene — the builder’s favourite, because its whole-number sides and exact right angle make it perfect for marking out square corners.

Worked example

Solve the triangle with sides a = 3, b = 4, c = 5 — the most famous triangle in the world.

Step 1: Check it can exist — 3 + 4 is more than 5, so yes.
Step 2: Find angle A with the cosine rule: cos A = (4² + 5² − 3²) ÷ (2 × 4 × 5) = 32 ÷ 40 = 0.8, so A = 36.87°.
Step 3: Angle B: cos B = (3² + 5² − 4²) ÷ (2 × 3 × 5) = 18 ÷ 30 = 0.6, so B = 53.13°.
Step 4: Angle C = 180 − 36.87 − 53.13 = 90° — a right angle.
Step 5: Area by Heron: s = 6, so √(6 × 3 × 2 × 1) = √36 = 6.

The calculator opens with this triangle solved: area 6, perimeter 12, angles 36.87°, 53.13° and 90°, labelled right-angled and scalene.

FAQ

How do I find the missing side of a triangle?

With two sides and the angle between them, use the cosine rule: c² = a² + b² − 2ab cos C. In a right-angled triangle, use Pythagoras: the hypotenuse squared equals the two shorter sides squared, added. Enter what you have above and the calculator picks the right rule.

What is the 3-4-5 triangle?

A right-angled triangle with sides 3, 4 and 5. Because 3² + 4² = 9 + 16 = 25 = 5², its angles are exactly 36.87°, 53.13° and 90°, its perimeter is 12 and its area is 6. Builders and carpenters use the 3-4-5 ratio to mark true right-angle corners with just a tape measure.

Why does the calculator refuse sides like 1, 2 and 10?

Because no such triangle exists. The triangle inequality says every side must be shorter than the other two added together; 1 + 2 = 3, which cannot reach across a side of 10. The two short sides would lie flat along the long one instead of meeting at a corner.

How is the area worked out without the height?

By Heron’s formula. Add the three sides and halve the total to get s, then the area is √[s(s−a)(s−b)(s−c)]. For the 3-4-5 triangle, s = 6 and the area is √(6 × 3 × 2 × 1) = √36 = 6. It works for any triangle, with no height needed.

What is the difference between the sine rule and the cosine rule?

The sine rule links each side to the angle opposite it (a ÷ sin A = b ÷ sin B), so you need one complete side-and-opposite-angle pair. The cosine rule links three sides with one angle, so it works with two sides and the angle between them, or all three sides.

Do the angles of a triangle always add to 180 degrees?

Yes — for every flat (Euclidean) triangle, the three interior angles add to exactly 180°. That is why this calculator only needs two angles in ASA mode: the third is 180 minus the other two. If your two angles already add to 180° or more, the triangle cannot exist.