CalcFolio

Triangle Calculator

Give this triangle calculator three pieces of information, at least one of them a side, and it solves the whole triangle: the missing sides and angles, the area, the perimeter, all three heights, the inradius and circumradius, and whether the triangle is acute, right or obtuse. In the SSA case it finds every possible triangle, which can be none, one or two.

Updated

Side a is opposite angle A, b opposite B, c opposite C

Any length unit, the same for all sides

In ASA: the side between angles A and B

Opposite side a

Opposite side b

How to use the calculator

Each side is named after the angle opposite it: side a faces angle A, side b faces B, side c faces C. Pick the case that matches what you know:

CaseYou enter
SSSSides a, b and c
SASSides a and b and the angle C between them
ASAAngles A and B and the side c between them
AASAngles A and B and side a, opposite A
SSASides a and b and angle A, opposite a

Lengths can be in any unit, as long as all sides use the same one. Angles are in degrees. Areas come out in that unit squared.

How each case is solved

  • SSS: the law of cosines gives each angle, for example cos A = (b² + c² − a²) ÷ (2bc).
  • SAS: the third side comes from c² = a² + b² − 2ab·cos C, then the angles from the law of cosines.
  • ASA and AAS: the third angle is 180° − A − B, and the law of sines (a ÷ sin A = b ÷ sin B = c ÷ sin C) gives the missing sides.
  • SSA: sin B = b·sin A ÷ a. If that's more than 1, side a can't reach and there's no triangle; there's none either when A is 90° or more and a isn't longer than b. If a is shorter than b and A is acute, B and 180° − B can both work, giving two triangles. If a is longer than b (or equal, with A acute), or a equals b·sin A exactly (a right triangle), there's one.

The area uses Heron's formula, √(s(s − a)(s − b)(s − c)) with s = (a + b + c) ÷ 2, in a form that stays accurate for very thin triangles. From it: each height = 2 × area ÷ that side, inradius = area ÷ s, circumradius = abc ÷ (4 × area).

Before solving, three sides must satisfy the triangle inequality (each side shorter than the other two combined), and two given angles must add up to less than 180°.

Worked examples

1. Area of a triangular lot (SSS)

A corner lot has sides of 40, 55 and 70 ft. The area is 1,097.849460 ft² and the perimeter 165 ft. The largest angle, opposite the 70-ft side, is 93.583322°, so the lot is slightly obtuse rather than right-angled.

2. Two fence runs at 120° (SAS)

Fences of 8 ft and 11 ft meet at a 120° corner. The open side measures 16.522712 ft, and the enclosed area is 38.105118 ft².

3. Distance across a creek (ASA)

Lay out a 500-ft baseline along one bank and sight a tree on the far side from each end: 52° at one end and 61° at the other. The third angle is 67°, the sides to the tree are 428.031830 ft and 475.076098 ft, and the height to the baseline, the straight distance across, is 374.365074 ft.

4. The ambiguous case (SSA)

With a = 5, b = 6 and A = 40°, there are two triangles:

Angle BAngle CSide cArea
Solution 150.474835°89.525165°7.77835214.999485
Solution 2129.525165°10.474835°1.4141812.727055

Change a to 7 (longer than b) and only one triangle remains; change it to 3 and there is none.

Frequently asked questions

Can I solve a triangle from three angles (AAA)?

No. Three angles fix the shape but not the size: a triangle with angles 40°, 60° and 80° can be any size. You need at least one side length.

Why are there sometimes two answers?

In the SSA case, the side opposite the known angle can swing to two positions when it's shorter than the other given side but long enough to reach. One position gives an acute angle B, the other its supplement, 180° − B. The calculator lists both in the table.

How do I check whether three lengths make a triangle?

Each side must be shorter than the sum of the other two. 3, 4 and 8 fail because 3 + 4 is less than 8; the calculator shows an error instead of a result.

How do I tell if a triangle is a right triangle?

Enter the three sides in SSS mode and look at the classification. Sides 3, 4 and 5 give a 90° angle C, area 6, inradius 1 and circumradius 2.5, half the hypotenuse, as in every right triangle.

What is the area of an equilateral triangle with side 2?

The calculator returns 1.732051, which is √3. All three angles are 60° and all three heights are equal, 1.732051 as well.

Can I enter angles in radians?

No, angles are in decimal degrees. Convert radians by multiplying by 180 ÷ π, and degrees-minutes-seconds by dividing the minutes by 60 and the seconds by 3,600.

Sources

  1. Wolfram MathWorld — Law of Cosines
  2. Wolfram MathWorld — Heron's Formula
  3. Wikipedia — Solution of triangles

Results are computed in floating-point arithmetic and rounded for display. Field measurements carry their own error, so treat survey-style results as estimates.