Enter any two sides of a right triangle to find the third using a² + b² = c², with exact square-root answers, angles, area and working, or check three sides.
a² + b² = c². Enter any two sides and leave the one you want to find blank.
Working
Legs a and b meet at the right angle; the hypotenuse c is the longest side, opposite the right angle. If you fill in all three sides, the calculator checks whether they form a right triangle.
A Pythagorean theorem calculator finds the missing side of a right triangle using a² + b² = c², where a and b are the legs and c is the hypotenuse. Enter any two sides to get the third, with the full working, an exact square-root answer when the result isn’t a whole number, both acute angles, the area and the perimeter. Enter all three sides and it checks whether they form a right triangle.
For example, legs of 3 and 4 give a hypotenuse of 5. A hypotenuse of 13 with one leg of 12 gives a missing leg of 5. Legs of 1 and 1 give a hypotenuse of √2 ≈ 1.414214.
In any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides:
a² + b² = c²
Rearranging gives the formulas for each side:
The theorem is named after the Greek mathematician Pythagoras, who lived around 500 BC, although the relationship was known to Babylonian, Indian and Chinese mathematicians long before. It’s one of the most proved results in mathematics, with hundreds of different proofs.
The legs are 3 and 4. c² = 3² + 4² = 9 + 16 = 25, so c = √25 = 5.
The hypotenuse is 13 and one leg is 12. a² = 13² − 12² = 169 − 144 = 25, so a = 5. When finding a leg, always subtract from the hypotenuse squared; adding would give a number bigger than the hypotenuse, which is impossible.
The hypotenuse is 8 and one leg is 5. b² = 64 − 25 = 39, so b = √39 ≈ 6.245. Because 39 has no square factors, √39 is already in its simplest form.
Draw a large square with sides of length a + b. Inside it, place four copies of the right triangle so that their hypotenuses form a smaller, tilted square in the middle with sides of length c. The area of the large square can be found in two ways. Directly, it’s (a + b)² = a² + 2ab + b². As pieces, it’s four triangles, each with an area of ½ab, plus the inner square: 2ab + c². Setting the two equal gives a² + 2ab + b² = 2ab + c², and cancelling 2ab leaves a² + b² = c².
Many answers aren’t whole numbers, and teachers often want them in exact form. To simplify a square root, look for the largest perfect square that divides the number. For √50, the largest square factor is 25, so √50 = √25 × √2 = 5√2. For √72, it’s 36, so √72 = 6√2. The calculator shows the exact simplified form alongside the decimal, so you can use whichever your question needs.
Two right triangles appear so often that their side ratios are worth memorising. In a 45°–45°–90° triangle, the legs are equal and the hypotenuse is √2 times a leg, so the sides are in the ratio 1 : 1 : √2. In a 30°–60°–90° triangle, the sides are in the ratio 1 : √3 : 2, where the shortest side is opposite the 30° angle and the hypotenuse is twice the shortest side. Both ratios come straight from the Pythagorean theorem: 1² + 1² = (√2)², and 1² + (√3)² = 2².
A Pythagorean triple is a set of three whole numbers that fit a² + b² = c². They’re handy because they give exact answers without square roots.
| Triple | Check |
|---|---|
| 3, 4, 5 | 9 + 16 = 25 |
| 5, 12, 13 | 25 + 144 = 169 |
| 8, 15, 17 | 64 + 225 = 289 |
| 7, 24, 25 | 49 + 576 = 625 |
| 20, 21, 29 | 400 + 441 = 841 |
Any multiple of a triple is also a triple: 6, 8, 10 and 30, 40, 50 both come from 3, 4, 5.
The theorem also works in reverse. If the sides of a triangle satisfy a² + b² = c², the triangle has a right angle opposite c. If a² + b² is greater than c², the angle opposite c is acute; if it’s less, that angle is obtuse. For sides 2, 3 and 4: 4 + 9 = 13, which is less than 16, so the triangle is obtuse.
Builders use this every day. To check that a corner is square, they measure 3 units along one wall and 4 along the other; if the diagonal between those points is exactly 5, the corner is a perfect right angle. Larger multiples, such as 6, 8 and 10 feet, give a more accurate check.
A 5 m ladder stands with its foot 1.5 m from the wall. How high does it reach? h = √(5² − 1.5²) = √(25 − 2.25) = √22.75 ≈ 4.77 m.
TV and monitor sizes are measured diagonally. A 55-inch screen with a 16 : 9 shape is about 47.9 inches wide and 27.0 inches tall, because 47.9² + 27.0² ≈ 55².
A room is 10 ft by 20 ft. The diagonal across the floor is √(100 + 400) = √500 ≈ 22.36 ft, which tells you whether a long item will fit when carried across the room.
A rectangular park is 120 m long and 50 m wide. Walking along two sides covers 170 m, but cutting straight across the diagonal covers √(120² + 50²) = √16,900 = 130 m, saving 40 m. Paths worn across lawns usually follow exactly this kind of shortcut.
A boat sails 9 km due east and then 12 km due north. Its straight-line distance from the starting point is √(81 + 144) = √225 = 15 km. Pilots, sailors and hikers use this calculation, along with the angle, to plot direct routes.
The Pythagorean theorem is the basis of measuring distance in mathematics. It underpins trigonometry, coordinate geometry, vectors and the way computers calculate distances in graphics, mapping and machine learning. Surveyors, architects, carpenters, engineers and game developers all rely on it, often many times a day, usually without thinking about it.
The theorem extends to three dimensions: the long diagonal of a box measuring l × w × h is √(l² + w² + h²). On a coordinate grid, it gives the distance formula: the distance between two points is √((x₂ − x₁)² + (y₂ − y₁)²).
For related questions, use the triangle calculator to solve any triangle from three values, or the volume calculator to find the volume of 3D shapes.
In a right triangle, a² + b² = c², where c is the hypotenuse and a and b are the other two sides.
Square both legs, add them and take the square root: c = √(a² + b²). Legs of 6 and 8 give a hypotenuse of 10.
Subtract the square of the known leg from the square of the hypotenuse and take the square root: a = √(c² − b²).
No, only right triangles. For other triangles, use the law of cosines: c² = a² + b² − 2ab cos C.
Three whole numbers that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13.
Check whether the squares of the two shorter sides add up to the square of the longest side. Enter all three sides in the calculator to test it.
√2, about 1.414214. This is also the diagonal of a square with sides of 1.
The longest side, directly opposite the right angle.
They measure 3 units along one side and 4 along the other. If the diagonal is exactly 5, the corner is a right angle.
Yes. Decimals such as 1.5 and fractions such as 3/4 are accepted, and you can type √2 for a square root.
Take out the largest perfect square factor. √50 = √(25 × 2) = 5√2. The calculator shows this exact form automatically.
They're in the ratio 1 : √3 : 2. With a shortest side of 5, the others are about 8.66 and exactly 10.
Treat the length and width as the legs: diagonal = √(length² + width²).