Skip to content

Triangle calculator: sides, angles and area

Solve any triangle from SSS, SAS, ASA, AAS or SSA inputs. Get every side, angle, area, perimeter and height with a to-scale diagram.

  • Runs in your browser
  • Nothing you enter is sent
  • Free, no account
Enter any three values
Side a is opposite angle A, side b opposite B and side c opposite C. Angles are in degrees. Leave the rest empty.
°
°
°

Solved as SSS — three sides known

Sides and angles

a=3 b=4 c=5
A = 36.8699°, B = 53.1301°, C = 90° · scalene, right-angled
A 36.87°B 53.13°C 90°a = 3b = 4c = 5
Drawn to scale. Side a is opposite angle A, side b is opposite angle B and side c is opposite angle C.

Area

6

Heron's formula

Perimeter

12

Type

Scalene · Right-angled

Semi-perimeter (s)

6

Height to a

4

2 × area ÷ a

Height to b

3

Height to c

2.4

Inradius

1

area ÷ s

Circumradius

2.5

abc ÷ 4·area

Median from A

4.272002

Median from B

3.605551

Median from C

2.5

Cross-check: ½·a·b·sin C = 6, which matches Heron’s area of 6.

Step-by-step working

  1. Three sides given (SSS) — check the triangle inequality first.

    3 + 4 > 5, 3 + 5 > 4, 4 + 5 > 3 ✓
  2. Use the law of cosines rearranged for the angle opposite side a.

    cos A = (b² + c² − a²) / 2bc = (16 + 25 − 9) / 40 = 0.8 A = 36.869898°
  3. Repeat for angle B.

    cos B = (a² + c² − b²) / 2ac = 0.6 B = 53.130102°
  4. The angles of a triangle always add to 180°, which gives the last one.

    C = 180° − 36.869898° − 53.130102° = 90°

How to use the triangle solver

Fill in any three of the six boxes and leave the rest empty. The standard labelling applies: side a is opposite angle A, side b is opposite angle B, and side c is opposite angle C. Angles are in degrees. The solver works out which case you have entered, picks the right law, and shows the reasoning.

Sides have no units, so the answer is in whatever unit you used for the input — centimetres in, centimetres out.

The five solvable cases

Case What you know Method used Solutions
SSSAll three sidesLaw of cosines for each angleOne, if the triangle inequality holds
SASTwo sides and the angle between themLaw of cosines for the third sideExactly one
ASATwo angles and the side between them180° sum, then law of sinesExactly one
AASTwo angles and a side not between them180° sum, then law of sinesExactly one
SSATwo sides and an angle not between themLaw of sinesZero, one or two — the ambiguous case

AAA — three angles — is not on the list. Three angles fix the shape but not the size, so infinitely many similar triangles fit. The solver asks for at least one side length.

The two laws

Law of cosines

c² = a² + b² − 2ab·cos(C). Rearranged for an angle it becomes cos(C) = (a² + b² − c²) ÷ 2ab. With C = 90° the cosine term vanishes and it collapses to Pythagoras, which is why the law of cosines is sometimes described as Pythagoras with a correction term for the angle.

Law of sines

a ÷ sin(A) = b ÷ sin(B) = c ÷ sin(C). That shared ratio is also equal to twice the circumradius. It is the quickest route whenever you have a matched side–angle pair, but it uses arcsine, which has two answers between 0° and 180° — the source of the ambiguous case below.

The ambiguous case (SSA), explained

Suppose you know angle A, its opposite side a, and another side b. Sketch angle A, draw side b along one arm, then swing an arc of radius a from its far end. That arc may miss the other arm entirely, touch it once, or cross it twice:

  • a < b·sin(A) — the arc falls short. No triangle exists.
  • a = b·sin(A) — the arc just touches. One right-angled triangle.
  • b·sin(A) < a < b — the arc crosses twice. Two different triangles fit, one acute and one obtuse at B.
  • a ≥ b — only one crossing is on the correct side. One triangle.

When two triangles fit, both are solved and drawn. Whichever the real-world problem intends, you can see both and choose. This is where most textbook errors happen, and it is why the solver deliberately does not pick one for you.

Area, and how it is cross-checked

Once all three sides are known, Heron’s formula gives the area from the semi-perimeter s = (a + b + c) ÷ 2:

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

The tool also computes ½·a·b·sin(C) and prints both so you can confirm they agree. From the area come the three heights (h = 2·area ÷ base), the inradius (area ÷ s) and the circumradius (abc ÷ 4·area).

Classifying the result

  • By sides — equilateral (all three equal), isosceles (exactly two equal), scalene (all different).
  • By angles — right-angled (one angle exactly 90°), obtuse (one angle above 90°), acute (all below 90°).

A triangle can be both, for example isosceles and right-angled — the familiar 45-45-90 set square.

When no triangle exists

Two checks catch impossible inputs. The triangle inequality says each side must be shorter than the sum of the other two, so 2, 3, 9 cannot form a triangle. And the three angles must sum to exactly 180°, so 120° and 70° leave nothing for the third. In both cases the solver explains the specific problem rather than showing a nonsense answer.

The diagram

The drawing is generated from the solved coordinates and scaled to fit, so it genuinely reflects your numbers: a nearly degenerate triangle will look like a sliver, and an equilateral one will look equilateral. Vertices carry their angle, edges carry their length. Everything is computed in your browser — nothing is uploaded.

Questions

Which combinations of inputs can it solve?

Any three values that determine a triangle: three sides, two sides and the included angle, two angles and any side, or two sides and a non-included angle. Just fill in the boxes you know.

Why does SSA sometimes give two answers?

Two sides and a non-included angle can describe two different triangles — the ambiguous case. When that happens both solutions are shown, each with its own diagram values.

How is the area calculated?

From Heron’s formula once all three sides are known, cross-checked against the ½ab·sin(C) form. Both are shown so you can see they agree.

Does the diagram match my numbers?

Yes, it is drawn to scale from the solved coordinates, with the sides and angles labelled. A triangle that is nearly degenerate will look that way in the drawing.

What if my inputs are impossible?

You get a plain explanation — for example that two sides are shorter than the third, or that the angles add to more than 180° — instead of a nonsense result.