Triangle Calculator
Choose what you know about the triangle and get its area, perimeter, angles and classification.
Inputs
Area
84 cm²
Lengths are in cm, so the area is in cm².
- Perimeter
- 42 cm
- Semi-perimeter (s)
- 21 cm
- Angle A
- 53.1301°
- Angle B
- 59.4898°
- Angle C
- 67.3801°
- By sides
- Scalene (no equal sides)
- By angles
- Acute (all angles under 90°)
Drag to pan. Ctrl + scroll, pinch or + / - to zoom.
Step-by-step solution
Check the triangle inequality: the longest side must be shorter than the other two added together.
15 < 14 + 13 = 27
Find the semi-perimeter.
s = (a + b + c) / 2 = (13 + 14 + 15) / 2 = 21
Apply Heron's formula.
Area = √(s(s − a)(s − b)(s − c)) = √(21 × 8 × 7 × 6) = √7056 = 84 cm²
Find angle A with the law of cosines.
A = cos⁻¹((b² + c² − a²) / (2bc)) = cos⁻¹((14² + 15² − 13²) / (2 × 14 × 15)) = 53.1301°
Find angle B the same way.
B = cos⁻¹((a² + c² − b²) / (2ac)) = cos⁻¹((13² + 15² − 14²) / (2 × 13 × 15)) = 59.4898°
The angles of a triangle add up to 180°, so C is what remains.
C = 180° − 53.1301° − 59.4898° = 67.3801°
Formulas used
Area = √(s(s − a)(s − b)(s − c)) Heron's formula, with s = (a + b + c) / 2
Area = (base × height) / 2 when the height is known
c² = a² + b² − 2ab cos(C) law of cosines, for the third side
Area = ½ ab sin(C) two sides and the angle between them
a² + b² = c² Pythagorean theorem, right triangles only
- a, b, c
- the side lengths
- A, B, C
- the angles, each opposite the side with the same letter
- s
- the semi-perimeter, half the perimeter
The mode you pick decides which formulas run, and the step-by-step panel shows only those. Angles in the three-sides mode come from the law of cosines, so no angle needs to be given.
Triangles with vertices on a coordinate grid fit here too. Measure each side with the distance calculator and enter the three lengths in the first mode.
Which input mode to use
| You know | You get |
|---|---|
| Three sides | Area, perimeter, all three angles, classification |
| Two sides and the angle between them | Third side, area, perimeter, remaining angles |
| Base and height | Area only |
| Two sides of a right triangle | Missing side, area, perimeter, acute angles |
Worked example: the 13-14-15 triangle
Sides 13, 14 and 15.
s = (13 + 14 + 15) / 2 = 21
Area = √(21 × 8 × 7 × 6) = √7056 = 84
cos A = (14² + 15² − 13²) / (2 × 14 × 15) = 252/420 = 0.6
A = cos⁻¹(0.6) ≈ 53.13°
This triangle is a good test because its area is a whole number. As a check, use the other area formula: with sides 14 and 15 around angle A, ½ × 14 × 15 × sin(53.13°) = 105 × 0.8 = 84. Both routes agree.
Angles B and C come out as about 59.49° and 67.38°, which add up to 180° with A. All three are under 90°, so the triangle is acute, and no two sides match, so it is scalene.
How triangles are classified
By sides
- Equilateral: all three sides equal, so every angle is 60°.
- Isosceles: exactly two sides equal, and the angles opposite them are equal.
- Scalene: no two sides equal.
By angles
- Acute: all angles below 90°.
- Right: one angle of exactly 90°, which happens when a² + b² = c².
- Obtuse: one angle above 90°, which happens when a² + b² < c².
Computers store most decimals with tiny rounding errors, so testing two lengths for exact equality is unreliable. The calculator treats lengths as equal when they differ by less than one part in a billion. A 3-4-5 triangle is therefore recognised as right-angled, and rounding noise left over from earlier arithmetic cannot turn an isosceles triangle into a scalene one.
Triangles with familiar side lengths
The first four rows are right triangles whose sides are whole numbers, known as Pythagorean triples. The 6, 6, 6 row is equilateral and acute. The 5, 5, 8 row is isosceles, and with 2, 3, 4 it shows that a triangle can be obtuse whether or not any sides are equal.
| Sides | Area (square units) | Perimeter (units) | By sides | By angles |
|---|---|---|---|---|
| 3, 4, 5 | 6 | 12 | Scalene (no equal sides) | Right (one angle of 90°) |
| 5, 12, 13 | 30 | 30 | Scalene (no equal sides) | Right (one angle of 90°) |
| 8, 15, 17 | 60 | 40 | Scalene (no equal sides) | Right (one angle of 90°) |
| 7, 24, 25 | 84 | 56 | Scalene (no equal sides) | Right (one angle of 90°) |
| 6, 6, 6 | 15.5885 | 18 | Equilateral (3 equal sides) | Acute (all angles under 90°) |
| 5, 5, 8 | 12 | 18 | Isosceles (2 equal sides) | Obtuse (one angle over 90°) |
| 2, 3, 4 | 2.9047 | 9 | Scalene (no equal sides) | Obtuse (one angle over 90°) |
Frequently asked questions
What is the triangle inequality?
Three lengths can only form a triangle if each one is shorter than the other two added together. Sides of 1, 2 and 5 fail, because 1 + 2 is less than 5, so the short sides could never reach each other. If the longest side equals the sum of the others, the triangle flattens into a straight line and has zero area, so the calculator rejects that case as well.
Why must the angle in SAS be between the two sides?
The law of cosines, c² = a² + b² − 2ab cos(C), uses the angle formed by sides a and b, which is the one opposite the unknown side. If the angle is not between the two known sides, the problem is a different one (SSA) and can have two solutions, one, or none. This calculator only handles the included-angle case.
Can I enter the angle in radians?
No, angles are in degrees. To convert from radians, multiply by 180 and divide by π. The included angle must be greater than 0° and less than 180°.
Why does base and height only give the area?
Many different triangles share the same base and height. Slide the top vertex sideways along a line parallel to the base and the height stays the same, as does the area, while the other two sides and all the angles change. So this mode reports the area and nothing else, and the drawing makes no claim about the slanted sides.
Which side is the hypotenuse in the right-triangle mode?
The hypotenuse is the longest side, opposite the right angle, and it is labelled c. If you enter a leg and the hypotenuse, the hypotenuse must be longer than the leg, or no right triangle exists.
What units does the area use?
Square units of whatever length unit you typed. Sides in centimetres give an area in square centimetres. Angles are always in degrees.
I have the coordinates of the three corners. What do I enter?
Find each side length with the distance calculator, then enter the three lengths in "Three sides" mode.