Geometry · Triangles
Triangle calculator icon showing triangle ABC with sides a, b, c and angles A, B, C

Triangle calculator

This triangle calculator solves any triangle from three known parts: three sides (SSS), two sides and the angle between them (SAS), two angles and a side (ASA or AAS), or two sides and an angle that is not between them (SSA, the ambiguous case). It returns the missing sides and angles, area, perimeter, heights and triangle type, with every step written out.

Side a is always opposite angle A, b opposite B and c opposite C. The default example is the 13-14-15 triangle in centimeters; switch the case to try SSA with a = 13, b = 14 and A = 50°, which has two solutions.

Triangle calculator: solve any triangle

Choose what you know, enter three values and read the missing sides, angles, area and heights.
All lengths in this calculator use this unit; areas come out in square units and volumes in cubic units.
In ASA, c is the side between angles A and B.

How to use the triangle calculator

First decide which three parts of the triangle you know, then pick that case from the menu. Label the triangle so that each side has the same letter as the angle across from it: side a faces angle A, side b faces angle B and side c faces angle C. Choose the length unit once; every side uses it, and the area comes out in square units with a conversion to m² and ft². Angles can be in degrees or radians. The triangle calculator draws the triangle to scale, and “Show the working” lists each step with your numbers.

Three angles alone (AAA) do not fix a triangle, because every scaled copy has the same angles; a triangle calculator always needs at least one side. If your triangle has a 90° angle, the Right Triangle Calculator is quicker and adds SOH-CAH-TOA ratios, and the Pythagorean Theorem Calculator finds a missing side from the other two.

Which triangle calculator case do you have?

CaseYou knowFirst stepSolutions
SSSall three sideslaw of cosines for one angleone, if the longest side is shorter than the other two combined
SAStwo sides and the angle between themlaw of cosines for the third sidealways one
ASAtwo angles and the side between themthird angle = 180° − A − Bone, if A + B is under 180°
AAStwo angles and a side opposite one of themthird angle, then law of sinesone, if A + B is under 180°
SSAtwo sides and an angle not between themlaw of sines for the second anglezero, one or two

Triangle calculator formulas

The law of cosines solves SSS and SAS; when C = 90° it reduces to the Pythagorean theorem, because cos 90° = 0:

c² = a² + b² − 2ab·cos C; cos A = (b² + c² − a²) / (2bc)

The law of sines says each side divided by the sine of its opposite angle gives the same number, the diameter 2R of the circumscribed circle:

a / sin A = b / sin B = c / sin C = 2R

Once all sides are known, the triangle calculator finds the area with Heron’s formula, which needs no height, and then each height from the area:

s = (a + b + c) / 2; Area = √(s(s − a)(s − b)(s − c)); h_a = 2·Area / a

The inradius is r = Area / s and the circumradius is R = abc / (4·Area). The derivations are in OpenStax Algebra and Trigonometry 2e, section 10.1 (law of sines) and section 10.2 (law of cosines and Heron’s formula).

Worked example: the 13-14-15 triangle

The default values of the triangle calculator describe sides a = 13 cm, b = 14 cm and c = 15 cm (case SSS). The longest side, 15, is shorter than 13 + 14 = 27, so the triangle exists.

Angles. cos A = (14² + 15² − 13²) / (2 × 14 × 15) = 252 / 420 = 0.6, so A = 53.1301°. cos B = (13² + 15² − 14²) / (2 × 13 × 15) = 198 / 390 = 0.507692, so B = 59.4898°. Then C = 180° − 53.1301° − 59.4898° = 67.3801°. The triangle is acute and scalene.

Area and perimeter. The perimeter is 42 cm and s = 21 cm. Heron’s formula gives √(21 × 8 × 7 × 6) = √7056 = 84 cm². The heights are h_a = 2 × 84 / 13 = 12.9231 cm, h_b = 168 / 14 = 12 cm and h_c = 168 / 15 = 11.2 cm. The inradius is 84 / 21 = 4 cm and the circumradius 13 × 14 × 15 / (4 × 84) = 8.125 cm, exactly what the triangle calculator shows when the page loads.

The SSA ambiguous case

Now switch the triangle calculator to SSA with a = 13 cm, b = 14 cm and A = 50°. Side a swings from corner C like a compass and can meet the base line twice. The height from C is h = 14 × sin 50° = 10.7246 cm. Because a lies between h and b, there are two triangles. The law of sines gives sin B = 14 × sin 50° / 13 = 0.824971, so B₁ = 55.5855° and C₁ = 74.4145° with c₁ = 16.3463 cm (area 87.654 cm²), or B₂ = 180° − B₁ = 124.414° and C₂ = 5.5855° with c₂ = 1.65175 cm (area 8.8572 cm²). The triangle calculator reports and draws both. The sin⁻¹ key only returns the acute angle, which is why the second triangle is often missed.

Angle AConditionNumber of triangles
acutea shorter than b·sin Anone (a is too short)
acutea = b·sin Aone right triangle
acutea between b·sin A and btwo (ambiguous case)
acutea ≥ bone
right or obtusea ≤ bnone
right or obtusea longer than bone

Types of triangles

The triangle calculator names the type from the angles and the sides. With c the longest side, compare c² with a² + b²: smaller means acute, equal means right, larger means obtuse. For 13-14-15, 225 is less than 365, so it is acute.

TypeTestExample sides
Equilateralthree equal sides, all angles 60°5, 5, 5 (area 10.8253)
Isoscelestwo equal sides, two equal angles5, 5, 8
Scaleneno equal sides13, 14, 15
Rightc² = a² + b²3, 4, 5 and 5, 12, 13
Obtusec² larger than a² + b²4, 6, 9
Acutec² smaller than a² + b²6, 7, 8

Practical uses of a triangle calculator

Land and garden plots. Tape the three sides of a triangular corner lot and use SSS for the area of seed, sod or mulch; split larger plots into triangles along diagonals, or use the Area Calculator. Roofs. A gable with a known span and pitch angle is an ASA problem, and the rafter is a side. Surveying. Two angles measured from the ends of a known baseline (ASA) locate a distant point, the idea behind triangulation. Fencing. The perimeter is the edging length; see the Perimeter Calculator for other shapes. Convert mixed feet and inches with the Feet and Inches Calculator before using the triangle calculator.

Common triangle calculator mistakes

Degrees vs radians. sin 50 in radian mode is −0.262, not 0.766; this triangle calculator always works in degrees and converts radians for you. Mismatched labels. Side a must be opposite angle A. Missing the second SSA triangle. Always check whether 180° − B₁ also works. Law of sines for an obtuse angle. sin⁻¹ cannot tell 40° from 140°, so after SAS use the law of cosines. Rounding too early. Keep four decimals in intermediate angles. Impossible data. Sides 3, 4 and 8 do not form a triangle; the triangle calculator explains why instead of returning a wrong number.

Related calculators

For right triangles use the Right Triangle Calculator or the Pythagorean Theorem Calculator; for areas and perimeters of other shapes, the Area Calculator and Perimeter Calculator. The Distance Calculator gives side lengths from corner coordinates.

Frequently asked questions

How do I solve a triangle with three sides?

Use the law of cosines for two angles, for example cos C = (a² + b² − c²) / (2ab), and subtract both from 180°; Heron’s formula gives the area. Choose SSS in the triangle calculator to do all of this at once.

When is a triangle impossible?

Three sides fail when the longest is at least the sum of the other two (3, 4, 8); two angles fail when they add up to 180° or more. In SSA there is no triangle when a is shorter than b·sin A, or when A is right or obtuse and a is not the longest side.

Why does SSA sometimes give two triangles?

The given side opposite the angle can swing to two positions and meet the third side twice. This happens when A is acute and a lies between b·sin A and b.

How do I find the area of a triangle without the height?

With three sides, use Heron’s formula. With two sides and the angle between them, area = ½·ab·sin C. For the 13-14-15 triangle both give 84 square units.

Do the angles of every triangle add up to 180°?

Yes, for any flat (Euclidean) triangle. That is why ASA and AAS need only two angles; the triangle calculator finds the third as 180° minus the other two.

Is this triangle calculator free?

Yes. It runs in your browser, needs no sign-up and does not store or send the values you enter.