Skip to content
Popular Calculators
Browse Math calculators

Triangle Calculator

Solve any triangle from three sides, two sides and the angle between them, or two angles and a side — with area, heights and classification.

What do you want to work out?

About the Triangle Calculator

A triangle is the only polygon that cannot be flexed. Give four sticks to a child and they will make a square that collapses into a diamond; give three and the shape is locked. That rigidity is why triangles hold up bridges, roofs and scaffolding, and it is also why three measurements are enough to determine a triangle completely.

Three, and at least one of them must be a length. Three angles describe a shape but not a size — a roof truss and a scale model of it have identical angles. Add one side and everything else follows.

This calculator takes the three standard combinations. Three sides. Two sides with the angle between them. Two angles with the side between them. It also takes a base and a height for when all you want is the area, and it is honest about what that last pair leaves undetermined.

How to Use the Triangle Calculator

Three sides (SSS). Enter a, b and c in any order.

Two sides and the angle between them (SAS). The angle must be the one formed where your two sides meet. If you have an angle somewhere else, you have a different problem — and one that sometimes has two answers.

Two angles and the side between them (ASA). Enter the two angles and the side joining them. The third angle is whatever is left of 180°.

Base and height. Gives the area, which is all these two fix.

Press Calculate for the area, all three sides, all three angles, the perimeter, the classification, and the perpendicular height to each side.

The Formulas

  Area from a base and height:     A = ½ × base × height

  Area from three sides (Heron):   s = (a + b + c) / 2
                                   A = √( s(s-a)(s-b)(s-c) )

  Area from two sides and the
  angle between them:              A = ½ × a × b × sin(C)

  Law of cosines:                  a² = b² + c² - 2bc·cos(A)
  Law of sines:                    a / sin(A) = b / sin(B) = c / sin(C)

  Angle sum:                       A + B + C = 180°

Heron's formula is the one worth knowing about. It gets the area from the three sides alone — no angle, no height, no perpendicular to construct. For a field, a sail or a gable end where you can run a tape along each edge but cannot easily measure a height, it is the only practical method. It is also nearly two thousand years old.

The law of cosines is Pythagoras with a correction term. Set A to 90°, the cosine becomes zero, the last term disappears, and a² = b² + c² is what remains. That is not a coincidence or an analogy — Pythagoras is the special case.

Which Combinations Work, and Which Do Not

| You know | Determined? | |----------|-------------| | Three sides (SSS) | Yes, uniquely | | Two sides + included angle (SAS) | Yes, uniquely | | Two angles + any side (ASA, AAS) | Yes, uniquely | | Two sides + a non-included angle (SSA) | Ambiguous — sometimes two triangles | | Three angles (AAA) | Shape only, not size | | Base + height | Area only |

Two of these deserve explanation.

SSA is the ambiguous case. Given two sides and an angle that is not between them, there can be two genuinely different triangles that fit, one acute and one obtuse. This is a real feature of the geometry, not a gap in the arithmetic, and it is why this calculator does not offer SSA as a mode rather than picking one answer and hiding the other.

Base and height fix the area and nothing else. Slide the apex of a triangle sideways along a line parallel to its base: the base is unchanged, the height is unchanged, so the area is unchanged — but every angle and the other two sides are different. Infinitely many triangles share any base-and-height pair, which is why this calculator returns the area and says plainly that the rest is undetermined.

Step-by-Step Example

Three sides. A triangular plot measuring 7, 8 and 9 metres.

  s = (7 + 8 + 9) / 2 = 12
  A = √( 12 × 5 × 4 × 3 ) = √720 ≈ 26.833 m²

For the angles, rearrange the law of cosines:

  cos(A) = (b² + c² - a²) / (2bc) = (64 + 81 - 49) / 144 = 96/144 = 0.6667
  A = 48.19°

  Similarly B = 58.41° and C = 73.40°
  Total: 180.00°  ✓

The angle sum check is worth doing every time. If it is not 180, something went in wrong.

Two sides and the included angle. Sides of 6 and 9 with 60° between them.

  a² = 6² + 9² - 2(6)(9)cos(60°)
     = 36 + 81 - 108(0.5)
     = 117 - 54 = 63
  a = √63 ≈ 7.937

  Area = ½ × 6 × 9 × sin(60°) ≈ 23.383

Two angles and the included side. Angles of 40° and 75° with 10 between them.

  Third angle = 180 - 40 - 75 = 65°
  The given side faces that 65° angle.

  a = 10 × sin(40°) / sin(65°) ≈ 7.091
  b = 10 × sin(75°) / sin(65°) ≈ 10.659

Understanding Your Result

The area is in square units of whatever length unit you entered.

The sides and angles are listed with each angle opposite the side of the matching letter — angle A faces side a. The largest angle always faces the longest side, which is a quick way to check the output is sane.

The perimeter is the sum of the three sides.

The type gives both classifications, because a triangle has one of each. By sides it is equilateral, isosceles or scalene; by angles it is acute, right or obtuse. "Isosceles and obtuse" is a complete description, and so is "scalene and right".

The heights are the perpendicular distances to each side — three of them, one per side, each satisfying area = ½ × side × height. They are derived from the area rather than from trigonometry, so they always agree with the area shown above them.

When Should You Use This Calculator?

Land and plots. Irregular parcels are surveyed as triangles, and Heron's formula turns three tape measurements into an area.

Roofing. A gable end is a triangle; so is each face of a hip roof. Area gives material, and the angles give cuts.

Trusses and bracing. Triangulation is what makes a frame rigid, and the angles determine the load paths.

Sails and canvas. A jib or a shade sail is a triangle specified by its three edge lengths.

Surveying by triangulation. Measure one baseline and two angles and you can fix a point you cannot reach — the ASA case, and the foundation of pre-satellite mapping.

Navigation. A course, a current and a resulting track form a triangle, usually solved as SAS.

Geometry coursework. SSS, SAS and ASA are the standard exercises, and the working shows which law was applied where.

Common Mistakes

Using a sloping side as the height. The height is perpendicular to the base. A slanted side is longer than the perpendicular, so using it always overstates the area — often by a lot.

Applying Pythagoras to a triangle with no right angle. It does not hold. Use the law of cosines, which is the same statement with the missing term restored.

Entering the wrong angle in SAS mode. The angle must be between the two sides you gave. An angle elsewhere makes it an SSA problem, which may have two answers.

Forgetting that three angles do not fix a size. Without at least one length there is nothing to scale the triangle by.

Assuming three lengths always make a triangle. Two sides must together exceed the third. 1, 2 and 10 do not close, and no formula can rescue them.

Losing the angle sum. If your three angles do not total 180°, at least one is wrong. It is the cheapest check available, and it catches most slips.

Mixing degrees and radians. The trigonometric formulas need one or the other consistently. This calculator works in degrees throughout.

Reading the labels loosely. Side a is opposite angle A. Pairing them up wrongly in the law of sines gives a plausible-looking but incorrect answer.

Frequently Asked Questions

How many measurements do I need to solve a triangle?

Three, and at least one must be a side. Three sides, two sides and an angle, or two angles and a side all work. Three angles do not, because they fix the shape but not the size — a small triangle and a large one can have identical angles.

What is Heron's formula and when should I use it?

It gives the area from the three side lengths alone, with no angle and no height needed. That makes it the right tool for a plot of land or a sail where you can measure the edges but not the perpendicular height.

Which height does the area formula want?

The perpendicular height above the base you are using, not the length of a sloping side. Using a slanted side instead is the most common error in triangle area, and it always overstates the answer.

Why do some side lengths not make a triangle?

Because two sides must together be longer than the third, or they cannot meet. Lengths of 1, 2 and 10 leave the short pair unable to reach across the long one, so no triangle closes and the calculator refuses rather than returning a number.

Do a triangle's angles always add to 180 degrees?

On a flat surface, yes, always. This calculator uses that fact to find the third angle whenever you give it two. On a curved surface such as the Earth the total exceeds 180, which is a different geometry with different formulas.

Last reviewed September 18, 2026 by the CalculatorPeak editorial team.