Formula
cos A = (b² + c² − a²) ÷ 2bcc² = a² + b² − 2ab·cos Ca ÷ sin A = b ÷ sin B = c ÷ sin Carea = √(s(s − a)(s − b)(s − c)), s = (a + b + c) ÷ 2
- Law of cosines for SSS and SAS, law of sines for ASA
- Heron's formula for the area
- Angles are in degrees
Three pieces of information, including at least one side, determine a triangle completely.
Worked examples
Sides 5, 6, 7
- What do you know?
- Three sides (SSS)
- Side a
- 5
- Side b
- 6
- Side c
- 7
Area
14.696938
Side a, b, c: 5, 6, 7
Angle A, B, C: 44.415309°, 57.12165°, 78.463041°
Perimeter: 18
Two sides 5 and 7 with a 60° angle
- What do you know?
- Two sides and the angle between them (SAS)
- Side a
- 5
- Side b
- 7
- Angle C between a and b (degrees)
- 60 °
Area
15.155445
Side a, b, c: 5, 7, 6.244998
Angle A, B, C: 43.897886°, 76.102114°, 60°
Perimeter: 18.244998
How it works
A triangle is fixed by three pieces of information if at least one is a side. With three sides (SSS) the angles follow from the law of cosines and the area from Heron's formula. With two sides and the angle between them (SAS) the third side comes from the law of cosines first. With two angles and the side between them (ASA) the third angle is 180° minus the other two and the remaining sides come from the law of sines.
The calculator checks that your numbers can form a triangle — each side must be shorter than the sum of the other two, and the angles must add up to less than 180° — and then reports all sides and angles, the perimeter, the area, the inradius and circumradius, and whether the triangle is equilateral, isosceles or scalene and acute, right or obtuse.
For a right triangle where you only need a missing side, the Pythagorean Theorem Calculator is quicker. Shapes with curved edges are covered by the Circle Calculator, and flat and solid shapes more generally by the Area and Volume Calculator.
Assumptions and limits
- Flat (Euclidean) triangles only. The ambiguous case SSA is not offered because it can have two answers.
- Right-angle detection allows for tiny rounding differences.