About this tool
Find the hypotenuse or a missing leg with a² + b² = c², get the simplified radical and decimal, see steps, and check or generate Pythagorean triples.
This Pythagorean Theorem Calculator solves a right triangle from any two sides. Choose whether you want the hypotenuse c or a leg, enter the two known lengths, and it applies c² = a² + b² (or a² = c² − b²). Besides the decimal, it keeps the arithmetic exact: the inputs are scaled to whole numbers and the square factors are pulled out of the root, so 5 and 7 give √74 and 5 and 5 give 5√2. A labelled diagram, the area, perimeter, both acute angles and the steps are shown. Separate tabs check whether three sides form a right triangle and generate Pythagorean triples. It all runs in your browser.
Open Pythagorean Theorem Calculator on AltFTool — it loads instantly in your browser.
In Solve a² + b² = c², choose Hypotenuse c, Leg a or Leg b as the side to find.
Enter the two known lengths, for example legs 5 and 7, and pick a Unit such as cm and the Decimal places.
Read the simplified radical (√74) and decimal (≈ 8.6023), the right-triangle diagram, area, angles and Steps, then press Copy.
Use Check sides to test three lengths like 6, 8, 10, or Triples to list Pythagorean triples up to a largest hypotenuse and download them as CSV.
Results are given in simplified radical form, such as 2√3, alongside a decimal rounded to the places you choose, so you can match either style of answer.
The formula, the squared values, the sum or difference and the square-root simplification are listed in order with your numbers.
Test any three lengths with the converse of the theorem, see if they are a primitive or scaled Pythagorean triple, and list every triple up to a chosen hypotenuse.
Pick mm, cm, m, km, in, ft, yd or mi; lengths and the area in square units are labelled, and the solved side is highlighted on a scaled drawing.
| a | b | c | Check: a² + b² = c² |
|---|---|---|---|
| 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 |
| 12 | 35 | 37 | 144 + 1225 = 1369 |
| 9 | 40 | 41 | 81 + 1600 = 1681 |
| 28 | 45 | 53 | 784 + 2025 = 2809 |
| 11 | 60 | 61 | 121 + 3600 = 3721 |
| 16 | 63 | 65 | 256 + 3969 = 4225 |
| 33 | 56 | 65 | 1089 + 3136 = 4225 |
| 48 | 55 | 73 | 2304 + 3025 = 5329 |
| 13 | 84 | 85 | 169 + 7056 = 7225 |
| 36 | 77 | 85 | 1296 + 5929 = 7225 |
| 39 | 80 | 89 | 1521 + 6400 = 7921 |
| 65 | 72 | 97 | 4225 + 5184 = 9409 |
Multiply any row by a whole number to get a non-primitive triple, e.g. 3-4-5 × 2 = 6-8-10.
In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². The hypotenuse c is the side opposite the right angle and is always the longest. The theorem only applies to right triangles; for other triangles the law of cosines adds a correction term.
Square both legs, add them, and take the square root: c = √(a² + b²). For legs 6 and 8, c = √(36 + 64) = √100 = 10. If the sum is not a perfect square, the answer is irrational; for legs 1 and 2 it is √5, about 2.2361.
Rearrange the formula: a = √(c² − b²). Square the hypotenuse, subtract the square of the known leg, and take the square root. For a hypotenuse of 13 and a leg of 12, a = √(169 − 144) = √25 = 5. The hypotenuse must be longer than the leg, or there is no solution.
A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13. A triple is primitive when the three numbers share no common factor. Multiplying a triple by any whole number gives another triple, so 6, 8, 10 is 3, 4, 5 doubled.
Euclid's formula produces every primitive triple: pick whole numbers m > n that share no factor and are not both odd, then a = m² − n², b = 2mn and c = m² + n². With m = 2 and n = 1 you get 3, 4, 5; with m = 3 and n = 2 you get 5, 12, 13.
Use the converse of the theorem: if the squares of the two shorter sides add up to the square of the longest side, the triangle has a right angle. If the sum is greater, the triangle is acute; if smaller, it is obtuse. The Check sides tab does this comparison and also flags whole-number triples.
Factor the number under the square root and take out any perfect-square factor. For example √72 = √(36 × 2) = 6√2, and √50 = √(25 × 2) = 5√2. If no square factor other than 1 divides the number, as with √74, the radical is already in simplest form.
Builders mark 3 units along one line and 4 along the other; if the diagonal between the marks measures exactly 5, the corner is a right angle. Any multiple works, such as 6-8-10 or 9-12-15 feet, and larger multiples give a more accurate check over a long wall.
Yes, by applying it twice. The space diagonal of a box with sides x, y and z is √(x² + y² + z²): first find the diagonal of the base, √(x² + y²), then use it as one leg with the height z as the other. You can do the two steps here one after the other.
Yes. Decimals like 1.5 and 2 work and give exact answers when possible, here 2.5. Both inputs must use the same unit; the result is in that unit and the area in that unit squared. Convert first if your measurements are mixed, such as feet and inches.
Add the Pythagorean Theorem Calculator widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/pythagorean-theorem-calculator"
title="Pythagorean Theorem Calculator — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/pythagorean-theorem-calculator?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>