Triangle Calculator
From three sides
Area
- Perimeter
- Angle A
- °
- Angle B
- °
- Angle C
- °
- By angles
- By sides
Right triangle hypotenuse
Hypotenuse
- Area
- Perimeter
- Angle A
- °
- Angle B
- °
Area from base and height
Area
Your inputs are saved in the address. Bookmark the page (Ctrl+D) to come back to them.
Three side lengths fix a triangle completely: its area, perimeter and every angle. Enter them in the first calculator to also see whether the triangle is acute, right or obtuse, and whether it is equilateral, isosceles or scalene.
Below it you can find the hypotenuse of a right triangle from its two legs, or the area of any triangle from a base and its height. Use any length unit you like; the area comes out in that unit squared.
How it works
The area from three sides a, b and c uses Heron's formula. With the semi-perimeter s = (a + b + c) ÷ 2, area = √(s(s − a)(s − b)(s − c)). The calculator evaluates the equivalent form ¼ × √((a+b+c)(−a+b+c)(a−b+c)(a+b−c)), which stays accurate for very flat triangles.
Angles come from the law of cosines: the angle A opposite side a satisfies cos A = (b² + c² − a²) ÷ (2bc). If the longest side squared equals the sum of the other two squared, the triangle is right; if it is smaller, acute; if larger, obtuse. Angles A, B and C sit opposite sides a, b and c.
Three lengths only make a triangle when the longest is shorter than the other two combined (the triangle inequality). Lengths such as 1, 2 and 3 fail it, and the calculator shows a range error instead of a result.
For a right triangle the Pythagorean theorem c² = a² + b² gives the hypotenuse, and the area is half the product of the legs. Any triangle's area is base × height ÷ 2 when the height is measured at right angles to that base.
Lengths are computed with exact decimal arithmetic and angles with an arctangent series at 60-digit precision. Results are rounded to two decimal places only for display.
Worked examples
- From three sides
A triangle with sides 3, 4 and 5 has an area of 6 and a perimeter of 12. Its angles are A = 36.87°, B = 53.13° and C = 90°. Type by angles: Right; by sides: Scalene. - From three sides
A triangle with sides 5, 7 and 8 has an area of 17.32 and a perimeter of 20. Its angles are A = 38.21°, B = 60° and C = 81.79°. Type by angles: Acute; by sides: Scalene. - Right triangle hypotenuse
A right triangle with legs 5 and 12 has a hypotenuse of 13, an area of 30 and a perimeter of 30. Its acute angles are 22.62° and 67.38°. - Area from base and height
A triangle with a base of 12 and a height of 9 has an area of 54.
Reference table
| Leg a \ Leg b | 1 | 2 | 4 | 5 | 8 | 12 | 15 |
|---|---|---|---|---|---|---|---|
| 1 | 1.41 | 2.24 | 4.12 | 5.1 | 8.06 | 12.04 | 15.03 |
| 3 | 3.16 | 3.61 | 5 | 5.83 | 8.54 | 12.37 | 15.3 |
| 5 | 5.1 | 5.39 | 6.4 | 7.07 | 9.43 | 13 | 15.81 |
| 6 | 6.08 | 6.32 | 7.21 | 7.81 | 10 | 13.42 | 16.16 |
| 8 | 8.06 | 8.25 | 8.94 | 9.43 | 11.31 | 14.42 | 17 |
| 10 | 10.05 | 10.2 | 10.77 | 11.18 | 12.81 | 15.62 | 18.03 |
| 12 | 12.04 | 12.17 | 12.65 | 13 | 14.42 | 16.97 | 19.21 |
Reference table
| Base \ Height | 3 | 5 | 6 | 7 | 9 | 10 |
|---|---|---|---|---|---|---|
| 2 | 3 | 5 | 6 | 7 | 9 | 10 |
| 4 | 6 | 10 | 12 | 14 | 18 | 20 |
| 5 | 7.5 | 12.5 | 15 | 17.5 | 22.5 | 25 |
| 6 | 9 | 15 | 18 | 21 | 27 | 30 |
| 8 | 12 | 20 | 24 | 28 | 36 | 40 |
| 10 | 15 | 25 | 30 | 35 | 45 | 50 |
FAQ
Why do I get a range error for my three sides?
If the longest side is as long as, or longer than, the other two together, the sides cannot close into a triangle. For example 2, 3 and 6 fail because 2 + 3 = 5 is less than 6.
My right triangle shows 89.99° and is called acute. Why?
The side lengths were rounded. With 1, 1 and 1.414, 1.414² = 1.999396 is slightly less than 1² + 1², so mathematically the triangle is acute. If you know the two legs exactly, use the hypotenuse calculator instead.
Which angle is A, B or C?
Angle A is the angle opposite side a. Likewise B is opposite side b and C is opposite side c. The three angles always add up to 180°.
How do I find the area without the height?
With all three side lengths you do not need the height: Heron's formula gives the area directly. Use the first calculator.
Which unit should I use for the sides?
Any unit, as long as all sides use the same one. Enter centimeters and the perimeter is in cm and the area in cm². Angles do not depend on the unit.