Triangle Calculator
Table of Contents
- Triangle definition
- Parts of a triangle
- Solving a triangle
- Types of triangles
- Frequently asked questions
Triangle definition
A triangle is a flat shape with three straight sides and three corners (vertices). It is the simplest polygon, and every other polygon can be divided into triangles.
In this tool the sides are named a, b and c, and the angles α, β and γ. Each angle lies opposite the side with the same letter: α is opposite a, β is opposite b, and γ is opposite c.
Every triangle has the following properties:
- The three angles always add up to 180°
- Any side is shorter than the sum of the other two (the triangle inequality)
- The longest side lies opposite the largest angle, and the shortest side opposite the smallest angle
- Three sides fix a triangle completely, which is why triangles make rigid structures in bridges, roofs and cranes
For a triangle with a 90° angle, the right triangle calculator gives extra results, and a triangle drawn on a grid can be measured with the area of a triangle with coordinates.
Parts of a triangle
The thirteen parts of a triangle mentioned in this tool are the three sides (a, b, c), area (A), perimeter (P), the three heights (ha, hb, hc), the three angles (α, β, γ), the inradius (r) and the circumradius (R).
Side a
Side a is the side opposite the angle α.
It can be found with the following formulas:
-
If you know the perimeter and the other two sides:
a = P - b - c -
If you know the other two sides and the angle between them (law of cosines):
a = √(b² + c² - (2 * b * c * cos(α))) -
If you know the area and the height on this side:
a = 2 * A / ha -
If you know the circumradius and the opposite angle:
a = 2 * R * sin(α) -
If you know another side and two angles (law of sines):
a = b * sin(α) / sin(β) = c * sin(α) / sin(γ)
Side b
Side b is the side opposite the angle β. It is found the same way as side a, with the letters swapped:
b = P - a - cb = √(a² + c² - (2 * a * c * cos(β)))b = 2 * A / hbb = 2 * R * sin(β)b = a * sin(β) / sin(α) = c * sin(β) / sin(γ)
Side c
Side c is the side opposite the angle γ. It is found the same way:
c = P - a - bc = √(a² + b² - (2 * a * b * cos(γ)))c = 2 * A / hcc = 2 * R * sin(γ)c = a * sin(γ) / sin(α) = b * sin(γ) / sin(β)
Area (A)
The area of a triangle is the space enclosed by its three sides.
It can be found with the following formulas:
-
If you know a side and the height on it:
A = a * ha / 2 = b * hb / 2 = c * hc / 2 -
If you know the perimeter and the inradius:
A = P * r / 2 -
If you know all three sides (Heron's formula), with
s = P / 2as half the perimeter:A = √(s * (s - a) * (s - b) * (s - c)) -
If you know two sides and the angle between them:
A = a * b * sin(γ) / 2
Perimeter (P)
The perimeter of a triangle is the total length of its three sides:
P = a + b + c
Height ha
Height ha is the perpendicular distance from the vertex opposite side a down to side a, or to its extension when the triangle has an obtuse angle.
If you know the area and the side a:
ha = 2 * A / a
Height hb
Height hb is the perpendicular distance from the vertex opposite side b down to side b.
If you know the area and the side b:
hb = 2 * A / b
Height hc
Height hc is the perpendicular distance from the vertex opposite side c down to side c.
If you know the area and the side c:
hc = 2 * A / c
The three heights of a triangle always meet in one point, called the orthocenter.
Angle α
Angle α is the angle between the sides b and c, opposite side a.
It can be found with the following formulas:
-
If you know the other two angles:
α = 180° - β - γ -
If you know all three sides (law of cosines):
α = arccos((b² + c² - a²) / (2 * b * c))
Angle β
Angle β is the angle between the sides a and c, opposite side b.
It can be found with the following formulas:
-
If you know the other two angles:
β = 180° - α - γ -
If you know all three sides:
β = arccos((a² + c² - b²) / (2 * a * c))
Angle γ
Angle γ is the angle between the sides a and b, opposite side c.
It can be found with the following formulas:
-
If you know the other two angles:
γ = 180° - α - β -
If you know all three sides:
γ = arccos((a² + b² - c²) / (2 * a * b))
Inradius (r)
The inradius is the radius of the largest circle that fits inside the triangle, touching all three sides. Its centre, the incenter, is where the three angle bisectors meet.
If you know the area and the perimeter:
r = 2 * A / P
Circumradius (R)
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.
It can be found with the following formulas:
-
If you know a side and its opposite angle:
R = a / (2 * sin(α)) -
If you know all three sides:
R = a * b * c / (4 * A) = a * b * c / √((a + b + c) * (b + c - a) * (a + c - b) * (a + b - c))
Solving a triangle
A triangle is fixed by three of its parts, as long as at least one of them is a side. The combinations are named by the order of the known Sides and Angles:
- SSS (three sides): find the angles with the law of cosines.
- SAS (two sides and the angle between them): find the third side with the law of cosines, then the other angles.
- ASA (two angles and the side between them) and AAS (two angles and another side): find the third angle from the 180° sum, then the other sides with the law of sines.
- SSA (two sides and an angle that is not between them): this is the ambiguous case, where there can be two different triangles, one or none.
- AAA (three angles): this fixes the shape but not the size, so the sides can't be found without at least one length.
This tool works through these cases on its own: fill in any three parts, and the rest are calculated.
Types of triangles
Triangles are grouped by their sides and by their angles.
By their sides:
- Equilateral: all three sides are equal, and every angle is 60°.
- Isosceles: two sides are equal, and so are the two angles opposite them.
- Scalene: all three sides are different, and so are all three angles.
By their angles:
- Acute: all three angles are less than 90°.
- Right: one angle is exactly 90°. See the right triangle calculator.
- Obtuse: one angle is more than 90°.
Frequently asked questions
How do you find the area of a triangle?
Multiply a side by the height on it and divide by two: A = a * ha / 2. If you only know the three sides, use Heron's formula. With a = 5, b = 6 and c = 7, half the perimeter is s = 9, and the area is √(9 × 4 × 3 × 2) ≈ 14.70 square units.
How do you find the angles of a triangle from its sides?
Use the law of cosines for each angle: α = arccos((b² + c² - a²) / (2 * b * c)). For a = 5, b = 6 and c = 7, the angles are about 44.42°, 57.12° and 78.46°, which add up to 180°.
How do you find the third side of a triangle?
With two sides and the angle between them, use the law of cosines: c = √(a² + b² - (2 * a * b * cos(γ))). With two angles and a side, find the third angle, then use the law of sines.
Why do the angles of a triangle add up to 180°?
Draw a line through one vertex, parallel to the opposite side. The two angles it makes with the other sides are equal to the triangle's other two angles, and together with the third angle they form a straight line, which is 180°.