Triangle Calculator
Enter any 3 known values (sides or angles in degrees). Leave unknown fields empty.
Side a
—
Side b
—
Side c
—
Perimeter
—
Angle A
—
Angle B
—
Angle C
—
Area
—
How to Solve a Triangle
A triangle has six measurements: three sides and three angles. If you know any three of these (with at least one side), this calculator can determine all remaining values. The mathematics behind this uses two fundamental laws of trigonometry: the law of sines and the law of cosines.
The law of cosines (c² = a² + b² − 2ab·cos(C)) is used for SSS (three sides known) and SAS (two sides and the included angle). The law of sines (a/sin(A) = b/sin(B) = c/sin(C)) handles ASA, AAS, and SSA cases. For area calculation, the calculator uses either Heron's formula (Area = √(s(s-a)(s-b)(s-c)) where s is the semi-perimeter) or the SAS area formula (Area = 0.5ab·sin(C)).
The SSA case (two sides and an angle opposite one of them) is known as the ambiguous case because it can produce zero, one, or two valid triangles. This calculator handles this by checking whether the given values form a valid triangle. All angles must sum to exactly 180 degrees, and the sum of any two sides must exceed the third side (triangle inequality theorem). Enter your known values in degrees for angles and any unit for sides, then click Solve Triangle to see all results.
Formula
Area (Heron's Formula):
Area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2
Perimeter:
P = a + b + c
Law of Cosines:
c² = a² + b² − 2ab × cos(C)
Where:
- a, b, c = side lengths of the triangle
- A, B, C = angles opposite sides a, b, c respectively
- s = semi-perimeter
Example Calculation
Scenario: Triangle with sides a = 5, b = 7, c = 8
- Step 1: Semi-perimeter s = (5 + 7 + 8) / 2 = 10
- Step 2: Area = √(10 × 5 × 3 × 2) = √300 ≈ 17.32 square units
- Step 3: Perimeter = 5 + 7 + 8 = 20 units
- Step 4: Angle C = arccos((25 + 49 − 64) / (2 × 5 × 7)) = arccos(10/70) ≈ 81.8°
- Result: Area ≈ 17.32, Perimeter = 20, Angle C ≈ 81.8°