Triangle Calculator
Solve any triangle from three sides or angles (SSS, SAS, ASA, AAS, SSA) or a right triangle from two values, with area, heights, medians and a drawing.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Triangle Calculator?
A triangle is fixed once you know three of its six measurements, as long as one of them is a side. This triangle calculator takes any such trio, works out the missing sides and angles, and then reports everything else people usually need: area, perimeter, the three heights, the three medians, the inscribed and circumscribed circle radii, and whether the triangle is scalene, isosceles or equilateral and acute, right or obtuse. A drawing to scale updates as you type so you can see whether the answer looks right.
There are three modes. "Any three values" handles the general cases named SSS, SAS, ASA, AAS and SSA. "Right triangle" assumes angle C is 90° and needs only two values, which is the Pythagorean theorem and SOH-CAH-TOA in one place. The third mode covers the special 30-60-90 and 45-45-90 triangles, where one length gives the other two by fixed ratios. Angles can be entered in degrees or radians.
When the two sides and an angle you enter allow two different triangles (the ambiguous SSA case), both solutions are shown side by side with a switch to draw either one. When no triangle can exist, the message says why, for example which side is too short to reach the base.
- Solves SSS, SAS, ASA, AAS and SSA, including both ambiguous SSA solutions
- Right-triangle mode and 30-60-90 / 45-45-90 ratios
- Area by two methods, perimeter, heights, medians, inradius and circumradius
- Classification by sides and by angles
- SVG drawing to scale with a right-angle marker
- Degrees or radians, copy and shareable links
How to use the Triangle Calculator
- Pick a mode: any three values, right triangle, or the 30-60-90 / 45-45-90 special triangles.
- Choose degrees or radians for angles.
- Type the values you know and leave the rest blank. Angle A is opposite side a, B opposite b, C opposite c.
- Read the solved sides and angles, area, perimeter and type, and check the drawing.
- Open the properties table for heights, medians, inradius and circumradius, and copy the results or a share link.
Worked examples
Three sides (SSS)
Input
a = 5, b = 6, c = 7
Output
A = 44.4153°, B = 57.1217°, C = 78.463°; area 14.6969; perimeter 18; inradius 1.633; circumradius 3.5722
The law of cosines gives each angle. Heron's formula with s = 9 gives √216 = 14.6969, matching ½·a·b·sin C. The largest angle is under 90°, so the triangle is acute.
The ambiguous case (SSA)
Input
A = 30°, a = 6, b = 10
Output
Solution 1: B = 56.4427°, C = 93.5573°, c = 11.9769. Solution 2: B = 123.5573°, C = 26.4427°, c = 5.3436
The height from C is 10·sin 30° = 5. Side a = 6 is longer than 5 but shorter than b = 10, so it meets the base in two places. Change a to 4 and no triangle exists; change it to 12 and only one does.
Right triangle from a hypotenuse and an angle
Input
Right triangle mode: c = 12, A = 35°
Output
a = 6.8829, b = 9.8298, B = 55°, area 33.8289
a = c·sin A and b = c·cos A. This is the ladder problem: a 12 ft ladder at 35° from the wall reaches 9.83 ft up it.
Background and insight
Two laws do almost all the work. The law of cosines, c² = a² + b² − 2ab·cos C, turns three sides into angles and closes the gap in the SAS case. The law of sines, a / sin A = b / sin B = c / sin C, finishes the job once one side and its opposite angle are known. The common ratio in the law of sines equals 2R, the diameter of the circumscribed circle, which is how the calculator gets the circumradius.
Area comes from ½·a·b·sin C, and the tool also computes Heron's formula, √(s(s−a)(s−b)(s−c)) with s the semiperimeter, as an independent check. For very thin triangles the textbook Heron expression loses precision because it subtracts nearly equal numbers, so the calculator uses the rearranged form published by William Kahan, which sorts the sides first and keeps the subtraction safe.
SSA is called ambiguous because the side opposite the known angle can swing like a hinge. With angle A acute, if side a is shorter than the height b·sin A there is no triangle, if it equals the height there is exactly one right triangle, if it falls between the height and side b there are two, and if it is at least as long as b there is one. With A obtuse there is one triangle only when a is longer than b. The solver applies exactly these rules.
Common use cases
Homework and exam checking
Enter the givens from a textbook problem and confirm every side and angle, including both answers when the SSA case has two.
Carpentry and framing
Find the rafter length, the cut angle or the diagonal brace for a frame from the two measurements you can take with a tape.
Surveying a plot
Split an irregular plot into triangles, measure the sides, and get each triangle's area from SSS without measuring any angles.
Game and graphics work
Check angles and distances between three points, or the circumradius for placing a triangle inside a circle.
Tips and limitations
- Give exactly three values in the general mode. A fourth value usually contradicts the other three slightly through rounding, so the calculator asks you to clear it.
- Three angles alone describe the shape but not the size: every scaled copy fits. Add one side.
- If an SSA answer looks wrong, check the second solution. Many textbook answers list only the acute one.
- Results are rounded to six significant figures for display; the copy button uses the same rounding.
- For a triangle given by coordinates, find the side lengths with the slope calculator's distance result first.
Frequently asked questions
How do you solve a triangle with three sides?
Use the law of cosines for one angle, for example cos A = (b² + c² − a²) / (2bc), repeat for a second angle, and subtract both from 180° for the third. The sides must satisfy the triangle inequality: the longest side has to be shorter than the other two added together.
What is the ambiguous case of the law of sines?
It is the SSA situation, where you know two sides and an angle that is not between them. Depending on how long the side opposite the known angle is, there can be zero, one or two triangles. The calculator compares that side with the height and with the other side and shows every valid solution.
How do I find the third side of a right triangle?
With both legs, the hypotenuse is √(a² + b²). With a leg and the hypotenuse, the other leg is √(c² − a²). Legs 3 and 4 give a hypotenuse of 5; a leg of 5 with a hypotenuse of 13 gives 12.
What are the side ratios of 30-60-90 and 45-45-90 triangles?
A 30-60-90 triangle has sides in the ratio 1 : √3 : 2, with the short leg opposite 30°. A 45-45-90 triangle has sides 1 : 1 : √2. A 30-60-90 triangle with a hypotenuse of 10 has legs 5 and 8.660.
How is the area of a triangle calculated without the height?
With two sides and the angle between them, area = ½·a·b·sin C. With all three sides, use Heron's formula: s = (a + b + c) / 2 and area = √(s(s−a)(s−b)(s−c)). The 13-14-15 triangle has s = 21 and area 84.
Can a triangle be solved from three angles?
No. Three angles fix the shape but any enlarged or shrunk copy has the same angles, so at least one side length is needed to fix the size.
What is the difference between a median and a height of a triangle?
A height (altitude) runs from a vertex to the opposite side at a right angle. A median runs from a vertex to the midpoint of the opposite side. They coincide only when the two sides meeting at that vertex are equal.
Is there an in-depth guide to the Triangle Calculator?
Yes. “Solving Triangles and Slopes: Sines, Cosines and Rise Over Run” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.