Math
Triangle calculator
Give any three of a triangle's six parts, at least one of them a side, and this calculator reports everything else: area, perimeter, all three angles, whether it is scalene, isosceles or equilateral, acute, right or obtuse, and the heights, medians, inradius and circumradius.
Enter any three values, at least one of them a side, and leave the rest blank.
| Side / opposite angle | Length | Angle | Height onto side | Median to side | Angle bisector |
|---|---|---|---|---|---|
| a / A | 5 cm | 44.4153° | 5.87878 cm | 6.0208 cm | 5.98222 cm |
| b / B | 6 cm | 57.1217° | 4.89898 cm | 5.2915 cm | 5.12348 cm |
| c / C | 7 cm | 78.463° | 4.19913 cm | 4.272 cm | 4.22507 cm |
Show the working, step by step
Three sides (SSS): find two angles with the law of cosines, then the third from the 180° sum.
cos A = (b² + c² − a²) ÷ 2bc = (36 + 49 − 25) ÷ 84 → A = 44.4153° cos B = (a² + c² − b²) ÷ 2ac = (25 + 49 − 36) ÷ 70 → B = 57.1217° C = 180° − 44.4153° − 57.1217° = 78.463°
Area from two sides and the angle between them (Heron gives the same).
Area = ½ab sin C = ½ × 5 × 6 × sin 78.463° = 14.6969 cm²
Heights: each is twice the area divided by the side it stands on.
h_a = 2 × 14.6969 ÷ 5 = 5.87878
Medians join a vertex to the midpoint of the opposite side.
m_a = ½√(2b² + 2c² − a²) = ½√(72 + 98 − 25) = 6.0208
Inradius is area over semi-perimeter; circumradius is abc over four times the area.
r = 14.6969 ÷ 9 = 1.63299 R = 210 ÷ (4 × 14.6969) = 3.57217
Classify.
sides: scalene; largest angle 78.463° → acute
Solved as SSS.
Naming the parts
The corners are A, B and C, and each side takes the lower-case letter of the corner opposite it: side a is opposite angle A, and so on. So side a joins B and C. Keeping that convention is what lets the law of sines and the law of cosines work without confusion.
The formulas behind the results
Area = ½ab sin C = √(s(s − a)(s − b)(s − c)), s = (a + b + c) ÷ 2
Law of cosines: c² = a² + b² − 2ab cos C Law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C = 2R
Height onto a: hₐ = 2 × Area ÷ a Median to a: mₐ = ½√(2b² + 2c² − a²)
Inradius r = Area ÷ s Circumradius R = abc ÷ (4 × Area)
A worked example
The calculator opens on a triangle with sides a = 5, b = 6 and c = 7 cm.
- Perimeter 5 + 6 + 7 = 18 cm, so s = 9.
- Area by Heron: √(9 × 4 × 3 × 2) = √216 = 14.6969 cm².
- Angles by the law of cosines: cos A = (36 + 49 − 25) ÷ 84 = 0.714286, so A = 44.415°. Likewise B = 57.122° and C = 180° − 44.415° − 57.122° = 78.463°.
- No two sides are equal, so it is scalene; the largest angle is under 90°, so it is acute.
- Heights: 2 × 14.6969 divided by each side gives 5.87878, 4.89898 and 4.19913 cm.
- Medians: mₐ = ½√(2 × 36 + 2 × 49 − 25) = ½√145 = 6.02080 cm; the medians to b and c are 5.29150 and 4.27200 cm.
- Inradius 14.6969 ÷ 9 = 1.63299 cm; circumradius 210 ÷ (4 × 14.6969) = 3.57217 cm.
Types of triangle
| By sides | Meaning | By angles | Meaning |
|---|---|---|---|
| Equilateral | all three sides equal (all angles 60°) | Acute | every angle under 90° |
| Isosceles | two sides equal (and the two angles opposite them) | Right | one angle exactly 90° |
| Scalene | no two sides equal | Obtuse | one angle over 90° |
Every triangle has one label from each column: the 3–4–5 triangle is scalene and right, and a triangle with sides 1, 1 and √2 is a right isosceles triangle. An equilateral triangle is always acute.
When the values do not make a triangle
Three sides only close up if the longest is shorter than the other two added together: 1, 2 and 5 cannot meet. Two angles must leave something for the third, so they must add up to less than 180°. With SSA, the side opposite the given angle may be too short to reach the base, or it may reach it twice. The calculator says which of these has happened rather than returning a wrong answer.
Rounding matters when angles come from measurements. If you type all three angles of a real triangle as well as a side, they will rarely add to exactly 180°, so give three values only and let the calculator derive the rest.
Common questions
What is the minimum information needed to work out a triangle?
Three measurements, at least one of which is a side: three sides (SSS), two sides and the angle between them (SAS), two angles and any side (ASA or AAS), or two sides and an angle that is not between them (SSA). Three angles alone are not enough, because every enlargement of the triangle has the same angles. Enter your three values above and leave the rest blank.
What is the difference between the inradius and the circumradius?
The incircle is the largest circle that fits inside the triangle, touching all three sides; its radius is r = area ÷ semi-perimeter. The circumcircle passes through all three corners; its radius is R = abc ÷ (4 × area). For the 5–6–7 triangle, r = 1.63299 and R = 3.57217. R is always at least twice r, with equality only for an equilateral triangle (Euler's inequality).
How can I tell if a triangle is acute, right or obtuse from its sides?
Compare the square of the longest side c with the sum of the squares of the other two. If c² = a² + b², the triangle is right-angled (Pythagoras). If c² < a² + b², every angle is acute; if c² > a² + b², the angle opposite c is obtuse. For 5, 6, 7: 49 < 25 + 36 = 61, so the triangle is acute.
What is the difference between a median, an altitude and an angle bisector?
All three run from a corner to the opposite side. The altitude (height) meets that side at a right angle. The median meets it at its midpoint. The angle bisector splits the corner angle in half. They coincide only in an isosceles triangle, on its line of symmetry. The three medians cross at the centroid, the triangle's balance point, two thirds of the way along each median.
Why does the calculator say there are two triangles?
That is the ambiguous case: two sides and an angle that is not between them (SSA). The side opposite the angle can swing to meet the base line in two places, giving one triangle with an acute angle and one with an obtuse angle. This page shows the first and lists the other. The triangle solver sets out both solutions side by side.
Related calculators
-
Triangle solver
SSS, SAS, ASA, AAS and SSA solutions, with the ambiguous case in full.
-
Area calculator
Triangle area by base and height, Heron's formula or SAS.
-
Sine calculator
Sine of any angle, and the law of sines.
-
Polygon calculator
Regular polygons, and any polygon from coordinates.