Triangle calculator

Three sides, or two sides and the included angle. Area, angles, and a sketch that scales with the inputs.

Report error
Area
Heron’s or (1/2)ab sin C
Angles A · B · C
degrees
Perimeter

Sketch

Angle share

Sides and angles

abc
Opposite A is a. Angles sum to 180°.

Given

Triangle Geometry Guide

Triangle Geometry: Formulas, Types, and How to Solve Triangles

A triangle is one of the simplest geometric figures, but a surprisingly large amount of geometry can be built from its three sides and three angles. The important part is not memorizing every formula separately. Once the relationship between the sides and angles is clear, most triangle problems become a sequence of small steps.

A triangle has three vertices and three line segments connecting them. We usually label the vertices A, B, and C, and use lowercase a, b, and c for the sides opposite those angles.

A B C c b a B C A
Side a is opposite angle A, side b is opposite B, and side c is opposite C.

How to Classify Triangles by Sides and Angles

There are two useful ways to classify a triangle: by its side lengths and by its angles.

If all three sides have the same length, the triangle is equilateral. If two sides are equal, it is isosceles. If all three side lengths are different, it is scalene.

Equilateral Isosceles Scalene

By angle, a triangle can be acute, right, or obtuse. An acute triangle has three angles below 90°. A right triangle has exactly one 90° angle. An obtuse triangle has one angle greater than 90°.

Acute Right Obtuse

Triangle Basics: Angle Sum, Triangle Inequality, and Side-Angle Relationships

The three interior angles of every triangle add to 180°.

A + B + C = 180°

This gives a very quick way to find a missing angle. If A = 48° and B = 67°, then

C = 180° − 48° − 67°
C = 65°

There is also a simple test for the side lengths. The sum of any two sides must be greater than the third side. For sides 4, 6, and 9, for example, 4 + 6 > 9, so the lengths can form a triangle. If the largest side were 10 instead, 4 + 6 = 10 and the triangle would collapse into a straight line.

The largest angle is always opposite the longest side. The smallest angle is opposite the shortest side. This observation is often enough to estimate whether an answer makes sense before doing any detailed calculation.

Right Triangle Formula: Understanding the Pythagorean Theorem

A right triangle contains one angle of exactly 90°. The side opposite this angle is called the hypotenuse, and it is always the longest side.

b a c
The hypotenuse c is opposite the 90° angle.

For a right triangle with legs a and b and hypotenuse c, the Pythagorean theorem is

a² + b² = c²

Suppose a = 3 and c = 5. The missing side is found by rearranging the equation:

3² + b² = 5²
9 + b² = 25
b² = 16
b = 4

This is the familiar 3-4-5 triangle. Other useful right-triangle patterns include 30°-60°-90° and 45°-45°-90° triangles.

How to Determine if a Triangle Is Acute, Right, or Obtuse

You can determine whether a triangle is acute, right, or obtuse without calculating any angles. Let c be the longest side. Compare c² with a² + b².

c² = a² + b²   →   right triangle
c² < a² + b²   →   acute triangle
c² > a² + b²   →   obtuse triangle

For example, sides 5, 6, and 7 have 7 as the longest side. Since 7² = 49 while 5² + 6² = 61, the triangle is acute.

This is a particularly convenient check when only the three side lengths are known.

Law of Sines: Formula and Worked Example

The Law of Sines connects each side with the sine of its opposite angle. Using the usual triangle labels, it is written as

a / sin(A) = b / sin(B) = c / sin(C)

The important word is opposite. Side a belongs with angle A, side b with angle B, and side c with angle C. Mixing these pairs is one of the easiest ways to get a completely wrong result while still obtaining a perfectly reasonable-looking number.

For example, suppose b = 10, B = 40°, and C = 70°. To find c:

10 / sin(40°) = c / sin(70°)

c = 10 · sin(70°) / sin(40°)
c ≈ 14.62

The Law of Sines is especially useful when you know two angles and one side, or when you know a side-angle pair and another angle or side.

There is one important complication in some cases. With two sides and a non-included angle, known as the SSA case, the given information can sometimes produce two different triangles. This is commonly called the ambiguous case.

Law of Cosines: Formula, Uses, and Worked Example

When two sides and the included angle are known, the Law of Cosines is often the natural choice. For angle C, the relationship is

c² = a² + b² − 2ab cos(C)
a b c C
The angle C is between sides a and b; side c is opposite C.

For example, if a = 7, b = 9, and C = 60°:

c² = 7² + 9² − 2(7)(9)cos(60°)
c² = 49 + 81 − 63
c² = 67
c ≈ 8.19

There is a useful connection here: when C = 90°, cos(90°) = 0. The cosine formula immediately becomes

c² = a² + b²

So the Pythagorean theorem is not an isolated rule; it is the right-triangle form of the Law of Cosines.

How to Find the Area of a Triangle: Base-Height and Sine Formulas

The most familiar area formula is

Area = ½ × base × height
base height
The height must be perpendicular to the chosen base.

The word perpendicular matters. The height is not necessarily one of the triangle's sides. It is the shortest distance from the opposite vertex to the line containing the selected base.

When two sides and their included angle are known, the same area can be found using

Area = ½ab sin(C)

For a = 8, b = 11, and C = 30°:

Area = ½(8)(11)sin(30°)
Area = 44 × 0.5
Area = 22

Heron's Formula: How to Find Triangle Area From Three Sides

If all three side lengths are known but no height or angle is given, Heron's formula is a convenient method. First calculate the semiperimeter:

s = (a + b + c) / 2

Then the area is

Area = √[s(s − a)(s − b)(s − c)]

Take a triangle with sides 5, 6, and 7.

s = (5 + 6 + 7) / 2 = 9

Area = √[9(9 − 5)(9 − 6)(9 − 7)]
Area = √(9 × 4 × 3 × 2)
Area = √216
Area ≈ 14.70

Heron's formula is particularly useful in an SSS problem because the three sides contain all the information needed to determine the triangle's area.

Triangle Geometry: Median, Inradius, and Circumradius

A median is a line segment drawn from a vertex to the midpoint of the opposite side. Every triangle has three medians, and they meet at a single point called the centroid.

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

The three medians divide one another in a fixed ratio. The centroid lies two-thirds of the way from a vertex to the midpoint of the opposite side.

The inradius, usually written r, is the radius of the circle that fits inside the triangle and touches all three sides. If K is the area and s is the semiperimeter, then

K = rs

so

r = K / s
r
The inradius is perpendicular to each side at the point of contact.

The circumradius, R, is different. It is the radius of the circle passing through all three vertices of the triangle. The area, the three side lengths, and the circumradius are related by

K = abc / 4R

Therefore, when the three sides and the area are known,

R = abc / 4K

Triangle Calculation Checks: How to Avoid Common Mistakes

Before trusting a numerical answer, look at the geometry.

If one side is the longest, its opposite angle must also be the largest. If your calculation says the longest side is opposite the smallest angle, the side-angle pairing has probably been mixed up.

The three angles must total 180°. This is one of the quickest ways to catch a rounding or calculator-entry error.

A triangle with sides a, b, and c cannot exist if the largest side is equal to or greater than the sum of the other two. Check this before applying Heron's formula or a trigonometric law.

For an area calculation using ½ab sin(C), make sure C is the angle between a and b. Using an angle from another vertex changes the result.

Finally, do not judge a triangle from a sketch alone. A drawing is often only a representation. The numerical side lengths and angles determine the actual shape.

How to Choose the Right Triangle Formula

Triangle geometry becomes much easier when the formulas are viewed as connected tools rather than separate equations.

Three sides known? Start with the triangle inequality, then use the Law of Cosines for angles and Heron's formula for area.

Two sides and the included angle known? The Law of Cosines gives the third side, while ½ab sin(C) gives the area directly.

Two angles and a side known? First use the 180° angle sum to find the missing angle, then use the Law of Sines for the remaining sides.

One angle is 90°? Identify the hypotenuse and the Pythagorean theorem may be all that is needed.

The key idea is simple: opposite sides and angles belong to each other, the three angles always sum to 180°, and the longest side faces the largest angle. Once these relationships become familiar, the formulas are much easier to choose and apply.