Triangle Calculator (Solve Any Triangle)

Solve right triangles from two sides or any general triangle from three known sides with complete angle, area, and perimeter calculations.

Reviewed for Mathematical Accuracy Last updated: 2026

Enter any two of the three sides, leave the unknown one blank or at 0.

The Pythagorean Theorem (Right Triangles)

A right triangle contains one 90-degree angle. According to the Pythagorean theorem, the square of the hypotenuse equals the sum of the squares of the other two legs:

a² + b² = c²

By entering any two sides into Right Triangle mode, the solver computes the missing third side, both acute angles in degrees, total perimeter, and enclosed area. Because one angle is fixed at 90 degrees, the two acute angles always sum to exactly 90 degrees (complementary angles).

How to Solve a Triangle (SSS, SAS, ASA, AAS)

In geometry, solving a triangle means determining all three side lengths and all three interior angles from a subset of known measurements. Depending on which values are known, specific theorems apply:

Side-Side-Side (SSS) Solving and the Law of Cosines

When you know all three side lengths (a, b, c) of any triangle, the Law of Cosines allows you to solve for every interior angle without knowing the altitude in advance:

cos(C) = (a² + b² - c²) / (2ab)

The Law of Cosines is the generalized version of the Pythagorean theorem. When angle C equals 90 degrees, cos(90°) equals 0, reducing the equation directly to a² + b² = c².

The Triangle Inequality Theorem

Not every set of three numbers can form a geometric triangle. For three line segments to meet in two dimensions, they must satisfy the Triangle Inequality Theorem:

a + b > c   |   a + c > b   |   b + c > a

If the sum of any two sides is less than or equal to the third side, the segments cannot close to form a triangle. This calculator checks all three pairwise conditions and alerts you immediately if the inequality is violated.

How to Calculate the Area of a Triangle

In elementary geometry, finding area requires base and perpendicular height (Area = 0.5 × base × height). However, when only side lengths are known, Heron's formula calculates area directly:

s = (a + b + c) / 2
Area = √(s × (s - a) × (s - b) × (s - c))

Here, s represents the semi-perimeter. This equation provides exact surface area for scalene, isosceles, and equilateral triangles alike.

Step-by-Step Worked Examples

  1. Classic Right Triangle (3-4-5): With legs a = 3 and b = 4, the hypotenuse c = √(3² + 4²) = √(9 + 16) = √25 = 5. Angle A = arcsin(3/5) ≈ 36.87°, Angle B = 90° - 36.87° = 53.13°. Area = 0.5 × 3 × 4 = 6.
  2. General SSS Triangle (5-6-7): With sides a = 5, b = 6, and c = 7, the triangle inequality holds (5 + 6 > 7). Semi-perimeter s = (5 + 6 + 7) / 2 = 9. Area = √(9 × (9 - 5) × (9 - 6) × (9 - 7)) = √(9 × 4 × 3 × 2) = √216 ≈ 14.697. The Law of Cosines yields Angle A ≈ 44.42°, Angle B ≈ 57.12°, and Angle C ≈ 78.46° (sum = 180°).

Common Mistakes in Triangle Calculations

One frequent mistake in right triangle problems is misidentifying the hypotenuse. The hypotenuse is always the longest side and always lies directly opposite the 90-degree right angle. Entering the hypotenuse into a leg field results in calculation errors. In SSS solving, a common error is entering lengths that violate the triangle inequality, which cannot form a closed shape in Euclidean geometry.

Frequently Asked Questions

How do you find the missing side of a right triangle?

Use the Pythagorean theorem: a squared plus b squared equals c squared, where c represents the hypotenuse. To find hypotenuse c, take the square root of (a squared plus b squared). To find a missing leg, take the square root of (c squared minus the known leg squared).

What is the Triangle Inequality Theorem and why is it required?

The Triangle Inequality Theorem states that the sum of the lengths of any two sides of a triangle must be strictly greater than the length of the third side: a + b > c, a + c > b, and b + c > a. If this condition is not met, the sides cannot connect in 2D space.

How does SSS mode calculate angles from three side lengths?

SSS mode uses the Law of Cosines: c squared equals a squared plus b squared minus 2ab cos(C). Rearranging to solve for the cosine of an angle yields cos(C) = (a squared + b squared - c squared) / (2ab). The inverse cosine function then yields the exact angle in degrees.

How is triangle area calculated when height is unknown (Heron's Formula)?

Heron's formula computes area directly from the three sides without requiring altitude: Area = square root of (s * (s - a) * (s - b) * (s - c)), where s is the semi-perimeter: s = (a + b + c) / 2.

Why do right triangles only require two sides while general triangles require three?

A right triangle has one angle already fixed at exactly 90 degrees, leaving only two independent degrees of freedom. A general triangle has three degrees of freedom, requiring at least three independent measurements (such as three side lengths) to uniquely define its geometry.

Are the calculated triangle angles displayed in degrees or radians?

All calculated interior angles are displayed in standard degrees, with the three angles summing to exactly 180 degrees.

How do you find the unknown side of a right triangle?

You can use the Pythagorean theorem (a² + b² = c²) to find an unknown side of a right triangle if you know the lengths of the other two sides.

What do SSS, SAS, and ASA mean in geometry?

These are postulates used to solve or prove triangles are congruent. SSS stands for Side-Side-Side, SAS stands for Side-Angle-Side, and ASA stands for Angle-Side-Angle.