Triangle Calculator

Area: 0

Perimeter
Side a
Side b
Side c
Angle A
Angle B
Angle C
Triangle Type
PartOppositeValue

Solving Any Triangle: Law of Cosines and Law of Sines

Unlike a right-triangle solver, this calculator works for any triangle — acute, obtuse, or right — using two classical theorems together. The Law of Cosines (c² = a² + b² − 2ab·cos C) relates all three sides to one angle, which is exactly what's needed when you know three sides (SSS) or two sides and the angle between them (SAS). The Law of Sines (a/sin A = b/sin B = c/sin C) relates sides to their opposite angles, which handles the ASA and AAS cases where you already know two angles and can find the third by subtracting from 180°. Once all three sides and angles are known, the area is found with either the SAS area formula (½ab·sin C) or, when only sides are known, Heron's formula: area = √(s(s−a)(s−b)(s−c)), where s is the semi-perimeter (a+b+c)/2.

Why Some Inputs Don't Produce a Valid Triangle

Not every combination of three numbers describes a real triangle. Three sides must satisfy the triangle inequality — the sum of any two sides must exceed the third — or no triangle can close. Three angles must sum to exactly 180°, and in the SSA-like situations, some inputs can even produce two different valid triangles (the "ambiguous case" of the Law of Sines); this calculator flags an error rather than silently returning a nonsensical shape when the inputs are geometrically impossible.

Have a Right Triangle Specifically?

If you already know one of the angles is exactly 90°, you can skip the general trigonometry above. The right triangle calculator uses simpler sine/cosine/tangent ratios tailored to right triangles, and if you only need to find one missing side from the other two, the Pythagorean theorem calculator is the more direct tool.

Frequently Asked Questions

What information do I need to solve a triangle?

You need any three pieces of information about the triangle's six parts (three sides, three angles), as long as at least one is a side length. This calculator supports three sides (SSS), two sides plus the angle between them (SAS), two angles plus the side between them (ASA), and two angles plus a side not between them (AAS). Knowing only three angles (AAA) is not enough, since infinitely many similarly-shaped triangles share the same angles.

Why does the calculator say my triangle is invalid?

For three sides, the triangle inequality requires each side to be shorter than the sum of the other two - otherwise the sides can't meet to close a triangle. For two angles, their sum must be less than 180 degrees, since the third angle needs to be positive. If your inputs fail either check, no real triangle exists with those measurements.