Triangle Calculator
Solve triangles — find sides, angles, area, and perimeter.
Related calculators
About
Triangle Calculator
A triangle is a polygon with three vertices. A vertex is a point where two or more curves, lines or edges meet; in a triangle the three vertices are joined by three line segments called edges. A triangle is usually referred to by its vertices, so a triangle with vertices a, b and c is written Δabc.
Triangles are described both by the length of their sides and by their internal angles. A triangle whose three sides are the same length is equilateral, one with two equal sides is isosceles, and one with no two sides equal is scalene.
Tick marks on an edge are the usual notation for side length: the same number of ticks means the same length. Concentric arcs at a vertex do the same job for angles. Side lengths and internal angles are directly related, which is why an equilateral triangle also has three equal angles of 60° each.
The small diagram beside the input boxes is a schematic and is not drawn to scale. It just shows which box belongs to which side or angle. The drawing in the results is different: it is built from the solved triangle, so it changes shape as you type and an obtuse triangle really does lean out past its base.
Right, obtuse and acute
Classified by their internal angles, triangles fall into two groups: right or oblique. A right triangle has one angle of exactly 90°, marked with a small square at that vertex. Its longest edge, the one opposite the right angle, is the hypotenuse.
Any triangle that is not a right triangle is oblique, and an oblique triangle is either obtuse or acute. An obtuse triangle has one angle greater than 90°. An acute triangle has all three angles below it. The calculator names the triangle both ways at once, so 3, 4, 5 comes back as a right scalene triangle and 1, 1, 1 as equilateral.
Triangle facts, theorems and laws
- No triangle can have more than one angle of 90° or greater. Two right angles already use up the full 180°, leaving nothing for the third.
- The interior angles always add to 180°. An exterior angle equals the sum of the two interior angles not adjacent to it, which is the same as subtracting the angle at that vertex from 180°.
- Any two sides added together are longer than the third. This is the triangle inequality, and it is what the calculator checks before accepting three side lengths. Enter 1, 2, 9 and nothing closes.
- Sides and angles are ranked together: the longest side sits opposite the largest angle, and the shortest opposite the smallest.
Pythagorean theorem
The Pythagorean theorem applies to right triangles only. For any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. It follows that any triangle whose sides satisfy the condition is a right triangle. Where a and b are the two shorter sides and c is the hypotenuse:
Given a = 3 and c = 5, find b: 9 + b² = 25, so b² = 16 and b = 4.
Some right triangles come up often enough to be worth memorising. The 30-60-90 triangle has sides in the ratio 1 : √3 : 2, so a short side of 1 gives 1.73205 and 2. The 45-45-90 triangle has two equal legs and a hypotenuse √2 times as long, 1.41421 for legs of 1. The 3-4-5 triangle and its multiples, 6-8-10 and 9-12-15, are right triangles with whole-number sides.
Law of sines
The ratio of a side to the sine of its opposite angle is the same for all three pairs. That relationship is what lets the calculator find unknown sides and angles once enough is known.
Given b = 2, B = 90° and C = 45°, find c:
which gives c = 2 × (√2 / 2) = √2, or 1.41421.
There are cases where the law of sines allows two different triangles from the same data. Given two sides and an angle that is not between them, the sine has two solutions in range, one acute and one obtuse. The calculator solves the acute one and tells you when the second exists.
Law of cosines
Given all three sides, each angle can be recovered directly. Referring to the triangle in the calculator, with a, b and c known:
Given a = 8, b = 6 and c = 10, find B:
The same law rearranges to find a missing side when two sides and the angle between them are known, which is how the calculator handles that combination.
Area of a triangle
Several equations give the area, and which one to use depends on what is known. The most familiar involves the base b and the height h. The base is any side; the height is the perpendicular distance from the opposite vertex down to that side, or to the line extending it.
A triangle with a base of 6 and a height of 5 has an area of ½ × 6 × 5 = 15. Any of the three sides can play the part of the base and the answer is the same, which is why the calculator reports all three heights.
Given two sides and the angle between them, no height is needed:
The same relationship written the other two ways is and . Given a = 9, b = 7 and C = 30°, the area is ½ × 9 × 7 × 0.5 = 15.75.
Heron's formula needs no angle and no choice of base. It uses only the three side lengths and the semiperimeter s:
For a = 3, b = 4 and c = 5 the semiperimeter is 6, so the area is √(6 × 3 × 2 × 1) = √36 = 6, which agrees with the half-base-times-height answer for the same triangle.
Median, inradius and circumradius
Median
A median is the line segment from a vertex to the midpoint of the opposite side. Every triangle has three, and all three cross at a single point called the centroid, which is the mean position of all the points in the triangle. It is also the balance point: a triangle cut from card balances on a pin at its centroid.
The lengths are given by:
For a = 2, b = 3 and c = 4:
The centroid always sits two thirds of the way along each median, measured from the vertex.
Inradius
The inradius is the radius of the largest circle that fits inside the triangle. That circle touches all three sides, and its centre, the incenter, is where the three angle bisectors meet. The incenter is the same perpendicular distance from every side, which is what makes the circle fit.
Calculated from the area and the semiperimeter:
For the 3, 4, 5 triangle the area is 6 and the semiperimeter is 6, so the inradius is exactly 1.
Circumradius
The circumradius is the radius of the circle that passes through all three vertices. Its centre, the circumcenter, is where the perpendicular bisectors of the sides meet, and it does not have to lie inside the triangle: in an obtuse triangle it falls outside, and in a right triangle it sits exactly on the midpoint of the hypotenuse. Every triangle has a circumcircle, so every triangle has a circumradius.
Side a and angle A are used here, but any side with its opposite angle gives the same value, which is the law of sines again. For the 3, 4, 5 triangle the circumradius is 2.5, half the hypotenuse, exactly as the right-triangle rule predicts.
Which three values are enough
Three pieces of information fix a triangle, as long as at least one is a side. Three angles fix the shape but not the size, so they describe an entire family of similar triangles rather than one triangle.
| Given | Case | Result |
|---|---|---|
| Three sides | SSS | One triangle, if the triangle inequality holds |
| Two sides and the angle between them | SAS | One triangle |
| Two angles and the side between them | ASA | One triangle |
| Two angles and a side not between them | AAS | One triangle |
| Two sides and an angle not between them | SSA | None, one or two triangles |
| Three angles | AAA | Shape only, no size |
SSA is the awkward one, known as the ambiguous case. With sides of 5 and 8 and an angle of 30° opposite the 5, the sine works out at 0.8, which is satisfied by 53.13° and by 126.87°. Both give a valid triangle. Lengthen the side opposite the given angle past the other side and the second solution disappears; shorten it too far and no triangle exists at all.
Reading the rest of the output
The vertex coordinates place the triangle on a grid with A at the origin and B on the positive x-axis, so side c lies along the base. C then falls wherever angle A and side b put it. This is a convenient frame rather than the only one, and it makes the three centre points easy to compare.
The centroid, incenter and circumcenter are three different centres and they usually sit in three different places. They coincide only in an equilateral triangle. The heights, sometimes called altitudes, are the perpendicular distances used in the half-base-times-height area formula, one for each choice of base.
Angles come back in degrees, in degrees, minutes and seconds when the degree value is not whole, and in radians. Where the radian value is a neat fraction of π it is shown that way too, so 75° appears as 5/12π alongside 1.309. Radian input works in the same notation: type pi/4 or 2pi/3 straight into an angle box after switching the unit.
Common questions
Frequently asked questions
Any three of the six, as long as at least one is a side. Three sides, two sides and an angle, or two angles and a side all work. Three angles are not enough: they fix the shape but not the size, so they describe a whole family of similar triangles.
Subtract the other two from 180 degrees. Interior angles always add to 180, so a triangle with angles of 45 and 60 has a third angle of 75. That is the first step the calculator takes whenever two angles are given.
The law of sines pairs each side with its opposite angle and is the tool when you have an angle and its opposite side. The law of cosines relates all three sides to one angle, so it handles three known sides or two sides with the angle between them.
This is the ambiguous case, and it happens with two sides and an angle that is not between them. The sine of the unknown angle has both an acute and an obtuse solution. With sides of 5 and 8 and 30 degrees opposite the 5, both 53.13 and 126.87 degrees give a real triangle.
Two ways. With two sides and the angle between them, area is half the product of those sides times the sine of the angle. With all three sides, Heron's formula uses the semiperimeter: for 3, 4, 5 the semiperimeter is 6 and the area comes out at 6.
Any two sides added together have to be longer than the third. Sides of 1, 2 and 9 fail it, because 1 plus 2 is nowhere near 9, and no triangle closes. The calculator checks this before it accepts three lengths.
The centroid is where the three medians cross and is the balance point. The incenter is where the angle bisectors cross and is the centre of the largest circle that fits inside. The circumcenter is where the perpendicular bisectors cross and is the centre of the circle through all three vertices. They only coincide in an equilateral triangle.
Yes. In an obtuse triangle it falls outside, and in a right triangle it sits exactly on the midpoint of the hypotenuse, which is why the circumradius of a 3, 4, 5 triangle is 2.5.
Switch the angle unit to radians and type the value as written, so pi/4, pi/2 and 2pi/3 all work, as do plain decimals like 0.7854. Results still show degrees, radians and the fraction of pi side by side.
The largest angle. Exactly 90 degrees makes it right, more than 90 makes it obtuse, and all three below 90 makes it acute. That is separate from the side classification, so a triangle can be right and scalene at the same time, as 3, 4, 5 is.