# Pythagorean Theorem Calculator

> In a right triangle, a^2 + b^2 = c^2, so legs of 3 and 4 give a hypotenuse of √(9 + 16) = 5, and a missing leg is √(c^2 − b^2). The calculator also gives the area, perimeter, both acute angles (36.87° and 53.13° here) and exact radical answers such as 5√2.

- Interactive calculator: https://calculatorswithsteps.com/pythagorean-theorem-calculator
- Category: Math & Statistics Calculators
- Last updated: 2026-11-10
- Publisher: Calculators With Steps (calculatorswithsteps.com)

## How to use the Pythagorean theorem calculator

1. Choose which side you want to find: **hypotenuse c** or one of the legs, **a** or **b**.
2. Enter the two sides you know. Decimals are fine.
3. Optionally pick a unit so the answer reads "8 ft" or "15 in".

The calculator checks that the hypotenuse is longer than the known leg. If it is not, the numbers cannot form a right triangle and you will see a message instead of a wrong answer.

## The Pythagorean theorem formula

For a right triangle with legs a and b and hypotenuse c:

**a² + b² = c²**

Rearranged for whichever side is missing:

- **Hypotenuse:** c = √(a² + b²)
- **Leg a:** a = √(c² − b²)
- **Leg b:** b = √(c² − a²)

The calculator also reports the area (a × b ÷ 2), the perimeter (a + b + c), the height from the right angle to the hypotenuse (a × b ÷ c) and both acute angles, found with arctan(a ÷ b).

## Worked examples

| Known sides | Working | Missing side | Area | Angles |
| --- | --- | --- | --- | --- |
| a = 3, b = 4 | √(9 + 16) = √25 | c = 5 | 6 | 36.87°, 53.13° |
| a = 5, c = 13 | √(169 − 25) = √144 | b = 12 | 30 | 22.62°, 67.38° |
| b = 6 ft, c = 10 ft | √(100 − 36) = √64 | a = 8 ft | 24 ft² | 53.13°, 36.87° |
| a = 1, b = 1 | √(1 + 1) = √2 | c ≈ 1.414214 | 0.5 | 45°, 45° |
| a = 5, b = 5 | √50 = 5√2 | c ≈ 7.071068 | 12.5 | 45°, 45° |

**Ladder problem.** A 10 ft ladder leans against a wall with its foot 6 ft from the wall. How high does it reach? The ladder is the hypotenuse, so the height is √(10² − 6²) = √64 = 8 ft.

**Diagonal of a rectangle.** A 9 in × 12 in photo frame has a diagonal of √(81 + 144) = √225 = 15 in. The same idea gives the distance across a rectangular field or room. For the distance between two points on a graph, the [slope calculator](https://calculatorswithsteps.com/slope-calculator) applies this formula to the coordinates.

## Why a² + b² = c² works

One of the oldest proofs needs only areas. Draw a large square with sides of length a + b and fit four copies of the right triangle inside it, one in each corner, so that their hypotenuses form a tilted square in the middle. The large square's area is (a + b)². The four triangles cover 4 × ½ab = 2ab, and the tilted square covers c². So (a + b)² = 2ab + c². Expanding the left side gives a² + 2ab + b², and taking 2ab from both sides leaves a² + b² = c².

Check it with the 3-4-5 triangle: the large square is 7 × 7 = 49, the four triangles cover 4 × 6 = 24, and the middle square is 5 × 5 = 25. Indeed 24 + 25 = 49.

## Pythagorean triples

These primitive triples have no common factor. Multiply any row by a whole number to get more triples (3-4-5 becomes 6-8-10, 9-12-15 and so on).

| a | b | c |
| --- | --- | --- |
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 7 | 24 | 25 |
| 20 | 21 | 29 |
| 12 | 35 | 37 |
| 9 | 40 | 41 |
| 28 | 45 | 53 |
| 11 | 60 | 61 |
| 33 | 56 | 65 |

When all three sides you enter are whole numbers that fit the theorem, the calculator tells you whether it is a primitive triple or a multiple of one.

## Common mistakes

- **Adding the sides instead of their squares.** 3 + 4 is 7, but the hypotenuse is 5. Square first, add, then take the root.
- **Using the hypotenuse as a leg.** The hypotenuse is always the longest side and sits opposite the right angle. When finding a leg, subtract: c² − a², not c² + a².
- **Forgetting the square root.** If a² + b² = 25, the side is 5, not 25.
- **Mixing units.** Convert everything to the same unit before you start. Feet and inches together give a wrong answer.
- **Applying it to a triangle without a right angle.** The theorem only holds when one angle is exactly 90°.

Once you know all three sides, the [area calculator](https://calculatorswithsteps.com/area-calculator) can confirm the area with Heron's formula, and the [square root calculator](https://calculatorswithsteps.com/square-root-calculator) shows how answers like √50 simplify to 5√2.

## Frequently asked questions

### What is the Pythagorean theorem formula?

In a right triangle, a² + b² = c², where a and b are the two legs and c is the hypotenuse, the side opposite the right angle. With legs 3 and 4: 3² + 4² = 9 + 16 = 25, so c = √25 = 5.

### How do you find the hypotenuse?

Square both legs, add them and take the square root: c = √(a² + b²). With legs 5 and 7, c = √(25 + 49) = √74, which is about 8.602325.

### How do you find a missing leg?

Subtract the square of the known leg from the square of the hypotenuse, then take the square root: b = √(c² − a²). With c = 13 and a = 5, b = √(169 − 25) = √144 = 12.

### Can I use the Pythagorean theorem if I only know the hypotenuse?

Not on its own. You need two sides, or one side plus an angle, which is a trigonometry problem. The exception is an isosceles right triangle, where both legs are equal: a hypotenuse of 10 gives legs of 10 ÷ √2, about 7.071068 each.

### How do I find the angles of a right triangle from its sides?

Use the inverse tangent. The angle opposite leg a is arctan(a ÷ b), and the other acute angle is 90° minus that. For a 3-4-5 triangle the angles are 36.87° and 53.13°.

### What is a Pythagorean triple?

A set of three whole numbers that fit a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. Any multiple of a triple also works, so 6-8-10 and 9-12-15 are triples too.

### Does the Pythagorean theorem work for every triangle?

No, only for right triangles. For other triangles use the law of cosines, c² = a² + b² − 2ab × cos(C), which reduces to the Pythagorean theorem when angle C is 90°.

### How do builders use the 3-4-5 rule?

To check that a corner is square, measure 6 ft along one side and 8 ft along the other. If the diagonal between those marks is exactly 10 ft, the corner is a true 90°, because 6² + 8² = 100 = 10².

## Sources

- [Wikipedia – Pythagorean theorem](https://en.wikipedia.org/wiki/Pythagorean_theorem)
- [Wolfram MathWorld – Pythagorean Theorem](https://mathworld.wolfram.com/PythagoreanTheorem.html)
- [Wikipedia – Pythagorean triple](https://en.wikipedia.org/wiki/Pythagorean_triple)
