Enter three known sides or angles and solve the whole triangle — every side and angle, plus area, perimeter, heights and the triangle type — with the working shown.
How to use the triangle calculator
Choose what you know about the triangle from the menu, then enter those three values. The calculator uses standard labelling: sides a, b and c are opposite angles A, B and C. Angles are in degrees. It then solves for every remaining side and angle and reports the area, perimeter, triangle type, all three heights and medians, the inradius and the circumradius, with each step of the law of sines or law of cosines written out.
- SSS — three sides.
- SAS — two sides and the angle between them (here a, b and C).
- ASA — two angles and the side between them (A, B and c).
- AAS — two angles and a side that is not between them (A, B and a).
- SSA — two sides and an angle that is not between them (a, b and A). This is the "ambiguous case" and can have zero, one or two solutions.
Three angles alone (AAA) do not fix a triangle's size — every scaled copy has the same angles — so at least one side is always required.
Triangle formulas
The law of cosines is a generalisation of the Pythagorean theorem: when C = 90°, cos C = 0 and it becomes c² = a² + b². The second area expression is Heron's formula, which needs only the three sides.
Worked example (SSS)
A triangle has sides a = 5, b = 6 and c = 7.
- cos A = (6² + 7² − 5²) ÷ (2 × 6 × 7) = 60 ÷ 84 = 0.7143, so A ≈ 44.42°.
- cos B = (5² + 7² − 6²) ÷ (2 × 5 × 7) = 38 ÷ 70 = 0.5429, so B ≈ 57.12°.
- C = 180° − 44.42° − 57.12° ≈ 78.46°.
- The semi-perimeter is s = 9, so by Heron's formula the area is √(9 × 4 × 3 × 2) = √216 ≈ 14.70. The perimeter is 18.
Because the largest angle is under 90° and all sides differ, this is a scalene acute triangle.
The ambiguous SSA case
When you know two sides and an angle opposite one of them, the law of sines gives sin B, and two angles share that sine: B and 180° − B. If both make a valid triangle (angles summing to less than 180°), there are two different solutions. With the defaults a = 5, b = 6 and A = 40°, sin B ≈ 0.7713, giving B ≈ 50.47° or B ≈ 129.53° — both valid — so the calculator shows both triangles. If side a is too short to reach the opposite side (sin B > 1), no triangle exists; if a ≥ b, exactly one triangle fits.
Classifying triangles
| By sides | Rule | By angles | Rule |
|---|---|---|---|
| Equilateral | All sides equal | Acute | All angles < 90° |
| Isosceles | Two sides equal | Right | One angle = 90° |
| Scalene | No sides equal | Obtuse | One angle > 90° |
Practical uses
Surveyors use the law of sines to find distances to points they cannot reach (triangulation). Carpenters and roofers solve SAS triangles to cut angled pieces, and navigators combine bearings and distances the same way. For the area of other shapes, see the area calculator; for converting between angle measures or doing more trigonometry, use the scientific calculator.
Cite or link to this page
Using this triangle calculator in an article, report or homework? Copy a citation or a ready-made link:
Calcivia. (2026). Triangle Calculator. Retrieved October 31, 2026, from https://www.calcivia.com/triangle-calculator/"Triangle Calculator." Calcivia, 2026, https://www.calcivia.com/triangle-calculator/. Accessed 31 Oct. 2026.<a href="https://www.calcivia.com/triangle-calculator/">Triangle Calculator</a> by Calcivia