Triangle solver — SSS, SAS, ASA, AAS and SSA with every side and angle

Choose which three parts of a triangle you know, enter them, and the solver finds the missing sides and angles plus area, perimeter, type and a scale diagram.

Live demo · real result from this tool
Area6
Perimeter
12
Type
right scalene

Solved triangle

Value
Side a3
Side b4
Side c5
Angle A36.86989765°
Angle B53.13010235°
Angle C90°
Area6
Perimeter12
Typeright scalene
Inradius1
Circumradius2.5
Height to a4

Diagram

Diagram

Method

Law of cosines for each angle: cos A = (b² + c² − a²)/(2bc); area by Heron's formula.

Processed on your device — nothing is uploaded.

How to use the triangle solver

  1. In What you know, choose Three sides (SSS), Two sides and the included angle (SAS), Two angles and the side between them (ASA), Two angles and a non-included side (AAS) or Two sides and a non-included angle (SSA).
  2. Fill in the three boxes that appear. Angles are in degrees.
  3. Read Area, Perimeter and Type, then the Solved triangle table with all sides, angles, inradius, circumradius and the height to side a.
  4. Look at the diagram to check the shape, and read Method to see which law was used.

What it does and when to use it

A triangle is fixed by three measurements, as long as at least one is a side. This solver handles every such case taught in school trigonometry. Surveyors and builders use the same steps to find a distance they cannot measure, such as the width of a river from two angles and a baseline (ASA), or the length of a roof brace from two sides and the angle between them (SAS).

For right triangles, the Pythagorean calculator is quicker. If you only need a missing angle from two others, use the angle calculator. Sine and cosine values for a single angle come from the trigonometry calculator.

How it works

  • SSS: law of cosines for each angle, cos A = (b² + c² − a²)/(2bc); the third angle is 180° minus the other two.
  • SAS: law of cosines for the third side, c² = a² + b² − 2ab·cos C, then the angles as in SSS.
  • ASA and AAS: third angle C = 180° − A − B, then the law of sines, a/sin A = b/sin B = c/sin C.
  • SSA: sin B = b·sin A / a. If both B and 180° − B leave room for angle C, there are two solutions.

Area comes from Heron’s formula, √(s(s − a)(s − b)(s − c)) with s = (a + b + c)/2. Inradius is area ÷ s, and circumradius is abc ÷ (4 × area).

Worked examples

Three sides, step by step. Sides a = 7, b = 8, c = 9.

  1. cos A = (8² + 9² − 7²)/(2 × 8 × 9) = 96/144 = 0.6667, so A = 48.1896851°.
  2. cos B = (7² + 9² − 8²)/(2 × 7 × 9) = 66/126 = 0.5238, so B = 58.41186449°.
  3. C = 180° − A − B = 73.3984504°.
  4. s = 24 ÷ 2 = 12, and area = √(12 × 5 × 4 × 3) = √720 = 26.83281573.

The tool labels it an acute scalene triangle.

Two angles and a side. A = 40°, B = 65° and c = 10. Then C = 75°, a = 6.654627014 and b = 9.38278864.

The ambiguous case. a = 7, b = 10, A = 35°. The tool shows Solution 1 with B = 55.02426762° and Solution 2 with B = 124.9757324°. The second triangle is obtuse, with c = 4.178914411.

Limits and tips

  • All sides and angles must be greater than zero, and each angle less than 180°.
  • The diagram shows only the first solution in the ambiguous case.
  • Results show up to 10 significant figures. A right angle found by calculation is labelled “right” when it is within a tiny tolerance of 90°.
  • Everything runs in your browser.

Frequently asked questions

Which side is opposite which angle?
Side a is opposite angle A, side b is opposite angle B and side c is opposite angle C. In SAS mode, angle C is the angle between sides a and b.
Why does SSA sometimes give two triangles?
With two sides and an angle that is not between them, the third side can swing into two positions. If a is shorter than b but longer than the height b·sin A, two different triangles fit. This is called the ambiguous case, and the tool shows both.
Why does it say no triangle exists?
In SSS, the two shorter sides must add up to more than the longest side. In SSA, side a must be at least as long as the height b·sin A, or it cannot reach the base. Angles A and B together must also be less than 180°.
Can I enter angles in radians?
No, angles are in degrees. Convert radians first with the angle converter.
What are the inradius and circumradius?
The inradius is the radius of the largest circle that fits inside the triangle. The circumradius is the radius of the circle that passes through all three corners.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close