How to use this calculator
- 1 Choose the measurements you know: three sides, two sides and the angle between them, two angles and a side, or two sides and an angle opposite one.
- 2 Enter the values. Side a is opposite angle A, side b is opposite angle B, and side c is opposite angle C. Angles are in degrees.
- 3 Read the missing sides and angles, the area, the perimeter and the type of triangle.
What does it mean to solve a triangle?
A triangle has six measurements: three sides and three angles. To solve a triangle means to find all six, given enough of them. Some facts always hold. The three angles add up to 180 degrees, and the longest side sits opposite the largest angle.
You need three independent facts to fix a triangle. Two angles alone are not enough, because many triangles can share the same angles. Three sides, or two sides with the angle between them, always fix one triangle.
This calculator works out which rule to use from the mode you pick. It then applies the law of cosines or the law of sines, so you do not have to choose the rule yourself.
The two laws behind the calculator
The law of cosines is a general version of the Pythagorean theorem. For side c opposite angle C, it says c² = a² + b² − 2ab × cos C. When C is 90°, the cosine is zero and the rule becomes the Pythagorean theorem. Use it when you know three sides or two sides and the angle between them.
The law of sines links each side to the angle opposite it. It says a ÷ sin A = b ÷ sin B = c ÷ sin C. Use it when you know two angles and a side, or a side and the angle opposite it.
For a right triangle, you can use the right triangle calculator, which uses simpler steps. For the basic case of two legs, the Pythagorean theorem calculator is also quick.
| You know | Rule used | Unique triangle? |
|---|---|---|
| Three sides (SSS) | Law of cosines, then angles | Yes, if the sides form a triangle |
| Two sides and the angle between (SAS) | Law of cosines for the third side, then the angles | Yes |
| Two angles and the side between (ASA) | Angle sum, then the law of sines | Yes |
| Two angles and a side (AAS) | Angle sum, then the law of sines | Yes |
| Two sides and an angle opposite one (SSA) | Law of sines | Not always. It can give zero, one or two triangles |
Area, perimeter and triangle types
The perimeter is the sum of the three sides. The area can be found from the sides alone, using Heron’s formula. For a triangle with sides a, b and c, you first find the semi-perimeter s, which is half the perimeter. Then the area is √(s(s − a)(s − b)(s − c)).
Triangles are also grouped by their angles and sides. An acute triangle has all angles below 90°, a right triangle has one angle of exactly 90°, and an obtuse triangle has one angle above 90°. An equilateral triangle has three equal sides, and an isosceles triangle has two.
For a simple area with a known base and height, the area calculator gives the answer in one step. This tool is better when you only have the sides or the angles.
Tips for solving triangles
Most mistakes come from angle units and from matching sides with the wrong angles. Keep these in mind:
- Check the sum of sides. The two shorter sides must add up to more than the longest side, or no triangle exists.
- Use degrees. Enter angles in degrees, not radians.
- Match each side with its angle. Side a sits opposite angle A, and the same pattern applies to b and c.
- Look for a second answer. With SSA, check whether a second triangle also fits the data.
- Check the total. The three angles should add up to 180° after rounding.
The formula
Law of cosines
c² = a² + b² − 2ab × cos C
- C
- angle opposite side c
Law of sines
a ÷ sin A = b ÷ sin B = c ÷ sin C
- A, B, C
- the three angles
Angle sum
A + B + C = 180°
Area (Heron’s formula)
s = (a + b + c) ÷ 2, Area = √(s(s − a)(s − b)(s − c))
- s
- the semi-perimeter, half of the perimeter
Worked example
A triangle with sides 3, 4 and 5
- 1.Angle A: cos A = (4² + 5² − 3²) ÷ (2 × 4 × 5) = 0.8, so A = 36.8699°.
- 2.Angle B: cos B = (3² + 5² − 4²) ÷ (2 × 3 × 5) = 0.6, so B = 53.1301°.
- 3.Angle C: 180° − 36.8699° − 53.1301° = 90°.
- 4.Perimeter: 3 + 4 + 5 = 12. Semi-perimeter s = 6.
- 5.Area: √(6 × 3 × 2 × 1) = √36 = 6.
The triangle has angles of 36.8699°, 53.1301° and 90°, a perimeter of 12 and an area of 6.
Frequently asked questions
How do I find the angles of a triangle from its sides?
Enter the three sides in the calculator. It uses the law of cosines to find each angle, then checks that the angles add up to 180°. The angles are shown in degrees.
Why can some SSA triangles have two answers?
When you know two sides and an angle opposite one of them, the shorter side can swing to meet the base in two positions. Both can be valid, so the calculator shows each triangle it finds.
What is the perimeter of a triangle?
It is the total length of its three sides. Add a, b and c together. For sides 3, 4 and 5, the perimeter is 12.
Can I use this calculator for a right triangle?
Yes. It works for any triangle, including right triangles. For a right triangle, the angle between the two legs is 90°, so the result is the same as the Pythagorean theorem.
Sources
Last reviewed by the GridCalculators team.