How this triangle calculator works
A triangle has three sides and three angles. Here, side a sits across from angle A, side b across from angle B, and side c across from angle C. Enter any three of those six values, including at least one side, and this triangle solver finds the rest.
It works as a triangle side calculator, a triangle angle calculator, and a triangle area calculator at once. The result also names the triangle type and lists the perimeter, semiperimeter, heights, medians, inradius, circumradius, and the coordinates of its key points, along with a scale drawing and the calculation steps.
For example, sides of 5, 7, and 9 give angles of about 33.56°, 50.70°, and 95.74°, an area of about 17.41, and a perimeter of 21.
Which three values can you enter?
- Three sides (SSS). The law of cosines gives each angle. The two shorter sides must add up to more than the longest side, so this is also a quick sss triangle calculator.
- Two sides and the angle between them (SAS). The law of cosines gives the third side.
- Two sides and an angle not between them (SSA). The law of sines gives the second angle. This can produce one triangle, two, or none.
- One side and two angles (ASA or AAS). The third angle is 180° minus the other two, and the law of sines gives the remaining sides.
Three angles alone are not enough, because they fix the shape of a triangle but not its size.
The law of cosines and the law of sines
c² = a² + b² − 2ab × cos C
a ÷ sin A = b ÷ sin B = c ÷ sin C
The law of cosines relates all three sides to one angle, and the law of sines relates each side to the angle across from it. Between them, they solve any triangle.
How to find the area of a triangle
With a base and its height, multiply them and divide by 2. With two sides and the angle between them, use half their product times the sine of the angle. This calculator first solves every side and angle, then uses that second formula. With three sides, Heron's formula gives the same area directly, where s is half the perimeter.
area = base × height ÷ 2 = bc × sin A ÷ 2 = √(s(s − a)(s − b)(s − c))
For sides of 5, 7, and 9, angle A ≈ 33.56°, so the area is 7 × 9 × sin 33.56° ÷ 2 ≈ 17.41. Heron's formula agrees: s = 10.5, and √(10.5 × 5.5 × 3.5 × 1.5) ≈ 17.41. The inradius is the area divided by s, about 1.66.
Types of triangles
By sides, a triangle is equilateral (all three equal), isosceles (two equal), or scalene (none equal). By angles, it is acute (all under 90°), right (one exactly 90°), or obtuse (one over 90°). An equilateral triangle always has three 60° angles. If you know one angle is 90°, the right triangle calculator takes other inputs too, such as the area and the perimeter.
Frequently asked questions
How do you find a missing side of a triangle?
Use the law of cosines if you know two sides and the angle between them, and the law of sines if you know an angle and the side across from it. Enter what you know above and the calculator picks the right method.
How do you find a missing angle of a triangle?
If you know the other two angles, subtract them from 180°. If you know all three sides, use the law of cosines: A = arccos((b² + c² − a²) ÷ 2bc).
Why does the calculator show two triangles?
Two sides and an angle not between them can fit two different triangles, because an acute angle and its supplement have the same sine. This is known as the ambiguous case. Both solutions are valid, so pick the one that matches your drawing.
Why do I get an error with three sides?
The two shorter sides must add up to more than the longest side, or they can't meet. Sides of 2, 3, and 6 don't form a triangle because 2 + 3 is less than 6.
What is the difference between the centroid, incenter, and circumcenter?
The centroid is where the medians cross, the incenter is the center of the largest circle that fits inside, and the circumcenter is the center of the circle through all three vertices. The circumcenter is inside an acute triangle, at the midpoint of the hypotenuse of a right triangle, and outside an obtuse triangle.
What's changed
- Launched.
References
- Wolfram MathWorld — Law of Cosines
c² = a² + b² − 2ab cos C, used to find a third side from two sides and the angle between them, and each angle from three sides
- Wolfram MathWorld — Law of Sines
a ÷ sin A = b ÷ sin B = c ÷ sin C, used when a side and the angle across from it are known, and the circumradius from a ÷ (2 sin A)
- Wolfram MathWorld — Triangle Area
area = bc sin A ÷ 2, the same area by Heron's formula, and area = inradius × s, used to find the inradius
- Wolfram MathWorld — Circumcenter
the circumcenter lies R cos C from side c, inside an acute triangle and at the midpoint of the hypotenuse of a right one; cos C < 0 puts it outside an obtuse triangle
- Wolfram MathWorld — Triangle Median
the median lengths and the centroid where the medians meet