Skip to main content

Geometry · Triangle

Triangle Calculator

Solve a triangle's angles, perimeter, and area from three known sides, or two sides and the angle between them.

Triangle Calculator

Choose what you know, enter the values, then select Calculate.

How these calculations work

From three sides, each angle is found with the law of cosines, and the area with Heron's formula. From two sides and the included angle, the third side is found with the law of cosines, the remaining angles the same way, and the area with ½ × side × side × sin(angle). The three side lengths (or the resulting triangle) must satisfy the triangle inequality — each side shorter than the sum of the other two — to form a real triangle. A to-scale diagram of the solved triangle, labeled with its side lengths and angles, is shown below the result once you calculate.

Examples

A 3-4-5 triangle has a right angle (90°) opposite its longest side, a perimeter of 12, and an area of 6. Two sides of 1 with a 60° angle between them form an equilateral triangle — every angle is 60°.

About these formulas

The law of cosines and Heron's formula are standard results from elementary trigonometry and geometry — no external source citation is needed for them.

Frequently asked questions

Why only two input combinations?

Three sides (SSS) and two sides with the included angle (SAS) each always describe exactly one possible triangle, so the answer is never ambiguous. Two sides with a non-included angle can describe zero, one, or two different triangles depending on the exact values — that case isn't supported here to avoid guessing which one you meant.

Why does the calculator say my input is invalid?

A required field is empty or not a number, a side or angle is zero or negative (or 180° or more, for the included angle), or — for three sides — the lengths you entered can't actually form a triangle.