Skip to content

Pythagorean Theorem Calculator

Solve for any side of a right triangle using a² + b² = c² with step-by-step solutions.

a² + b² = c²

Updates as you type
What do you want to do?
Solve for ?
Unit
Measurement unit
Sides
Side a ? leg
cm
0255075100
Side b ? leg
cm
0255075100
Side c ? hypotenuse
cm
050100150

Your triangle

Drawn to scale
a b c

Formula

a 2 + b 2 = c 2
a, b
Legs — the two sides that form the 90° angle
c
Hypotenuse — the side opposite the right angle (always the longest)
Solve for c
c = √(a² + b²)
Solve for a
a = √(c² − b²)
Solve for b
b = √(c² − a²)
Worked example — your numbers
  1. Enter any two sides to see the full solution.

The theorem only holds for right triangles — triangles with a 90° angle. Its converse is also true: if a² + b² = c² for three sides, the triangle is guaranteed to be right-angled.

Examples

How It Works

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c².

Enter any two of the three sides and leave one blank. The calculator automatically detects which side is missing and solves for it: if the hypotenuse c is missing, c = √(a² + b²); if a leg is missing, a = √(c² − b²).

Every result includes a step-by-step solution showing the substitution, computation, and square root, plus a verification that confirms a² + b² = c² holds true for the computed values.

Tips & Best Practices

The hypotenuse (c) is always the longest side — it must be larger than either leg.
If a² + b² doesn't equal c², the triangle is not a right triangle (the converse of the theorem).
Common Pythagorean triples worth memorising: (3,4,5), (5,12,13), (8,15,17), (7,24,25), (20,21,29).
Any multiple of a triple is also a triple: (6,8,10) = 2 × (3,4,5), (9,12,15) = 3 × (3,4,5).
The theorem extends to 3D: for a box with edges a, b, h, the space diagonal is √(a² + b² + h²).
Mix units carefully — don't combine cm with inches. Convert first, then apply the theorem.

Frequently Asked Questions

What if I enter all three sides?

The calculator will verify whether a² + b² = c² holds true and tell you if the values form a valid right triangle.

The hypotenuse must be the longest side. If c ≤ a or c ≤ b, the triangle is invalid and an error is shown.

Yes. The Pythagorean theorem works for any positive real numbers, not just integers.

A Pythagorean triple is a set of three positive integers where a² + b² = c². The smallest is (3, 4, 5). There are infinitely many such triples.

The theorem generalises: for a rectangular box with edges a, b, h, the longest space diagonal is d = √(a² + b² + h²). It is just the Pythagorean theorem applied twice.

Pick the corresponding mode chip ("Solve for c / a / b") at the top. The chosen side becomes read-only and is filled in automatically as you change the other two.