Triangle Calculator

Enter what you know, and see the missing sides, angles, formulas, and a labeled diagram.

How Do You Solve a Triangle?

A triangle may look simple, but one shape can contain a surprising amount of information. Every triangle has three sides, three interior angles, a perimeter, and an area. If enough of those measurements are known, the missing values can often be calculated. That is what this Triangle Calculator does.

The key is determining what information you already know. For example, you might know all three sides, two sides and an angle, two angles and one side, or that the triangle contains a 90 degree angle. Different information requires different formulas. That is why triangle problems are usually described using abbreviations such as SSS, SAS, ASA, and AAS. The letters tell you whether the known measurements are sides or angles.

The Six Basic Parts of a Triangle
Every triangle has three vertices (A, B, C) and three sides. Each side is named for the vertex it sits across from: side a is always opposite Angle A, side b is opposite Angle B, and side c is opposite Angle C. This same relationship is used throughout the calculator, the diagrams, and every example on this page.

Why Do Triangle Angles Always Add to 180 Degrees?

For every ordinary Euclidean triangle, Angle A plus Angle B plus Angle C equals 180 degrees. This gives us one of the easiest triangle shortcuts. Suppose A = 50 degrees and B = 60 degrees. Then C = 180 - 50 - 60 = 70 degrees. You do not need a special theorem for that calculation, you simply use the triangle angle-sum rule. This rule is especially important in ASA and AAS problems, because two known angles immediately give you the third.

50° + 60° + 70° = 180°
50° + 60° + 70°
180°

What Does SSS Mean?

SSS means Side-Side-Side. You know all three side lengths. Example: a = 3, b = 4, c = 5. Once all three sides are known, the triangle is completely determined. The missing angles can be found using the Law of Cosines. For Angle C: c² = a² + b² - 2ab cos(C). Rearranged: cos(C) = (a² + b² - c²) / (2ab). Using 3, 4, 5: cos(C) = (3² + 4² - 5²) / (2 × 3 × 4) = (9 + 16 - 25) / 24 = 0. cos⁻¹(0) = 90°. So a 3-4-5 triangle is a right triangle.

What Is the Law of Cosines?

The Law of Cosines connects all three sides of a triangle with one of its angles. It is c² = a² + b² - 2ab cos(C), with equivalent versions for sides a and b. It is especially useful for SSS and SAS triangle problems.

You may notice something interesting. If C = 90°, then cos(90°) = 0, and the final term disappears. The formula becomes c² = a² + b², which is exactly the Pythagorean theorem. So the Pythagorean theorem can be thought of as a special right-triangle case of the Law of Cosines.

Law of Cosines Becomes the Pythagorean Theorem
General triangle: c² = a² + b² - 2ab cos(C)
If C = 90°, then cos(90°) = 0
Therefore: c² = a² + b²

What Does SAS Mean?

SAS means Side-Angle-Side. You know two sides and the angle directly between them. Example: a = 5, b = 7, C = 60°. The included angle matters. The Law of Cosines can calculate the missing third side: c² = 5² + 7² - 2(5)(7)cos(60°). Since cos(60°) = 0.5, we have c² = 25 + 49 - 70(0.5) = 74 - 35 = 39. Therefore c = √39 ≈ 6.245. Once the third side is known, the remaining angles can also be solved.

What Does "Included Angle" Mean?

An included angle is the angle located directly between the two known sides. If sides a and b are known, their included angle is C. Visual positioning matters, which is why triangle diagrams should label the sides and angles clearly.

Included Angle vs. Non-Included Angle
Angle C is included between sides a and b.
Angle B is not between sides a and b, it is a non-included angle.

What Does ASA Mean?

ASA means Angle-Side-Angle. You know two angles and the side between them. Suppose A = 50°, B = 60°, and c = 10. First calculate C: C = 180° - 50° - 60° = 70°. Now all three angles are known. The remaining sides can be calculated using the Law of Sines.

What Is the Law of Sines?

The Law of Sines says a / sin(A) = b / sin(B) = c / sin(C). This means each side length is connected to the sine of its opposite angle. If one full side-plus-opposite-angle pair is known, that ratio can be used to find another side. For example, with c = 10 and C = 70°, to find a when A = 50°, use a / sin(50°) = 10 / sin(70°), then solve for a. The calculator shows these substitutions instead of simply displaying a result.

Law of Sines: Each Side Pairs with Its Opposite Angle
a / sin(A) = b / sin(B) = c / sin(C)

What Does AAS Mean?

AAS means Angle-Angle-Side. Like ASA, you know two angles and one side, but the known side is not located between the two known angles. The first step is still easy: find the third angle using A + B + C = 180°. Then use the Law of Sines. The important thing is having at least one known side and its opposite angle available after the angles are solved.

How Do You Solve a Right Triangle?

A right triangle contains one 90° angle. That gives you special tools. The most famous is the Pythagorean theorem. For legs a and b and hypotenuse c: a² + b² = c². The hypotenuse is always opposite the 90° angle and is the longest side. Example: a = 3, b = 4. Then c² = 3² + 4² = 9 + 16 = 25. c = √25 = 5. So the side lengths are 3, 4, 5.

9 + 16 = 25
3² = 9 + 4² = 16 = 5² = 25
A square built on each leg has an area equal to that leg squared. The two smaller squares (9 and 16) together cover exactly the same area as the square on the hypotenuse (25). That is why a² + b² = c².

How Do Trig Functions Help Solve Right Triangles?

When one side and one acute angle are known, you can often use sine, cosine, or tangent. A common memory tool is SOH-CAH-TOA. SOH: sin(θ) = Opposite / Hypotenuse. CAH: cos(θ) = Adjacent / Hypotenuse. TOA: tan(θ) = Opposite / Adjacent. Suppose θ = 30° and Hypotenuse = 10. To find the opposite side: sin(30°) = Opposite / 10. Since sin(30°) = 0.5, we have 0.5 = Opposite / 10. Multiply by 10: Opposite = 5.

If you need direct trig calculations on their own, the Scientific Calculator can help with sine, cosine, tangent, and inverse trig functions.

SOH-CAH-TOA
SOH
sinθ = Opp/Hyp
CAH
cosθ = Adj/Hyp
TOA
tanθ = Opp/Adj

How Do You Find the Area of a Triangle?

The most familiar formula is Area = 1/2 × base × height. Suppose base = 8, height = 5. Area = 1/2 × 8 × 5 = 4 × 5 = 20. The height must be perpendicular to the base, it is not simply any side of the triangle.

Height Must Be Perpendicular to the Base
A = ½bh
A = 20

What If I Know Three Sides but Not the Height?

Then you can use Heron's formula. Suppose the sides are 3, 4, 5. First calculate the semiperimeter: s = (a + b + c) / 2 = (3 + 4 + 5) / 2 = 12 / 2 = 6. Then Area = √[s(s-a)(s-b)(s-c)]. Substitute: √[6(6-3)(6-4)(6-5)] = √(6 × 3 × 2 × 1) = √36 = 6. That matches the familiar right-triangle formula: 1/2 × 3 × 4 = 6.

A semiperimeter is simply half the perimeter. If a + b + c = 12, then s = 6. Semiperimeter is especially useful in Heron's formula.

Heron's Formula, Step by Step
Sides: 3, 4, 5
Perimeter: 12
Semiperimeter: 6
Area: √[6 × 3 × 2 × 1]
Area = 6

How Do You Classify a Triangle by Its Sides?

Triangles can be classified by side length. Equilateral: all three sides equal, for example 5, 5, 5. An equilateral triangle also has three 60° angles. Isosceles: two sides equal, for example 5, 5, 8. The angles opposite the equal sides are also equal. Scalene: all three sides different, for example 3, 4, 5. The calculator automatically identifies the side classification once the triangle has been solved.

Triangle Types by Sides
Equilateral
3 equal sides
Isosceles
2 equal sides
Scalene
No equal sides

How Do You Classify a Triangle by Its Angles?

Triangles can also be classified using their angles. Acute: all three angles are less than 90°. Right: exactly one angle is 90°. Obtuse: one angle is greater than 90°. A triangle cannot have two right angles or two obtuse angles, because the total would exceed 180°.

Triangle Types by Angles
Acute
All angles < 90°
Right
One angle = 90°
Obtuse
One angle > 90°

What Is the Triangle Inequality Theorem?

Not every three positive side lengths can form a triangle. For a valid triangle, the sum of any two sides must be greater than the third side. Example: 3, 4, 5. Check: 3 + 4 > 5, 4 + 5 > 3, 3 + 5 > 4. All are true, a triangle exists. Now try 1, 2, 4. Check: 1 + 2 = 3, but 3 is not greater than 4. Those sides cannot close into a triangle. The calculator rejects them instead of producing imaginary results.

Why 1, 2, 4 Cannot Form a Triangle
1 + 2 = 3, which is too short to close the shape against a side of length 4. Compare that with 3 + 4 > 5, which does close into a valid triangle.

What Is an Inradius?

The inradius is the radius of the largest circle that fits entirely inside a triangle while touching all three sides. That circle is called the incircle. If the triangle's area and semiperimeter are known: r = Area / s. This is an advanced triangle measurement, so it does not clutter the primary calculator result, it appears under More Triangle Details.

What Is a Circumradius?

The circumradius belongs to a different circle. The circumcircle passes through all three triangle vertices, and its radius is R. When all sides and area are known: R = abc / (4 × Area). Do not confuse inradius r with circumradius R.

Incircle vs. Circumcircle
Incircle, radius r, touches all three sides.
Circumcircle, radius R, passes through all three vertices.

What Is a Median of a Triangle?

A median is a line segment drawn from a vertex to the midpoint of the opposite side. Every triangle has three medians, and all three meet at one point called the centroid, sometimes described as the triangle's balancing point. Median lengths can be calculated when the side lengths are known. This is another advanced result that belongs under More Triangle Details rather than the main answer.

What Is an Altitude?

An altitude is a perpendicular line from a vertex to the opposite side, or to the line containing that side. The altitude provides the height used in many triangle area calculations. In an acute triangle, all altitudes lie inside the triangle. In some obtuse triangles, an altitude may extend outside the visible triangle, which does not make it incorrect.

What Is the Perimeter of a Triangle?

The perimeter is much simpler: add the three side lengths, P = a + b + c. For 3, 4, 5: P = 3 + 4 + 5 = 12. Once the calculator knows all three sides, the perimeter is shown automatically.

Why Does a Diagram Help So Much with Triangles?

Triangle formulas rely heavily on relationships. Which side is opposite which angle? Which angle is included? Which side is the hypotenuse? Which measurement is actually the height? A diagram makes those relationships visible. That is why this calculator does not provide only a list of numbers, it draws and labels the triangle whenever possible.

What Are Common Triangle Mistakes?

One common mistake is pairing the wrong side with the wrong opposite angle when using the Law of Sines. Remember: side a pairs with Angle A, side b pairs with Angle B, side c pairs with Angle C. Another common mistake is using the Pythagorean theorem on a triangle that is not a right triangle, the Pythagorean theorem requires a 90° angle, and for general triangles the Law of Cosines or Law of Sines may be appropriate instead. Another mistake is assuming the height is simply one of the sides, the height must be perpendicular to the chosen base. Another is forgetting that triangle angles must add to 180°.

What should you leave this page knowing? Not just "the missing side is 5," but how triangle sides and angles are labeled, why the three interior angles add to 180°, what SSS, SAS, ASA, and AAS each mean, when the Law of Cosines and Law of Sines are useful, how the Pythagorean theorem fits into triangle math, how SOH-CAH-TOA solves right triangles, how triangle area and Heron's formula work, how to classify triangles by sides and by angles, why some sets of three sides cannot form a triangle, the difference between an incircle and a circumcircle, and what a median and altitude represent. Most importantly: you can see how a triangle's measurements fit together.

Practice with Real Triangle Problems

Problem 1: Angle Sum. A = 45°, B = 65°. Find C.
C = 180 - 45 - 65
Answer: C = 70°
Problem 2: Pythagorean Theorem. Legs 6 and 8.
c² = 6² + 8² = 36 + 64 = 100
Answer: c = 10
Problem 3: SSS / Law of Cosines. Sides 3, 4, 5. Find Angle C opposite side 5.
cos(C) = (3² + 4² - 5²) / (2 × 3 × 4) = 0
Answer: C = 90°
Problem 4: SAS. a = 5, b = 7, C = 60°.
c² = 25 + 49 - 70(0.5) = 39
Answer: c ≈ 6.245
Problem 5: Area. Base 10, height 6.
Area = 1/2 × 10 × 6
Answer: 30
Problem 6: Heron's Formula. Sides 5, 5, 6.
s = (5 + 5 + 6) / 2 = 8
Area = √[8(3)(3)(2)] = √144
Answer: 12
Problem 7: Triangle Inequality. Sides 2, 3, 6.
2 + 3 = 5, and 5 is not greater than 6
Result: these sides cannot form a triangle
Problem 8: Classification. Sides 7, 7, 10.
Two equal sides
Result: Isosceles

Try It Yourself

A right triangle has legs 5 and 12. What is the hypotenuse?

Triangle Formulas at a Glance

What You NeedFormula
Third angleC = 180° - A - B
PerimeterP = a + b + c
Right trianglea² + b² = c²
Law of Cosinesc² = a² + b² - 2ab cos(C)
Law of Sinesa/sin(A) = b/sin(B) = c/sin(C)
Base-height areaA = ½bh
Semiperimeters = (a+b+c)/2
Heron's areaA = √[s(s-a)(s-b)(s-c)]
Inradiusr = A/s
CircumradiusR = abc/(4A)

Triangle Calculator or Another Math Tool?

Triangle Calculator

I know triangle sides or angles and need to solve the missing measurements.

You are here

Scientific Calculator

I need sine, cosine, tangent, inverse trig, powers, roots, or logarithms.

Open Scientific Calculator →

Area Calculator

I need the area of a shape other than a triangle, like a circle, square, or rectangle.

Open Area Calculator →

Percentage Calculator

I need percentage, percent-change, increase, decrease, or reverse-percentage calculations.

Open Percentage Calculator →

Fraction Calculator

I need fraction arithmetic, simplification, mixed numbers, or conversions.

Open Fraction Calculator →

Questions People Actually Ask

How many degrees are in a triangle?

The three interior angles of a Euclidean triangle total 180°.

How do I find a missing triangle angle?

Subtract the known angles from 180°.

What does SSS mean?

SSS means all three sides are known.

What does SAS mean?

SAS means two sides and the included angle are known.

What does ASA mean?

ASA means two angles and the included side are known.

What does AAS mean?

AAS means two angles and a non-included side are known.

What is the Law of Cosines?

It relates the three sides of a triangle to one angle and is commonly used for SSS and SAS problems.

What is the Law of Sines?

It states that each side divided by the sine of its opposite angle has the same ratio.

When should I use the Pythagorean theorem?

Use it for right triangles.

What is the hypotenuse?

The hypotenuse is the side opposite the 90° angle and is the longest side of a right triangle.

What is a 3-4-5 triangle?

A triangle with sides 3, 4, and 5 is a right triangle because 3² + 4² = 5².

What is SOH CAH TOA?

It is a memory tool for sine, cosine, and tangent relationships in right triangles.

How do I find triangle area?

One common formula is 1/2 × base × height. Other formulas can be used when different measurements are known.

What is Heron's formula?

Heron's formula finds triangle area when all three sides are known.

What is the perimeter of a triangle?

Add all three sides.

What is an equilateral triangle?

A triangle with three equal sides and three 60° angles.

What is an isosceles triangle?

A triangle with two equal sides.

What is a scalene triangle?

A triangle with three different side lengths.

What is an acute triangle?

A triangle whose three angles are all less than 90°.

What is a right triangle?

A triangle with one 90° angle.

What is an obtuse triangle?

A triangle with one angle greater than 90°.

Can any three lengths make a triangle?

No. The sum of any two sides must be greater than the third side.

Can a triangle have two 90-degree angles?

No. That would already total 180° before the third angle.

Can a triangle have two obtuse angles?

No. Two angles greater than 90° would exceed the 180° total.

What is an inradius?

The inradius is the radius of the circle that fits inside the triangle and touches all three sides.

What is a circumradius?

The circumradius is the radius of the circle that passes through all three triangle vertices.

What is a triangle median?

A median connects a vertex to the midpoint of the opposite side.

What is an altitude?

An altitude is a perpendicular segment from a vertex to the opposite side or its extended line.

Does the triangle drawing show the exact scale?

When practical, the calculator draws a proportional representation of your triangle. If extreme dimensions require a schematic instead, it clearly says the diagram is not drawn exactly to scale.

Triangle Formulas and Methodology

How This Calculator Solves a Triangle

Angle sumA + B + C = 180°
Triangle inequalitya+b>c, a+c>b, b+c>a
PerimeterP = a + b + c
Pythagorean theorema² + b² = c²
Law of Cosinesc² = a² + b² - 2ab cos(C)
Law of Sinesa/sin(A) = b/sin(B) = c/sin(C)
Base-height areaA = ½bh
SAS areaA = ½ab sin(C)
Heron's formulaA = √[s(s-a)(s-b)(s-c)]
Semiperimeters = (a+b+c)/2
Inradiusr = A/s
CircumradiusR = abc/(4A)

The Law of Cosines needs either three sides (SSS) or two sides and the included angle (SAS). The Law of Sines needs at least one full side-and-opposite-angle pair, which is why it is used for ASA and AAS problems once the third angle is known. The Pythagorean theorem only applies when one angle is exactly 90°. Heron's formula and the base-height formula both find area, but need different starting information: Heron's formula needs all three sides, while the base-height formula needs a base and a perpendicular height. Every result is checked against the triangle inequality and the 180° angle sum before it is displayed, so an impossible triangle is never silently calculated.

This calculator is provided for educational and general reference purposes. While every effort has been made to ensure accuracy, always double-check results for high-stakes academic, engineering, or construction work, and consult a qualified professional or your course materials when precision is critical.