Skip to content
K Knidox Search…
Geometry · Geometry

Triangle Solver

Solve a triangle from three sides (SSS), two sides and the included angle (SAS), or two angles and the included side (ASA).

What do you know?
Try an example — tap to load
Area
6square unitsSolved

Perimeter 12 · angles sum to 180°.

Schematic triangleABC
Side a
3
Side b
4
Side c
5
Angle A
36.87°
Angle B
53.13°
Angle C
90°

Give three sides, two sides and their included angle, or two angles and the included side, and the triangle is fully determined. A 3-4-5 triangle is right-angled: its angles are 36.87°, 53.13°, and 90°, its perimeter is 12, and its area is 6 square units by Heron’s formula.

How a triangle is solved

A triangle has six parts — three sides and three angles — and any three of them (as long as one is a side) fix the whole shape. From the given parts the missing sides come from the law of cosines or the law of sines, the missing angles from the same relations, and the area from whichever formula matches the inputs. Angles here are entered and reported in degrees; internally each is converted to radians with rad = deg × π ÷ 180.

a² = b² + c² − 2bc·cos A · area = √(s(s − a)(s − b)(s − c)), s = (a + b + c) ÷ 2

law of cosines (rearrange for any angle) and Heron’s formula for area from three sides

Worked example — the 3-4-5 triangle

With sides a = 3, b = 4, c = 5 the triangle inequality holds (each side is shorter than the sum of the other two), so it is solvable:

  1. 1
    Check the triangle is valid. For three sides, confirm each side is shorter than the sum of the other two: 5 < 3 + 4 ✓. For given angles, confirm they are positive and sum to less than 180°.
  2. 2
    Find an angle with the law of cosines. A = acos((b² + c² − a²) ÷ 2bc) = acos((16 + 25 − 9) ÷ 40) = acos(0.8) = 36.87°.
  3. 3
    Find a second angle the same way. B = acos((a² + c² − b²) ÷ 2ac) = acos(18 ÷ 30) = acos(0.6) = 53.13°.
  4. 4
    Close the triangle. C = 180 − A − B = 180 − 36.87 − 53.13 = 90°, so 3-4-5 is right-angled.
  5. 5
    Compute the area. Heron: s = 6, area = √(6 × 3 × 2 × 1) = √36 = 6 square units; perimeter = 3 + 4 + 5 = 12.

Which combinations solve a triangle

Three parts fix a triangle when at least one is a side — except SSA, which can give two answers.

GivenMeaningMethodUnique?
SSSThree sidesLaw of cosines for each angle; Heron for areaYes
SASTwo sides + included angleLaw of cosines for the third side, then anglesYes
ASATwo angles + included sideThird angle by subtraction; law of sines for sidesYes
AASTwo angles + a non-included sideThird angle by subtraction; law of sinesYes
SSATwo sides + a non-included angleLaw of sinesAmbiguous — 0, 1, or 2 triangles

The ambiguous case and other pitfalls

SSA is the odd one out. When you know two sides and an angle that is not between them, the law of sines can yield two valid triangles, one, or none — because a given sine matches two angles (θ and 180 − θ). That is why this solver sticks to the unambiguous SSS, SAS, and ASA layouts. AAA (three angles) never fixes a triangle at all: it sets the shape but not the size, so infinitely many similar triangles fit.

Keep the inputs consistent — sides must be positive, angles strictly between 0° and 180°, and any two given angles must total less than 180° so the third stays positive. If a set fails these tests the tool flags it rather than returning a nonsensical answer. For a right triangle you can also use the Pythagorean theorem calculator.

What three parts do I need to solve a triangle?
Any three, provided at least one is a side: three sides (SSS), two sides and the included angle (SAS), or two angles and the included side (ASA). Three angles alone fix only the shape, not the size.
What is the ambiguous SSA case?
SSA gives two sides and an angle not between them. The law of sines can then produce two different triangles, exactly one, or none, because sin θ = sin (180 − θ). This solver avoids SSA and uses SSS, SAS, and ASA, which each have a single answer.
How is the area found from three sides?
By Heron’s formula: let s = (a + b + c) ÷ 2, then area = √(s(s − a)(s − b)(s − c)). For 3-4-5, s = 6 and area = √(6 × 3 × 2 × 1) = 6 square units — no angle needed.
How does SAS find the third side?
With the law of cosines: c = √(a² + b² − 2ab·cos C), where C is the angle between sides a and b. The remaining angles then follow, and the area is ½ × a × b × sin C.
Why are angles entered in degrees but the math uses radians?
Degrees are easier to read, but the sine and cosine functions work in radians, so each angle is converted with rad = deg × π ÷ 180 before calculating and converted back for display.
Why does the tool reject some inputs?
A set of sides must satisfy the triangle inequality — each side shorter than the sum of the other two — and given angles must be positive and sum to under 180°. When they do not, no real triangle exists, so the solver shows a message instead of a false result.