How the triangle calculator works
Solve any triangle from three of its parts: three sides, two sides and an angle, or two angles and a side. You get every side and angle, the area, perimeter, heights and the type, and both answers when two triangles fit.
Formula
Law of cosines: c² = a² + b² − 2ab cos C. Law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C. A + B + C = 180°. Area = ½ab sin C, or Heron's √(s(s−a)(s−b)(s−c)). Height onto a side = 2 × area ÷ that side.
- 1
Find an angle from the three sides
For sides 3, 4 and 5 cm: cos C = (3² + 4² − 5²) ÷ (2 × 3 × 4) = 0, so C = 90°.
- 2
Find the other angles
cos A = (4² + 5² − 3²) ÷ (2 × 4 × 5) = 0.8, so A = 36.87°, and B = 180° − 90° − 36.87° = 53.13°.
- 3
Work out the area and perimeter
Area = ½ × 3 × 4 × sin 90° = 6 cm², and the perimeter is 3 + 4 + 5 = 12 cm.
- 4
Find the heights
Each height is 2 × 6 ÷ its side: 4 cm onto a, 3 cm onto b and 2.4 cm onto c. It is a right scalene triangle.
Worked example
The calculator opens with these values
- What do you know?
- Three sides (SSS)
- Side a
- 3
- Side b
- 4
- Side c
- 5
- Unit of the lengths
- Centimeters (cm)
The missing parts
A = 36.87°, B = 53.13°, C = 90°
Special and well-known triangles
The 45-45-90 and 30-60-90 triangles appear in set squares, roof pitches and exam questions because their sides follow fixed ratios. Scale any row up: a 30-60-90 triangle with a 10 cm short side has sides 10, 10√3 ≈ 17.32 and 20 cm.
| Triangle | Sides a, b, c | Angles A, B, C | Area | Type |
|---|---|---|---|---|
| Equilateral | 1, 1, 1 | 60°, 60°, 60° | 0.433 square units | Acute equilateral triangle |
| 45-45-90 | 1, 1, √2 | 45°, 45°, 90° | 0.5 square units | Right isosceles triangle |
| 30-60-90 | 1, √3, 2 | 30°, 60°, 90° | 0.866 square units | Right scalene triangle |
| 3-4-5 | 3, 4, 5 | 36.87°, 53.13°, 90° | 6 square units | Right scalene triangle |
| 5-12-13 | 5, 12, 13 | 22.62°, 67.38°, 90° | 30 square units | Right scalene triangle |
| Isosceles | 5, 5, 8 | 36.87°, 36.87°, 106.26° | 12 square units | Obtuse isosceles triangle |
| Scalene | 7, 8, 9 | 48.19°, 58.41°, 73.4° | 26.8328 square units | Acute scalene triangle |
| Obtuse | 4, 5, 8 | 24.15°, 30.75°, 125.1° | 8.1815 square units | Obtuse scalene triangle |
Which rule solves which triangle
The calculator picks the method from what you know. By hand, follow the same order.
- Three sides (SSS): use the law of cosines for one angle, then again or the angle sum for the rest.
- Two sides and the angle between them (SAS): the law of cosines gives the third side first.
- Two angles and a side (ASA or AAS): subtract from 180° for the third angle, then use the law of sines.
- Two sides and an angle not between them (SSA): use the law of sines, then check whether a second triangle fits.
- A right triangle: the Pythagorean theorem and sin = opposite ÷ hypotenuse, cos = adjacent ÷ hypotenuse, tan = opposite ÷ adjacent are quicker.
Rules every triangle follows
These checks catch most mistakes in a drawing or a set of measurements.
- Each side is shorter than the other two added together: 2, 3 and 6 cannot make a triangle.
- An outside angle equals the two inside angles opposite it added together.
- Triangles with the same angles are similar, so their sides keep the same ratio. A 2 m pole with a 3 m shadow means a tree with an 18 m shadow is 2 ÷ 3 × 18 = 12 m tall.
Common questions
What is the ambiguous case (SSA)?
When you know two sides and an angle that is not between them, the third side is not always fixed: the shorter side can meet the base at two points. With a = 3, b = 4 and A = 30°, angle B is 41.81° or 138.19°, and the calculator shows both triangles.
Why can't I solve a triangle from three angles?
Three angles fix the shape but not the size: a small and a large triangle can have the same angles. You need at least one side.
How do I tell if a triangle is right, acute or obtuse?
Look at the largest angle: exactly 90° is right, under 90° is acute and over 90° is obtuse. From the sides, compare c² with a² + b² for the longest side c.
Which side is a, b or c?
Each side carries the letter of the angle across from it: side a faces angle A, and so on.
Related calculators
Pythagorean Theorem
Calculate sides of a right triangle using Pythagorean theorem
Area Calculator
Area and perimeter of rectangles, triangles, circles, polygons and more
Circle Calculator
Calculate area, circumference, and diameter of circles
Scientific Calculator
Trig, logs, roots, powers, factorials and Ans with an on-screen keypad