The classic cases: SSS (three sides), SAS (two sides and the included angle), ASA and AAS (two angles and a side) and SSA (two sides and a non-included angle). At least one side is always required.
Solve any triangle with the law of sines and cosines, area and figure.
In this solver the sides are labeled a, b and c and the angles A, B and C, with each angle opposite the same-letter side and given in degrees. Enter any three measurements that include at least one side, and the tool completes the triangle using the appropriate law: the law of cosines for the SSS (three sides) and SAS (two sides and the included angle) cases, and the law of sines for ASA and AAS (two angles and a side) or the ambiguous SSA case. Because the three interior angles always sum to 180°, a missing angle is obtained directly once two are known. From the solved triangle it reports every side and angle, the perimeter, the area via Heron's formula, the three heights (h = 2·area ÷ base), and the classification by sides (equilateral, isosceles, scalene) and by angles (acute, right, obtuse). The figure is redrawn to scale in real time, and the SSA case is flagged because it can admit a second, obtuse solution.
The law of cosines, a² = b² + c² − 2·b·c·cos(A), is used when you have the three sides (SSS, to find the angles) or two sides and the included angle (SAS, to find the third side). The law of sines, a/sin(A) = b/sin(B) = c/sin(C), is used when a known side–opposite-angle pair exists: ASA, AAS, and the SSA case.
After completing sides and angles, the area comes from Heron's formula: with s = (a + b + c) ÷ 2 (the semiperimeter), area = √(s·(s−a)·(s−b)·(s−c)). The heights follow from area = ½ · base · height.
Example 1, SSS (3, 4, 5): by the law of cosines, A ≈ 36.87°, B ≈ 53.13° and C = 90° (it is a right triangle). The perimeter is 12 and the area, by Heron with s = 6, is √(6·3·2·1) = √36 = 6.
Example 2, SAS (b = 5, c = 7, angle A = 40° between them): a² = 5² + 7² − 2·5·7·cos40° = 74 − 53.62 = 20.38, so a ≈ 4.51. The area is ½·5·7·sin40° ≈ 11.25.
Angles alone are not enough: triangles with the same angles are similar but different in size, so you must provide at least one side. Also, three lengths form a triangle only if each is shorter than the sum of the other two (the triangle inequality).
The SSA case (two sides and an angle opposite one of them) can have zero, one, or two solutions, the famous ambiguous case. The tool warns when there is ambiguity and presents the acute-angle solution.
Paste the code into your HTML and the tool shows up on your page, without J-Kit's navigation and ads. It still runs in the browser of whoever visits your site.
<iframe
src="https://jkit.tools/embed/en-US/triangle-calculator"
width="100%"
height="600"
style="border:0"
loading="lazy"
title="Triangle Calculator"
></iframe>These references help contextualize formulas, standards, APIs and limitations used on this page. They do not replace professional validation when a result has legal, financial, medical or operational impact.
The classic cases: SSS (three sides), SAS (two sides and the included angle), ASA and AAS (two angles and a side) and SSA (two sides and a non-included angle). At least one side is always required.
Enter 3 measurements (with at least one side). The figure is drawn to scale.
Calculations run in your browser. No data is sent to a server.