Solve any triangle by calculating missing sides, angles, area, perimeter and height using accurate geometry formulas including the Pythagorean theorem, law of sines, law of cosines and Heron's formula.
A triangle is fully determined by any three independent measurements that include at least one side. Use the Pythagorean theorem (a² + b² = c²) for right triangles, the law of cosines (c² = a² + b² − 2ab·cos C) when you know all three sides or two sides and the angle between them, and the law of sines (a/sin A = b/sin B = c/sin C) when you have a side paired with its opposite angle. Area comes from ½ × base × height, ½ab·sin C, or Heron's formula when only the three sides are known.
Sides are a, b, c. Each angle sits opposite the side with the same letter — angle A is opposite side a. Enter any 3 values including at least one side, then solve. Tap a preset to load a worked example.
| Property | Value |
|---|
A triangle is a closed plane figure bounded by three straight line segments. Those segments are the sides, the points where they meet are the vertices, and the amount of turn at each vertex is an interior angle. Three sides, three vertices, three angles — nothing simpler can enclose an area in flat Euclidean space, which is why the triangle sits at the base of so much mathematics, engineering and design.
Standard labelling matters more than most people expect, because every formula on this page depends on it. Vertices are named with capital letters A, B and C. Sides take the matching lower-case letter of the vertex opposite them: side a joins B to C, side b joins A to C, and side c joins A to B. Keep that pairing straight and the law of sines and law of cosines become almost mechanical. Mix it up and you get answers that look plausible but are wrong — the single most common source of error in triangle work.
Triangles are also uniquely rigid. Fix the three side lengths of a quadrilateral and you can still flex it into a different shape; fix the three sides of a triangle and the shape is locked. That property is the reason bridges, roof trusses, cranes, bicycle frames and tent poles are built from triangles rather than squares, and the reason a diagonal brace stiffens a wobbly gate.
Triangles are classified two ways at once — by the relationship between their sides and by their largest angle. Every triangle carries one label from each column. A triangle with sides 5, 5 and 7, for example, is both isosceles and acute.
| By sides | Definition | By angles | Definition |
|---|---|---|---|
| Equilateral | All three sides equal, so all three angles are exactly 60° | Acute | All three angles smaller than 90° |
| Isosceles | Two sides equal; the two angles opposite them are equal | Right | One angle exactly 90°; the side opposite it is the hypotenuse |
| Scalene | All three sides different, so all three angles differ too | Obtuse | One angle larger than 90°; the other two must be acute |
Two consequences follow immediately. An equilateral triangle is always acute, because its angles are fixed at 60°. And a triangle can have at most one right or obtuse angle — two angles of 90° would already use the entire 180° budget, leaving nothing for the third.
A handful of triangles turn up again and again in classrooms and on job sites, because their sides or angles work out to convenient whole numbers. Enter any of them in the calculator above to see the full solution.
| Triangle | Sides | Angles | Type |
|---|---|---|---|
| 3-4-5 | 3, 4, 5 | 36.87°, 53.13°, 90° | Right, scalene — the builder's set-out triangle |
| 5-12-13 | 5, 12, 13 | 22.62°, 67.38°, 90° | Right, scalene |
| 8-15-17 | 8, 15, 17 | 28.07°, 61.93°, 90° | Right, scalene |
| 7-24-25 | 7, 24, 25 | 16.26°, 73.74°, 90° | Right, scalene |
| Equilateral | All three equal | 60°, 60°, 60° | Acute — area = (√3/4)a² |
| 45-45-90 | 1, 1, √2 | 45°, 45°, 90° | Right, isosceles — half a square |
| 30-60-90 | 1, √3, 2 | 30°, 60°, 90° | Right, scalene — half an equilateral triangle |
Four rules govern every triangle in plane geometry, and they are worth knowing by heart because they let you sanity-check any calculation.
An interior angle sits inside the triangle at a vertex. Its exterior angle is the supplementary angle formed by extending one of the sides through that vertex, so interior + exterior = 180° at each corner. Because the interiors add to 180°, the three exterior angles add to 360° — the same total as walking all the way around any convex polygon.
Solving a triangle means finding all six measurements — three sides and three angles — from three known values. Which formula you reach for depends entirely on which three you were given. The five standard configurations are named for the order in which sides (S) and angles (A) appear around the triangle.
| Given | Meaning | Method to use | Solutions |
|---|---|---|---|
| SSS | All three sides | Law of cosines for each angle | Exactly one, if the triangle inequality holds |
| SAS | Two sides and the angle between them | Law of cosines for the third side, then finish with angles | Exactly one |
| ASA | Two angles and the side between them | Angle sum, then law of sines | Exactly one |
| AAS | Two angles and a side not between them | Angle sum, then law of sines | Exactly one |
| SSA | Two sides and an angle not between them | Law of sines — check the ambiguous case | Zero, one or two |
| AAA | Three angles only | Not solvable for size | Infinitely many similar triangles |
AAA is the one combination that cannot be solved. Three angles fix the shape but say nothing about scale, so a 30-60-90 triangle the size of a postage stamp and one the size of a paddock satisfy identical data. That is why the calculator above insists on at least one side length.
There are three formulas worth knowing, and the right one depends on what you have measured rather than on what kind of triangle it is.
Perimeter is the distance around the outside, so it is simply the sum of the three sides: P = a + b + c. For an equilateral triangle that shortens to P = 3a, and for an isosceles triangle with equal sides a and base b, P = 2a + b. The semi-perimeter s = P/2 appears in both Heron's formula and the inradius formula, which is why the calculator reports it.
A right triangle contains one 90° angle. The two sides forming that angle are the legs; the side opposite it is the hypotenuse, always the longest side. Right triangles get a shortcut because you already know one angle, so two more measurements are enough to solve everything.
Certain whole-number side sets satisfy the theorem exactly and turn up constantly in textbooks and on building sites. They are called Pythagorean triples.
| Triple | Check | Where you see it |
|---|---|---|
| 3, 4, 5 | 9 + 16 = 25 | Squaring up formwork and wall frames (the 3-4-5 method) |
| 5, 12, 13 | 25 + 144 = 169 | Standard textbook exercises |
| 8, 15, 17 | 64 + 225 = 289 | Surveying and site layout |
| 7, 24, 25 | 49 + 576 = 625 | Trigonometry practice |
| 9, 40, 41 | 81 + 1600 = 1681 | Larger set-outs |
Any multiple of a triple is also a triple, so 6-8-10 and 30-40-50 work just as well as 3-4-5. Builders use exactly that scaling to check a corner is square over a longer run.
Heron's formula is the tool for the situation where you can measure distances but not angles — a surveyed block of land, a sail, a triangular panel. It needs nothing but the three side lengths and works for every triangle regardless of type.
The law of sines links each side to the sine of the angle opposite it, and all three ratios are equal. That shared ratio also equals the diameter of the triangle's circumscribed circle. Use it whenever you have a complete side-and-opposite-angle pair, which covers ASA and AAS after the angle sum gives the third angle, plus SSA.
SSA is the one configuration that can misbehave, because the sine function returns the same value for an angle and its supplement — sin 50° and sin 130° are identical. When the side opposite the known angle is shorter than the other given side, both the acute and the obtuse answer can produce a genuine triangle, so there are two valid solutions.
Two other outcomes are possible. If sin B works out greater than 1, no triangle exists at all. And if the side opposite the known angle is the longer of the two, only the acute solution survives, giving a single triangle. The calculator above detects all three outcomes and reports the second triangle whenever one exists.
The law of cosines generalises the Pythagorean theorem to triangles that are not right-angled. It appears in three interchangeable forms, one per side, and rearranges to give any angle from three known sides.
Every triangle has three heights, one perpendicular to each side. Once the area is known, each height falls straight out of the base-height formula rearranged.
Two special cases are worth remembering. In a right triangle each leg is already the height for the other leg as the base. And in an obtuse triangle, the heights to the two shorter sides land outside the triangle, which is perfectly valid even though it looks odd sketched on paper.
The calculator also reports two radii that come up in engineering and competition geometry. The inradius r = Area / s is the radius of the largest circle that fits inside the triangle, touching all three sides. The circumradius R = abc / (4 × Area) is the radius of the circle through all three vertices.
For an equilateral triangle of side a these simplify neatly: r = a / (2√3) and R = a / √3, so the circumradius is always exactly twice the inradius. Related centres include the centroid, where the three medians meet and a uniform triangular plate balances, and the orthocentre, where the three altitudes meet.
A ladder reaches 5.6 m up a wall with its base 2.1 m out. The ladder is the hypotenuse: c = √(5.6² + 2.1²) = √35.77 ≈ 5.98 m. Its angle to the ground is arctan(5.6 / 2.1) ≈ 69.4°.
An isosceles triangle has an apex angle of 40°, so the two base angles share what is left: (180° − 40°) / 2 = 70° each. If the equal sides are 13 cm and the base is 10 cm, the height splits the base in half, giving h = √(13² − 5²) = √144 = 12 cm and an area of ½ × 10 × 12 = 60 cm².
Use Area = (√3 / 4) × a². For a = 10, that is 0.43301 × 100 = 43.301 square units. Heron's formula gives the same answer with more arithmetic.
A roof with a 22.5° pitch spans a half-width (run) of 4.2 m. The rise is 4.2 × tan 22.5° ≈ 1.74 m and the rafter length is 4.2 / cos 22.5° ≈ 4.546 m before any overhang. Enter b = 4.2, A = 22.5 and B = 90 in the calculator above to reproduce it.
| Mistake | Why it goes wrong | How to avoid it |
|---|---|---|
| Pairing the wrong side with an angle | The law of sines needs a side and the angle opposite it, not an adjacent one | Confirm side a faces angle A before substituting |
| Using Pythagoras on a non-right triangle | a² + b² = c² only holds when one angle is exactly 90° | Switch to the law of cosines for every other triangle |
| Calculator left in radian mode | sin 30° = 0.5, but sin 30 radians = −0.988 | Check the DEG indicator; this calculator always uses degrees |
| Missing the second SSA triangle | Arcsine only ever returns the acute answer | When the side opposite the known angle is shorter, test 180° − B too |
| Using a slanted side as the height | The height must be perpendicular to the chosen base | Use ½ab·sin C or Heron's formula instead of guessing a height |
| Forgetting to halve the perimeter | Heron's formula needs s = P/2, not P | Write s down as a separate step every time |
| Rounding partway through | Early rounding compounds through later steps | Keep full precision until the final answer, then round once |
| Mixing units | Metres and centimetres in the same triangle | Convert everything to one unit first |
A + B + C = 180°a + b > c for every pairingP = a + b + c | Semi-perimeter: s = P / 2½ × b × h½ab·sin C√(s(s−a)(s−b)(s−c))(√3 / 4)a²h = 2 × Area / basea² + b² = c²a/sin A = b/sin B = c/sin Cc² = a² + b² − 2ab·cos Ccos C = (a² + b² − c²) / 2abr = Area / s | Circumradius: R = abc / (4 × Area)
1) 180° − 47° − 68° = 65° 2) ½ × 14 × 9 = 63 cm² 3) 3 × 6.5 = 19.5 m 4) √(81 + 144) = 15 5) (180° − 40°) / 2 = 70° each
1) s = 21, Area = √(21 × 8 × 7 × 6) = 84 square units 2) c² = 81 + 144 − 216·cos 58° = 110.54, so c ≈ 10.514; Area = ½ × 9 × 12 × sin 58° ≈ 45.795 3) cos = (36 + 81 − 169) / 108 = −0.48148 → 118.782°, scalene and obtuse 4) sin B = 11 × sin 36° / 8 = 0.80820 → B = 53.921° or 126.079°; since a < b and both angle sums stay under 180°, two triangles exist 5) s = 24, Area = 84, height = 2 × 84 / 21 = 8
How do you calculate a triangle?
Start with what you know. If you have all three sides, use the law of cosines to find the angles. If you have two sides and the angle between them, use the law of cosines to find the third side. If you have two angles and any side, subtract from 180° for the third angle and use the law of sines for the remaining sides. Once every side and angle is known, the perimeter is a + b + c and the area comes from Heron's formula or ½ab·sin C.
How do you find the missing side of a triangle?
In a right triangle, rearrange the Pythagorean theorem: c = √(a² + b²) for the hypotenuse, or a = √(c² − b²) for a leg. In any other triangle, use the law of cosines if you know the other two sides and the angle between them, or the law of sines if you already have a side paired with its opposite angle.
How do you calculate triangle area?
Three formulas cover every situation. With a base and its perpendicular height, Area = ½ × base × height. With two sides and the angle between them, Area = ½ab·sin C. With all three sides, use Heron's formula: s = (a+b+c)/2, then Area = √(s(s−a)(s−b)(s−c)). For an equilateral triangle there is a shortcut: Area = (√3/4)a².
What is Heron's formula?
Heron's formula finds the area of any triangle from its three side lengths alone, with no angles or heights needed. First calculate the semi-perimeter s = (a+b+c)/2, then Area = √(s(s−a)(s−b)(s−c)). For sides 7, 8 and 9: s = 12, so Area = √(12 × 5 × 4 × 3) = √720 ≈ 26.833 square units. It is the standard method for surveyed land and any triangle where only distances were measured.
How do you find triangle angles?
If you know two angles, the third is 180° minus their sum. If you know all three sides, use the rearranged law of cosines: cos A = (b² + c² − a²) / 2bc, then take the inverse cosine. If you have a side paired with its opposite angle plus one more side, use the law of sines — but remember that arcsine returns only the acute answer, so check whether an obtuse solution also fits.
What is the Pythagorean theorem?
For a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c², where c is the side opposite the 90° angle. It applies only to right triangles. Comparing c² with a² + b² also classifies any triangle: equal means right-angled, smaller means acute, larger means obtuse.
What is the law of cosines?
The law of cosines states c² = a² + b² − 2ab·cos C, relating all three sides to one angle. Use it when you know two sides and the angle between them (SAS) or all three sides (SSS). It works for every triangle, and because cos 90° = 0 it reduces exactly to the Pythagorean theorem when one angle is a right angle.
What is the law of sines?
The law of sines states a/sin A = b/sin B = c/sin C — each side divided by the sine of its opposite angle gives the same ratio, which equals the diameter of the circumscribed circle. Use it for two angles and a side (ASA or AAS), or two sides and a non-included angle (SSA, where two triangles may be possible).
How do you solve a right triangle?
You already know one angle is 90°, so two more values are enough. Given both legs, find the hypotenuse with Pythagoras and the angles with arctan(opposite/adjacent). Given one leg and the hypotenuse, find the other leg with Pythagoras and the angles with arcsine or arccosine. Given one side and one acute angle, use sine, cosine or tangent, and the remaining acute angle is 90° minus the known one.
How do you calculate triangle perimeter?
Add the three sides: P = a + b + c. For an equilateral triangle P = 3a, and for an isosceles triangle with equal sides a and base b, P = 2a + b. If a side is missing, solve for it first with Pythagoras or the law of cosines, then add.
Can a triangle have two right angles?
No. Two right angles already account for the full 180° that the interior angles must total, leaving nothing for the third angle — the two lines would be parallel and never meet. For the same reason a triangle can never have two obtuse angles, or one right angle plus one obtuse angle. At most one angle can be 90° or more.
What are the types of triangles?
By sides: equilateral (all three equal, all angles 60°), isosceles (two equal, with equal base angles) and scalene (all different). By angles: acute (all under 90°), right (one exactly 90°) and obtuse (one over 90°). Every triangle carries one label from each group — for example 5, 5, 7 is isosceles and acute.
What is the ambiguous SSA case?
When you know two sides and an angle that is not between them, two different triangles can satisfy the data, because sin θ and sin(180° − θ) are equal. If the side opposite the known angle is shorter than the other given side, check both the acute and obtuse solutions. If the sine calculation exceeds 1, no triangle exists. The calculator on this page flags a second solution whenever one is possible.
How do you find the height of a triangle?
Rearrange the area formula: h = 2 × Area / base. Find the area first — Heron's formula works from three sides — then divide. Every triangle has three heights, one perpendicular to each side, so a shorter base always pairs with a taller height. In a right triangle, each leg is already the height for the other leg.
Why can't a triangle be solved from three angles alone?
Three angles fix the shape but not the size. A 30-60-90 triangle a centimetre across and one a kilometre across have identical angles, so infinitely many similar triangles fit the same data. At least one side length is required to set the scale, which is why this calculator asks for one.
What units does this triangle calculator use?
The calculator is unit-agnostic for lengths: enter millimetres, centimetres, metres or inches and the sides, perimeter and heights come back in the same unit, with areas in that unit squared. The only requirement is consistency — never mix metres and centimetres in one triangle. Angles are always in degrees, not radians.