Triangle Calculator
Give it three side lengths and it returns everything else — area, all three angles, the heights and the classification.
Heron's formula
The usual area formula, ½ × base × height, needs a height you often do not have. Heron's formula needs only the three sides:
For a 6-8-10 triangle: s = 12, and the area is √(12 × 6 × 4 × 2) = √576 = 24.
It is attributed to Heron of Alexandria in the first century AD, although Archimedes appears to have known it earlier. Its practical value is that surveyors and builders can measure three distances with a tape and get an exact area without establishing a perpendicular.
The law of cosines and triangle validity
With three sides known, every angle follows from the law of cosines:
This is Pythagoras generalised. When A is exactly 90°, cos(A) = 0, so b² + c² = a² and the familiar theorem drops out as the special case.
Not every three lengths make a triangle. The triangle inequality requires that any two sides sum to more than the third — otherwise the two shorter sides cannot reach across the longest one. Sides of 2, 3 and 7 fail: 2 + 3 = 5, which is less than 7.
Classifying triangles
| By sides | Condition | By angles | Condition |
|---|---|---|---|
| Equilateral | all three equal | Acute | all angles < 90° |
| Isosceles | two equal | Right | one angle = 90° |
| Scalene | all different | Obtuse | one angle > 90° |
A quick test using only the sides: with c as the longest, compare c² against a² + b². If c² is smaller the triangle is acute; equal, right-angled; larger, obtuse. The 6-8-10 example gives 100 = 36 + 64 exactly, so it is right-angled — a scaled 3-4-5 triangle, the best-known Pythagorean triple and the reason builders use a 3-4-5 measurement to square a corner.
Frequently asked questions
What if I only know two sides and an angle?
Use area = ½ab·sin(C) when the angle sits between the two known sides. If the angle is not between them, the law of sines finds the third side first — but be aware of the ambiguous case, where two different triangles can satisfy the same data.
What are the circumradius and inradius?
The circumradius R is the radius of the circle passing through all three vertices; the inradius r is the radius of the largest circle fitting inside, touching all three sides. They come up in geometry and in engineering layout problems.
Does Heron's formula work for any triangle?
Yes, for every valid triangle. It can lose numerical accuracy for very thin triangles where one side is almost the sum of the other two, and a rearranged version is used in computing for that case, but for ordinary shapes it is exact.