Home›Math & Stats›Solve the Triangle

Solve the Triangle Calculator

Your triangle

This solver works for any triangle, not just right triangles. Side a is opposite angle A, side b is opposite angle B, and side c is opposite angle C.

Angles are in degrees. The three angles always add up to 180°, and the longest side is always opposite the largest angle.

Area
— sq units
Solved triangle · all sides, angles, area and perimeter
Side a—
Side b—
Side c—
Angle A—
Angle B—
Angle C—
Area—
Perimeter—
The calculation
—
—

Example: sides 3, 4 and 5 → angles 36.87°, 53.13° and 90.00°, area 6.00, perimeter 12.00.

Behind the numbers

How any triangle is solved

Every triangle has three sides and three angles that add up to 180°. Three known values that include at least one side are enough to find the rest. With three sides (SSS), the law of cosines finds each angle. With two sides and the angle between them (SAS), the law of cosines finds the third side first, then the law of sines finds the angles. With two angles (ASA or AAS), the third angle is 180° minus the two known angles, and the law of sines finds the missing sides. Area comes from Heron's formula or from ½ × a × b × sin(C), and perimeter is the sum of the three sides.

The formula
c² = a² + b² − 2ab · cos(C)   |   a ÷ sin(A) = b ÷ sin(B) = c ÷ sin(C)

Worked example with sides 5, 6 and 7 (SSS): angle A = cos⁻¹((6² + 7² − 5²) ÷ (2 × 6 × 7)) = cos⁻¹(0.7143) = 44.42°. Angle B = cos⁻¹((5² + 7² − 6²) ÷ (2 × 5 × 7)) = 57.12°. Angle C = 180° − 44.42° − 57.12° = 78.46°. Semiperimeter s = 9, so area = √(9 × 4 × 3 × 2) = 14.70 and perimeter = 18.00.

Examples

Example solved triangles

Known valuesMissing valuesAngles A / B / CAreaPerimeter
SSS: 3, 4, 5—36.87° / 53.13° / 90.00°6.0012.00
SSS: 5, 6, 7—44.42° / 57.12° / 78.46°14.7018.00
SAS: a = 5, b = 6, C = 60°c = 5.5751.05° / 68.95° / 60.00°12.9916.57
ASA: A = 50°, B = 60°, c = 10a = 8.15, b = 9.2250.00° / 60.00° / 70.00°35.3027.37
AAS: A = 40°, a = 8, B = 70°b = 11.70, c = 11.7040.00° / 70.00° / 70.00°43.9631.39

Tips before you solve

01

Check the triangle inequality first: the sum of any two sides must be greater than the third side, or no triangle exists.

02

For SAS, the angle you enter must be the angle between the two sides you entered — the included angle, not any other angle.

03

For ASA, the side you enter is the side between the two angles. For AAS, the side is opposite one of the angles you entered.

04

Three angles alone cannot solve a triangle: they fix the shape, but the triangle could be any size. You always need at least one side.

Good to know

Frequently asked questions

What three values do I need to solve a triangle?

Any three values that include at least one side: three sides (SSS), two sides and the angle between them (SAS), two angles and the side between them (ASA), or two angles and a side that is not between them (AAS). Three angles alone are not enough, because they fix the shape but not the size.

How does the law of cosines work?

For sides a, b, c and angle C opposite side c: c squared equals a squared plus b squared minus 2ab times cos(C). It finds a missing side from two sides and the included angle, and it finds an angle from three sides.

How does the law of sines work?

In any triangle, a divided by sin(A) equals b divided by sin(B) equals c divided by sin(C). Once you know one side-angle pair, the law of sines finds the other sides and angles.

What is the area of a triangle from its sides?

Use Heron's formula: with semiperimeter s = (a + b + c) / 2, area = the square root of s(s - a)(s - b)(s - c). For example, sides 3, 4 and 5 give s = 6 and area = the square root of 36 = 6.00.