Triangle Calculator

Enter any three known measurements — sides, angles, or a mix — and this calculator solves the rest of the triangle for you: every side, every angle, the area, the perimeter, and the height. It covers all four common cases: three sides (SSS), two sides and an angle (SAS), two angles and a side (ASA/AAS), and right triangles.

Quick Answer
Know all 3 sides? Use Heron's Formula for area: √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2.
Know 2 sides + included angle? Use the Law of Cosines: c² = a² + b² − 2ab·cos(C).
Know 2 angles + 1 side? Use the Law of Sines: a/sin(A) = b/sin(B) = c/sin(C).
Pick a mode below that matches what you know, and the calculator does the rest.
▼ Choose what you know about your triangle

Enter all three side lengths.

Side a:
Side b:
Side c:

Enter two sides and the angle between them (in degrees).

Side a:
Side b:
Included angle C (degrees):

Enter two angles (in degrees) and the side length between or opposite them.

Angle A (degrees):
Angle B (degrees):
Side c (between A and B):

Enter any two of the three values — the two legs, or one leg and the hypotenuse.

Leg a (leave blank if unknown):
Leg b (leave blank if unknown):
Hypotenuse c (leave blank if unknown):
Result:

Triangle Basics

A triangle is the simplest possible closed shape — three straight sides connecting three points (vertices), enclosing three interior angles. Two rules govern every triangle that exists, no matter its size or shape: the three interior angles always add up to exactly 180°, and any two sides added together must be longer than the third side (the triangle inequality). Knowing just three independent measurements — in the right combination — is always enough to solve for everything else about a triangle.

  • Interior angles of any triangle always sum to 180°
  • The sum of any two sides must exceed the third side (triangle inequality)
  • Three known values (in a valid combination) fully determine every other side, angle, and the area
  • The longest side is always opposite the largest angle, and the shortest side is opposite the smallest angle

Types of Triangles

ClassificationTypeDefinition
By side lengthEquilateralAll three sides (and all three angles) are equal
IsoscelesExactly two sides (and their opposite angles) are equal
ScaleneAll three sides and all three angles are different
By angleAcuteAll three angles are less than 90°
RightExactly one angle equals 90°
ObtuseOne angle is greater than 90°

The Triangle Inequality Theorem

RULE For any three lengths to form a real triangle, the sum of the two shorter sides must be strictly greater than the longest side.

If a + b ≤ c (where c is the longest side), the three lengths cannot close into a triangle — they will either fall short of meeting or lie perfectly flat. For example, 2, 3, and 6 fail this test (2 + 3 = 5 < 6), so no triangle exists with those side lengths. This calculator checks the triangle inequality automatically and will flag an invalid combination.

Solving SSS (Three Sides)

When all three sides are known, use the Law of Cosines, rearranged to solve for each angle:

FORMULA cos(A) = (b² + c² − a²) ÷ (2bc), then A = cos⁻¹(that value) — repeat for B and C, or find the third angle as 180° − A − B.

Area (Heron's Formula): s = (a+b+c)/2, Area = √(s(s−a)(s−b)(s−c))

Example: Sides 5, 6, 7 → s = 9, Area = √(9×4×3×2) = √216 ≈ 14.70

Solving SAS (Two Sides + Included Angle)

FORMULA Third side: c² = a² + b² − 2ab·cos(C)
Area: Area = ½ · a · b · sin(C)

Example: a=8, b=5, C=60° → c² = 64+25−2(8)(5)cos(60°) = 89−40 = 49 → c = 7
Area = ½ × 8 × 5 × sin(60°) ≈ 17.32

Once the third side is known, the remaining two angles can be found using the Law of Sines or a second application of the Law of Cosines.

Solving ASA/AAS (Two Angles + a Side)

FORMULA Third angle: C = 180° − A − B
Remaining sides (Law of Sines): a/sin(A) = b/sin(B) = c/sin(C)

Example: A=50°, B=60°, c=10 → C = 70°
a = c × sin(A)/sin(C) = 10 × sin(50°)/sin(70°) ≈ 8.15
b = c × sin(B)/sin(C) = 10 × sin(60°)/sin(70°) ≈ 9.22

Area Formulas Compared

Known ValuesFormula
Base and heightArea = ½ × base × height
Three sides (SSS)Heron's Formula: √(s(s−a)(s−b)(s−c))
Two sides + included angle (SAS)Area = ½ × a × b × sin(C)
Right triangle (two legs)Area = ½ × leg₁ × leg₂
Equilateral triangle (side s)Area = (√3 ÷ 4) × s²

Glossary

Hypotenuse
The longest side of a right triangle, always located opposite the 90° angle.
Law of Cosines
A formula relating all three sides of a triangle to the cosine of one angle: c² = a² + b² − 2ab·cos(C); a generalization of the Pythagorean theorem for non-right triangles.
Law of Sines
A formula stating that each side of a triangle divided by the sine of its opposite angle gives the same ratio: a/sin(A) = b/sin(B) = c/sin(C).
Heron's Formula
A method for finding a triangle's area directly from its three side lengths, without needing to know any angle.
Semi-perimeter
Half of a triangle's total perimeter, denoted s, used as an intermediate step in Heron's Formula.
Triangle Inequality Theorem
The rule that the sum of any two sides of a triangle must be greater than the third side, or no triangle can exist.

Frequently Asked Questions

Q: How do you find the area of a triangle with three sides?

A: Use Heron's Formula: calculate the semi-perimeter s = (a+b+c)/2, then Area = √(s(s−a)(s−b)(s−c)).

Q: What is the law of cosines and when do you use it?

A: c² = a² + b² − 2ab·cos(C). Use it to find a missing side (SAS) or a missing angle (SSS).

Q: What is the law of sines and when do you use it?

A: a/sin(A) = b/sin(B) = c/sin(C). Use it to find missing sides or angles when you know two angles and a side (ASA/AAS).

Q: How do you know if three side lengths can form a triangle?

A: The sum of the two shorter sides must be greater than the longest side (triangle inequality theorem).

Q: How do you find a missing side of a right triangle?

A: Use the Pythagorean theorem, a² + b² = c², where c is the hypotenuse.

Q: How do you classify a triangle by its angles?

A: Acute (all angles <90°), right (one angle =90°), or obtuse (one angle >90°).