Math · Geometry Formula verified

Triangle Calculator

Enter a triangle's three side lengths (or a base and height for area only) to find its area, perimeter, angles, and classification, with every step shown.

Given
02550
02550
02550
On-screen number pad
Tap to type into the highlighted field
Area
6
Right triangle · scalene
Perimeter
12
Angles (A, B, C)
36.9°, 53.1°, 90°

Step-by-step proofCheck by hand

How the angles and classification are found

Given all three side lengths, Heron's formula finds the area without needing any angle, and the law of cosines — a generalization of the Pythagorean theorem — finds each angle from the three sides in turn. A triangle is equilateral if all three sides match, isosceles if exactly two do, and scalene if all three differ. It's a right triangle exactly when the square of its longest side equals the sum of the squares of the other two.

The formulas

Heron: √(s(s−a)(s−b)(s−c))  ·  cos A = (b²+c²−a²) / 2bc

Worked example

A 3-4-5 triangle: Heron's formula gives an area of 6, the perimeter is 3 + 4 + 5 = 12, and the law of cosines finds the angles as approximately 36.9°, 53.1°, and 90° — a right triangle, since 3² + 4² = 5².

Frequently asked questions

How are the angles calculated from just the three side lengths?
Through the law of cosines, a generalization of the Pythagorean theorem that works for any triangle, not just right triangles. It relates one angle to the lengths of all three sides, so applying it three times (once per angle, rotating which side is opposite) finds every angle without needing to measure anything.
What's the difference between equilateral, isosceles and scalene?
Equilateral means all three sides (and all three angles) are equal. Isosceles means exactly two sides are equal. Scalene means all three sides are different lengths. Every triangle falls into exactly one of these three categories.
How does this calculator check for a right triangle?
By testing the Pythagorean theorem directly: it sorts the three sides, treats the longest as the potential hypotenuse, and checks whether the square of that side equals the sum of the squares of the other two. If it does, the triangle has a 90-degree angle opposite the longest side.
Sources and method
  • Heron's formula, the law of cosines, and the Pythagorean theorem — general published mathematics.
Last reviewed: 19 Sep 2026 Sources last verified: 19 Sep 2026 Results use the assumptions explained on this page. Report an error How we check calculations

Related calculators