Triangle calculator
Area, perimeter, angles, heights, medians, and the inradius and circumradius of a triangle from its three side lengths.
Triangle results
Area
-
Enter three sides
- Perimeter
- -
- Angle A
- -
- Angle B
- -
- Angle C
- -
- Inradius
- -
- Circumradius
- -
| From side | Height | Median |
|---|---|---|
| a | - | - |
| b | - | - |
| c | - | - |
How it works
A triangle is a three-sided polygon whose area can be computed from its three side lengths using Heron's formula, without needing to know any of its angles.
- Enter three sides
Any positive lengths, in any consistent unit.
- Check they form a triangle
Each side must be shorter than the sum of the other two.
- Read the results
Area, angles, type, heights, medians, inradius and circumradius all update as you type.
Heron's formula and the law of cosines
First calculate the semi-perimeter, s, half the perimeter. Then the area is the square root of s times s minus each side in turn.
s = (a + b + c) / 2, Area = √(s(s−a)(s−b)(s−c))
For sides 5, 6, 7: s = 9, Area = √(9 × 4 × 3 × 2) = √216 ≈ 14.70 square units.
Angles come from the law of cosines: cos(A) = (b² + c² − a²) / (2bc), then arccos gives A. The same formula applies cyclically for B and C. For sides 5, 6, 7: cos(A) = (36 + 49 − 25) / 84 ≈ 0.714, so A ≈ 44.4°.
Triangle types
- By sides: equilateral (all three sides equal), isosceles (two sides equal), scalene (all sides different).
- By angles: acute (all angles under 90°), right (one angle exactly 90°), obtuse (one angle over 90°).
Inradius and circumradius
The inradius is the radius of the largest circle that fits inside the triangle: r = Area / s. The circumradius is the radius of the circle passing through all three vertices: R = abc / (4 × Area).
The triangle inequality
The sum of any two sides must be greater than the third side. If this rule is broken, for example sides 1, 2 and 10, where 1 plus 2 is less than 10, no real triangle exists, and the calculator marks the sides invalid instead of showing a wrong area.
Frequently asked questions
How does the triangle calculator find angles from three side lengths?
It uses the law of cosines: cos(A) = (b² + c² − a²) / (2bc), then takes arccos to find angle A. The same formula is applied cyclically for angles B and C. For sides 5, 6, 7: cos(A) = (36 + 49 − 25) / 84 ≈ 0.714, so A ≈ 44.4°.
What is Heron's formula for the area of a triangle?
Heron's formula computes area from three sides without needing a height. First calculate s = (a + b + c)/2, the semi-perimeter, then Area = √(s(s−a)(s−b)(s−c)). For sides 5, 6, 7: s = 9, Area = √(9 × 4 × 3 × 2) = √216 ≈ 14.70 square units.
What triangle types can the calculator identify?
The calculator identifies the type based on sides and angles: equilateral (all sides equal), isosceles (two sides equal), scalene (all sides different), right (one 90° angle), acute (all angles under 90°), and obtuse (one angle over 90°). Sides 5, 6, 7 form a scalene acute triangle.
What is the triangle inequality, and what happens if my sides violate it?
The triangle inequality states that the sum of any two sides must be greater than the third side (a + b > c, and so on). If this rule is violated, for example sides 1, 2, 10, where 1 + 2 < 10, no real triangle exists. The calculator marks the sides invalid instead of producing a wrong result.
What are the inradius and circumradius of a triangle?
The inradius is the radius of the largest circle that fits inside the triangle: r = Area/s where s is the semi-perimeter. The circumradius is the radius of the circle passing through all three vertices: R = abc/(4 × Area). Both are shown by the calculator along with the heights and medians from each side.