How to use the triangle calculator
- Enter exactly three known values. You must provide at least one side length.
- The tool automatically detects whether you entered SSS, SAS, ASA, AAS, or SSA.
- Missing sides and angles are calculated instantly as you type.
- For the ambiguous SSA case, both possible triangles are shown if they exist.
How the math works
This triangle calculator relies on two core formulas. The law of cosines finds an unknown side when two sides and their included angle are known (the SAS case), or finds an angle when all three sides are known (SSS). For sides a, b, c and opposite angles A, B, C:
c² = a² + b² - 2ab cos(C)
The law of sines relates each side to the sine of its opposite angle. It is used for ASA, AAS, and SSA cases:
a / sin(A) = b / sin(B) = c / sin(C)
For example, in a SAS calculation where a = 5, b = 7, and C = 60 degrees: c² = 25 + 49 - 70 × cos(60°) = 74 - 35 = 39, so c = 6.245. Then the law of sines gives sin(A) = 5 × sin(60°) / 6.245 = 0.6934, making A = 43.9 degrees.
Supported cases
A valid triangle requires exactly three independent measurements, including at least one side. Here is what each combination means:
| Case | Known values | Primary formula used |
|---|---|---|
| SSS | All three sides | Law of cosines |
| SAS | Two sides and the included angle | Law of cosines, then law of sines |
| ASA | Two angles and the side between them | Angle sum, then law of sines |
| AAS | Two angles and a non-included side | Angle sum, then law of sines |
| SSA | Two sides and a non-included angle | Law of sines (may be ambiguous) |
Three angles alone (AAA) determine only the shape, not the size, so they cannot be solved.
The ambiguous case (SSA)
When you know two sides and an angle that is not between them, zero, one, or two valid triangles may exist. This happens because the sine function returns the same positive value for an acute angle and its obtuse supplement.
Suppose you know side a, side b, and angle A. First compute sin(B) = b × sin(A) / a. If this value exceeds 1, no triangle exists. If it equals exactly 1, there is one right triangle. If it is less than 1, angle B could be acute (arcsin) or obtuse (180° - arcsin). Each candidate is checked: if adding it to angle A leaves a positive remainder for angle C, that triangle is valid. This triangle calculator displays every valid solution.
Common mistakes to avoid
When using any geometry tool, watch out for these errors:
- Entering three angles. Without at least one side, the scale of the triangle is undefined.
- Violating the triangle inequality. In an SSS setup, the sum of any two sides must strictly exceed the third. Sides 1, 2, and 4 cannot form a triangle because 1 + 2 is not greater than 4.
- Mixing units. All side lengths must use the same unit. If you need to convert first, use a tool like inches to meters.
- Using radians instead of degrees. This calculator expects angles in degrees. Convert beforehand if needed using a degrees to radians converter.
Practical applications
Solving triangles appears in many fields beyond the classroom. Surveyors measure two distances and the angle between them (SAS) to map property boundaries. Carpenters use the principles behind the Pythagorean theorem calculator to verify square corners, which is simply a special case of SSS where one angle is 90 degrees. In navigation, pilots and sailors apply the law of sines to correct course headings when wind or current pushes them off a straight path. Engineers analyzing truss structures routinely resolve forces into triangular components.
Once you have all three sides, you can pass them to a triangle area calculator to find the enclosed space, or use the coordinates with a slope calculator for further geometric analysis.
Worked examples
| Example | Input | Result |
|---|---|---|
| SSS (3-4-5 right triangle) | Side a (opposite angle A): 3; Side b (opposite angle B): 4; Side c (opposite angle C): 5 | Side a: 3; Side b: 4; Side c: 5; Angle A: 36.8699°; Angle B: 53.1301°; Angle C: 90° |
| SAS triangle calculator | Side a (opposite angle A): 5; Side b (opposite angle B): 7; Angle C (degrees): 60 | Side a: 5; Side b: 7; Side c: 6.245; Angle A: 43.8979°; Angle B: 76.1021°; Angle C: 60° |
| ASA triangle calculator | Side c (opposite angle C): 10; Angle A (degrees): 45; Angle B (degrees): 60 | Side a: 7.3205; Side b: 8.9658; Side c: 10; Angle A: 45°; Angle B: 60°; Angle C: 75° |
| AAS case | Side a (opposite angle A): 5; Angle A (degrees): 30; Angle B (degrees): 100 | Side a: 5; Side b: 9.8481; Side c: 7.6604; Angle A: 30°; Angle B: 100°; Angle C: 50° |
FAQ
What three values do I need to solve a triangle?
You need exactly three independent measurements, and at least one must be a side length. Valid combinations are SSS, SAS, ASA, AAS, and SSA.
Can I enter three angles to find the sides?
No. Three angles define the shape but not the size. At least one side length is required to determine the actual dimensions.
Why does the SSA case sometimes give two answers?
Because the sine of an angle and the sine of its supplement (180 degrees minus the angle) are equal. Both an acute and an obtuse angle may satisfy the equation, leading to two valid triangles.
Does this triangle calculator work offline?
Yes. All calculations run locally in your browser using JavaScript. No data is sent to any server.
What units should I use for the sides?
Any consistent unit works: centimeters, inches, meters, etc. Just make sure all three sides use the same unit before entering them.
How is this different from the Pythagorean theorem?
The Pythagorean theorem only applies to right triangles. The law of sines and law of cosines used here work for any triangle, whether acute, obtuse, or right.