Pythagorean Theorem Calculator
Two sides of a right triangle are enough to pin down the third. Enter the ones you have, leave the unknown box empty, and the tool solves a² + b² = c² for it, whichever side that is. You get the worked steps in the order a teacher marks them, the answer as a simplified square root as well as a decimal, and the triangle drawn to scale with both acute angles. The same equation gets typed a2 + b2 = c2 or a^2 + b^2 = c^2 when superscripts are not available, and this page covers what it means and how to rearrange it, finding the hypotenuse and finding a leg.
a² + b² = c²
Fill in the two sides you know and leave the third box empty. Any unit works, and the answer comes back in that same unit.
Hypotenuse c
c = 5
3² + 4² = 5²Pythagorean triple
- Area
- 6 sq units
- Perimeter
- 12 units
- Angles
- 36.87° · 53.13° · 90°
The steps
Step 1. Start with the Pythagorean theorem
a² + b² = c²
Step 2. Substitute the two legs
3² + 4² = c²
Step 3. Square each leg and add
9 + 16 = 25 = c²
Step 4. Take the square root of both sides
c = √25 = 5
The triangle
Drawn to scale from your numbers. The ochre side is the one that was solved for, and the square in the corner marks the right angle, which is always opposite the hypotenuse.
How to solve a2 + b2 = c2 for each side
Square the two lengths you know, add them if the missing side is the hypotenuse or subtract them if it is a leg, then take the square root of the result.
a² + b² = c²
Rearranged for whichever side is missing. c is always the hypotenuse, the side facing the right angle, and it is always the longest of the three.
c = √(a² + b²) a = √(c² − b²) b = √(c² − a²)
Superscripts are awkward to type, so the same three lines are often written a^2 + b^2 = c^2, a2+b2=c2, or spelled out as a squared plus b squared equals c squared. They all mean this equation, and the calculator accepts the numbers either way since you only ever enter side lengths.
Finding the hypotenuse, step by step
Legs of 6 and 8. Both legs are known, so the two squares get added.
-
Step 1. Start with the Pythagorean theorem
a² + b² = c²
-
Step 2. Substitute the two legs
6² + 8² = c²
-
Step 3. Square each leg and add
36 + 64 = 100 = c²
-
Step 4. Take the square root of both sides
c = √100 = 10
That triangle has an area of 24 square units and angles of 36.87° and 53.13°. It is the 3-4-5 triangle doubled, which is why the answer lands on a whole number.
Finding a leg, step by step
A hypotenuse of 15 and one leg of 9. Here the equation has to be rearranged first, and the squares get subtracted rather than added. Adding them is the single most common mistake in this direction.
-
Step 1. Start with the Pythagorean theorem
a² + b² = c²
-
Step 2. Rearrange for the missing leg
a² = c² − b²
-
Step 3. Substitute the hypotenuse and the known leg
a² = 15² − 9²
-
Step 4. Square both and subtract
a² = 225 − 81 = 144
-
Step 5. Take the square root of both sides
a = √144 = 12
When the answer is a square root
Whole-number answers are the exception. Legs of 4 and 6 give c = √52 = 2√13 ≈ 7.211103. The middle form is the simplified radical: 52 factors into 4 × 13, and the 4 comes out of the root as a 2. Homework usually wants that exact form, a tape measure wants the decimal, so the calculator prints both on the last step whenever the radicand is a whole number.
Pythagorean triples worth memorizing
Six primitive triples, meaning the three numbers share no common factor. Multiply any row by the same number and it is still a right triangle, so 3-4-5 also gives 6-8-10, 9-12-15 and so on. Every row here was solved by the calculator at build time.
| Leg a | Leg b | Hypotenuse c | Check | Angles |
|---|---|---|---|---|
| 3 | 4 | 5 | 9 + 16 = 25 | 36.9° · 53.1° |
| 5 | 12 | 13 | 25 + 144 = 169 | 22.6° · 67.4° |
| 8 | 15 | 17 | 64 + 225 = 289 | 28.1° · 61.9° |
| 7 | 24 | 25 | 49 + 576 = 625 | 16.3° · 73.7° |
| 20 | 21 | 29 | 400 + 441 = 841 | 43.6° · 46.4° |
| 9 | 40 | 41 | 81 + 1600 = 1681 | 12.7° · 77.3° |
Where the theorem actually gets used
- Squaring a corner. Mark 3 feet along one wall and 4 along the other. If the diagonal is 5, the corner is square. Bigger multiples like 6-8-10 are more forgiving of a small measuring error.
- Roof rafters and ramps. Rise and run are the legs, the rafter or ramp surface is the hypotenuse.
- Diagonal of a screen or a room. A 48 by 27 inch panel has a diagonal of √(48² + 27²), which is where the advertised inches come from.
- Distance between two points. The distance formula is the theorem with the legs written as the differences in x and y.
- Combining two velocities. A projectile's speed is √(vx² + vy²), the horizontal and vertical components treated as legs.
- Ladder safety. Ladder length is c, the distance from the wall is one leg, so the height it reaches is the other.
How to use this calculator
- Find the right angle in your triangle. The side opposite it is the hypotenuse, so that value goes in c.
- Put the other two lengths in a and b. They are interchangeable, so it makes no difference which is which.
- Leave the box you want solved empty. It gets outlined in ochre and the result updates as you type.
- Read the steps below the answer to copy the working, and check the diagram to confirm the shape matches what you measured.
Frequently Asked Questions
What is the Pythagorean theorem?
What does a2 + b2 = c2 mean?
How do you find the hypotenuse?
How do you find a missing leg?
Why does the calculator refuse a hypotenuse shorter than a leg?
What if the answer is not a whole number?
What are Pythagorean triples?
Can I use the theorem to check whether a corner is square?
Does the theorem work for triangles that are not right-angled?
What units should I use?
Is anything I type sent to a server?
Related Calculators
Scientific Calculator
Full scientific calculator with trigonometry, logarithms, exponents, f…
Percent Off Calculator
Find the sale price and what you save for any percent off. Stack extra…
Vertex Form Calculator
Convert standard form to vertex form and back, with the completing-the…
Projectile Motion
Range, time of flight, max height, vertical velocity and impact speed …