Triangle Calculator

Free triangle calculator. Given three side lengths, compute the area, perimeter, semi-perimeter, all three angles, and classify the triangle by side and angle type.

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent — no API key needed.

API docs
Enter the three sides above.

How triangle calculator works

A triangle is fully determined by its three side lengths, as long as they satisfy the triangle inequality: the sum of any two sides must exceed the third. Given valid sides a, b, and c, the area follows from Heron's formula using the semi-perimeter s = (a+b+c)/2: area = √(s(s−a)(s−b)(s−c)).

The three angles come from the law of cosines: cos A = (b² + c² − a²) / (2bc), and similarly for B and C, converted from radians to degrees. The largest angle classifies the triangle: a right triangle has a 90° angle, an obtuse triangle has one angle above 90°, and an acute triangle has all angles below 90°.

Enter the three side lengths. The calculator validates that they form a triangle, computes the area and perimeter, finds all three angles, and classifies the triangle as equilateral (all sides equal), isosceles (two equal), or scalene (all different), and as acute, right, or obtuse.

Frequently asked questions

How is the area calculated?
Using Heron's formula: area = √(s(s−a)(s−b)(s−c)), where s is the semi-perimeter (a+b+c)/2. For a 3-4-5 triangle the area is 6.
How are the angles found?
From the law of cosines: cos A = (b² + c² − a²)/(2bc). The calculator solves for each angle and converts it to degrees. For a 3-4-5 triangle the angles are about 36.87°, 53.13°, and 90°.
What makes sides invalid?
The triangle inequality: each side must be shorter than the sum of the other two. Sides 1, 2, 10 cannot form a triangle because 1 + 2 is less than 10, and the calculator reports an error.
How is the triangle classified?
By sides: equilateral (all three equal), isosceles (two equal), or scalene (none equal). By angles: right (one 90° angle), obtuse (one angle over 90°), or acute (all under 90°). The calculator reports both.