How to use the triangle calculator
- Enter any three of the six values: the sides a, b and c, and the angles A, B and C. At least one must be a side. Side a is always opposite angle A.
- Choose degrees or radians for the angles. In radians you can type π, for example π/3.
- Read the missing sides and angles, the area, perimeter, heights, medians, inradius and circumradius, and follow the steps. The triangle is drawn to scale. If two different triangles fit your values, both are shown.
The five ways to know a triangle
Which method solves a triangle depends on which three values you know:
- SSS, three sides. Find each angle with the law of cosines. Sides 7, 8 and 9 give angles of 48.1897°, 58.4119° and 73.3985°.
- SAS, two sides and the angle between them. The law of cosines gives the third side: a = 9, b = 7 and C = 30° give c = 4.5696.
- ASA, two angles and the side between them. The third angle is 180° minus the other two, then the law of sines gives the sides. A = 40°, B = 60° and c = 10 give C = 80°, a = 6.527 and b = 8.7939.
- AAS, two angles and a side not between them. Solved the same way as ASA.
- SSA, two sides and an angle not between them. This is the ambiguous case: there may be two triangles, one or none.
Three angles (AAA) are not enough, because similar triangles of every size share the same angles.
The law of sines
In any triangle, each side divided by the sine of the opposite angle gives the same number:
a / sin A = b / sin B = c / sin C
It also equals the diameter of the circle through the three corners, 2R. Use it when you know an angle and its opposite side, plus one more value.
The law of cosines
For a side and the angle opposite it:
c² = a² + b² − 2ab cos C
When C is 90°, cos C = 0 and this becomes the Pythagorean theorem, c² = a² + b². Use it to find the third side from two sides and the angle between them, or rearrange it, cos C = (a² + b² − c²) / 2ab, to find an angle from three sides. Both laws are part of the Common Core high school geometry standards, which ask students to “understand and apply the Law of Sines and the Law of Cosines to find unknown measurements in right and non-right triangles” (standard HSG-SRT.D.11).
The ambiguous case (SSA)
Suppose a = 6, b = 8 and A = 30°. The law of sines gives sin B = 8 × sin 30° / 6 = 0.6667. Two angles have that sine: 41.8103° and 180° − 41.8103° = 138.1897°. Both leave room for a third angle, so two triangles fit:
- B = 41.8103°, C = 108.1897° and c = 11.4003.
- B = 138.1897°, C = 11.8103° and c = 2.4561.
Picture side a swinging from the end of side b: it can reach the base line at two points. If a is shorter than b sin A, it can’t reach at all and there is no triangle. If it is exactly b sin A, it meets the base at a right angle, giving one triangle. And if a is at least as long as b, only one of the two points is on the correct side, giving one triangle. When two triangles fit, the calculator shows both.
Area of a triangle
There are three common ways to find the area, depending on what you know:
- Base and height: area = ½ × base × height.
- Two sides and the angle between them: area = ½ab sin C. The Common Core standard HSG-SRT.D.9 asks students to derive it “by drawing an auxiliary line from a vertex perpendicular to the opposite side”.
- Three sides: Heron’s formula, area = √(s(s − a)(s − b)(s − c)), where s is half the perimeter. For sides 5, 6 and 7, s = 9 and the area is √(9 × 4 × 3 × 2) = √216 = 14.6969.
For long, thin triangles, the plain Heron formula can lose accuracy on a computer. The calculator uses a rearranged form that stays accurate.
Heights, medians and circles
Each triangle has three heights (altitudes), one from each corner, perpendicular to the opposite side: hₐ = 2 × area / a. A median joins a corner to the middle of the opposite side; the three medians meet at the centroid, the triangle’s balance point. The inradius r is the radius of the largest circle that fits inside, r = area / s. The circumradius R is the radius of the circle through all three corners, R = abc / (4 × area).
Types of triangles
By angles, a triangle is acute if every angle is under 90°, right if one is exactly 90°, and obtuse if one is over 90°. By sides, it is equilateral if all three are equal, isosceles if two are, and scalene if none are. The calculator names both, for example a right isosceles triangle for sides 1, 1 and √2.
Checking a triangle
A few quick checks catch most mistakes. The three angles always add up to 180°. The longest side is always opposite the largest angle, and the shortest side opposite the smallest. Any two sides must add up to more than the third, which is the triangle inequality: sides of 3, 4 and 8 can’t make a triangle, because 3 + 4 is less than 8, so the two short sides can’t reach each other. If a triangle has a right angle, the Pythagorean theorem should hold: 3² + 4² = 5², so a 3-4-5 triangle has a right angle opposite the side of 5. The calculator tells you when a set of values can’t make a triangle, and why.
Your data stays on your device
Everything is worked out in your browser. Nothing you type is sent anywhere or stored.
Frequently asked questions
How many values do I need to solve a triangle?
Three, and at least one of them must be a side. Three angles alone fix the shape but not the size: a small and a large equilateral triangle both have three 60° angles.
What is the ambiguous case?
When you know two sides and an angle that is not between them (SSA), there can be two different triangles, one, or none. With a = 6, b = 8 and A = 30°, angle B can be 41.8103° or 138.1897°, and both make valid triangles. The calculator shows both.
When do I use the law of sines and when the law of cosines?
Use the law of cosines when you know three sides, or two sides and the angle between them. Use the law of sines when you know an angle and the side opposite it, plus one more value. The calculator picks the right one and shows each step.
How do I find the area of a triangle without the height?
With two sides and the angle between them, area = ½ab sin C. With three sides, use Heron’s formula: for sides 5, 6 and 7, the area is 14.6969. The calculator gives the area for any triangle you solve.
Can I enter angles in radians?
Yes. Switch the angle unit to radians, and you can type values such as 0.5, π/3 or 2pi/3. The answers show both radians and degrees.
Is anything I type saved or sent?
No. Everything is worked out in your browser and nothing you type is sent anywhere or stored.