Pythagorean Theorem Calculator: Find the Missing Side
Stuck with two sides of a right triangle and need the third? Enter any two known sides and this free Pythagorean theorem calculator finds the missing one with a² + b² = c² — and gives you the area, perimeter and both acute angles too.
Formulas verified against standard references. Calculator logic tested with verified worked examples. Last reviewed: October 2026. Our methodology
The Pythagorean formula
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs:
- Solve for the hypotenuse: c = √(a² + b²)
- Solve for leg a: a = √(c² − b²)
- Solve for leg b: b = √(c² − a²)
| You know | You get | Formula |
|---|---|---|
| Legs a and b | Hypotenuse c | c = √(a² + b²) |
| Hypotenuse c and leg b | Leg a | a = √(c² − b²) |
| Hypotenuse c and leg a | Leg b | b = √(c² − a²) |
The theorem only holds for right triangles — one angle must be exactly 90°. But it works the other way too: if a² + b² = c² for a triangle's three sides, it must be a right triangle. That converse is how carpenters square a corner with a 3-4-5 tape check. See the Pythagorean theorem article for the history and the many known proofs.
Worked example
A ramp is 3 m high and 4 m long at the ground. How long is the sloped surface?
Hypotenuse: c = √(3² + 4²) = √(9 + 16) = √25 = 5 m. Area: 3 × 4 ÷ 2 = 6 m². Perimeter: 3 + 4 + 5 = 12 m. Angles: α = arctan(3/4) ≈ 36.87°, β = 90° − 36.87° ≈ 53.13°.
Now reverse it: a 13 m ladder leans against a wall with its foot 5 m out. Leg a = √(13² − 5²) = √(169 − 25) = √144 = 12 m up the wall.
How to use the Pythagorean theorem calculator
Identify which side you are missing before you type anything — that is the most common mistake.
Step by step
- Choose what to solve for. Hypotenuse (c) when you know both legs, or leg a / leg b when you know the hypotenuse and one leg.
- Enter the two known sides. Any positive length works — use the same unit for both.
- Press Calculate. You get the missing side, the area, the perimeter, both acute angles and the altitude to the hypotenuse.
- Check the working. The calculator shows every substitution so you can verify the math.
Common Pythagorean triples worth knowing
A Pythagorean triple is a set of three whole numbers that satisfies the theorem — no square roots needed:
| Triple (a, b, c) | Check | Area (ab/2) |
|---|---|---|
| 3, 4, 5 | 9 + 16 = 25 | 6 |
| 5, 12, 13 | 25 + 144 = 169 | 30 |
| 6, 8, 10 | 36 + 64 = 100 | 24 |
| 8, 15, 17 | 64 + 225 = 289 | 60 |
| 7, 24, 25 | 49 + 576 = 625 | 84 |
| 9, 40, 41 | 81 + 1600 = 1681 | 180 |
Multiples of a triple work too: 6-8-10 is just 2 × (3-4-5). Builders use the 3-4-5 check to square up a foundation — mark 3 ft along one wall and 4 ft along the other, and the diagonal between the marks must be exactly 5 ft.
Area, angles and the altitude to the hypotenuse
The missing side is only half the story — a right triangle's other measures follow from the same three numbers:
- Area = a × b ÷ 2 — half the rectangle the two legs form.
- Perimeter = a + b + c — the distance around the triangle.
- Angle α = arctan(a ÷ b) — the angle opposite leg a, in degrees.
- Angle β = 90° − α — the two acute angles always sum to 90°.
- Altitude h = (a × b) ÷ c — the perpendicular drop from the right angle to the hypotenuse.
That altitude result is useful whenever you need a height measured at a right angle to a sloped line, for example cutting a support that meets a sloped beam. If the triangle is part of a ramp or a hill, a slope calculator turns the rise and run into a grade and an angle.
Where this comes up in real life
The Pythagorean theorem is one of the most used formulas outside of school:
- Ladders: how far up the wall a ladder of known length reaches from a given footing distance.
- Construction: squaring corners with the 3-4-5 check, and cutting diagonal braces to exact length.
- Screens and rooms: a 16:9 TV's diagonal from its width and height, or the longest item that fits across a room diagonally.
- Navigation: the straight-line distance across a grid when you know the north-south and east-west legs.
- Surveying: turning two perpendicular measurements into a direct distance.
When the triangle you are measuring represents a plot of ground, an area converter converts the resulting area between square feet, square meters, acres and hectares.
Frequently asked questions
What is the Pythagorean theorem?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². The legs (a, b) meet at the right angle; the hypotenuse (c) is the longest side, opposite the right angle.
How do you find the hypotenuse of a right triangle?
Square each leg, add the squares, and take the square root: c = √(a² + b²). For legs of 3 and 4: c = √(9 + 16) = √25 = 5.
How do you find a missing leg when you know the hypotenuse?
Rearrange the theorem: a = √(c² − b²). The hypotenuse must be longer than the known leg, otherwise there is no real triangle. Example: c = 13, b = 5 gives a = √(169 − 25) = √144 = 12.
What is a Pythagorean triple?
Three whole numbers that satisfy the theorem, such as 3-4-5, 5-12-13 or 8-15-17. Multiples work too: 6-8-10 is 2 × (3-4-5). Triples are handy for checking square corners without a calculator.
Does the Pythagorean theorem work for any triangle?
No — only right triangles. The converse is useful though: if a² + b² = c² for a triangle's three sides, the triangle must be a right triangle.
How do I find the triangle's angles from the sides?
Use α = arctan(a ÷ b) for the angle opposite leg a, then β = 90° − α for the other acute angle. For the 3-4-5 triangle: α ≈ 36.87° and β ≈ 53.13°.
Can the hypotenuse be shorter than a leg?
No. The hypotenuse is always the longest side of a right triangle. If your numbers say otherwise, swap the labels: the longest known side must be entered as the hypotenuse.