Beginner

Pythagorean Theorem Calculator

Find the hypotenuse or a missing leg of a right triangle using a² + b² = c².

What do you want to find?

Hypotenuse (c)
5

Length of the missing side of the right triangle.

a² + b² = c²
Step by step
  1. 1

    Square leg a

    = 9
  2. 2

    Square leg b

    = 16
  3. 3

    Sum of squares

    9 + 16 = 25
  4. 4

    Hypotenuse c

    √25 = 5
    The square root of the summed squares gives the hypotenuse.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Formula
c = √(a² + b²); a = √(c² − b²)
How this is calculated

This tool applies the Pythagorean theorem, which holds only for right triangles — triangles with one 90° angle. The two sides forming that angle are the legs (a and b); the side opposite it, always the longest, is the hypotenuse (c). The theorem states a² + b² = c², so each side relates to the others through their squared lengths, not their raw values.

In "hypotenuse" mode you enter the two legs. The calculator squares each leg, adds the squares, and takes the square root: c = √(a² + b²). In "leg" mode you enter the hypotenuse and one leg; it subtracts the leg's square from the hypotenuse's square and takes the root: a = √(c² − b²). All inputs share one consistent unit (cm, m, inches — whatever you choose), and the result carries that same unit.

Lengths must be non-negative. In leg mode the hypotenuse must exceed the known leg, otherwise the squared difference is negative and no real triangle exists. Results are shown to four decimals; many right triangles produce irrational sides that are rounded here.

Examples
InputResult
legs a = 3, b = 4hypotenuse c = 5
hypotenuse c = 13, leg = 5missing leg = 12

About this calculator

The Pythagorean theorem relates the three sides of a right triangle: the square of the hypotenuse c equals the sum of the squares of the two legs a and b, written a² + b² = c². The hypotenuse is always the longest side, opposite the right angle.

You can rearrange the theorem to find any missing side. To get the hypotenuse from two legs, use c = √(a² + b²). To find a missing leg when you know the hypotenuse and the other leg, use a = √(c² − b²). For this to give a real result the hypotenuse must be longer than the known leg.

Frequently asked questions

For a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c².

Rearrange the theorem to a = √(c² − b²). Subtract the square of the known leg from the square of the hypotenuse, then take the square root.

Because c² equals a² + b², the hypotenuse squared is larger than either leg squared, so c is always greater than each leg in a valid right triangle.

Also known as

pythagorean theorem
a squared plus b squared
hypotenuse calculator
right triangle calculator
find missing leg
pythagoras
a^2+b^2=c^2

APA

TG we-Calculate Editorial Team. (2026). Pythagorean Theorem Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/pythagorean-theorem-calculator

Chicago

TG we-Calculate Editorial Team. "Pythagorean Theorem Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/pythagorean-theorem-calculator.

IEEE

TG we-Calculate Editorial Team, "Pythagorean Theorem Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/pythagorean-theorem-calculator

BibTeX

@misc{wecalculate_pythagorean_theorem_calculator, title = {Pythagorean Theorem Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/pythagorean-theorem-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?