Pythagorean Theorem Calculator
Find the missing side of a right triangle with a² + b² = c², step by step, spot a Pythagorean triple, or check a corner is square.
Result
Missing side: 5 ft
A measurement, not a material estimate. Nothing is added for waste.
- Pythagorean triple
- Yes, in the ratio 3 : 4 : 5
- Triangle area
- 6 ft² (864 in², 0.5574 m²)
https://calcgallery.com/geometry/pythagorean-theorem-calculator/
Results follow the mathematical operation and values shown. Check that you selected the intended operation, convention and dataset type before relying on the result. Read the full disclaimer
How to use the Pythagorean Theorem Calculator
- Choose whether you are finding the hypotenuse, a leg, or checking a corner is square.
- Enter the two sides you know. For the hypotenuse, both legs. For a leg, the other leg and the hypotenuse. To check a corner, the two marks and the diagonal you measured between them.
- Read the missing side, or the diagonal a square corner needs and the angle your measurement implies, then the working line by line below it.
The theorem
In a right triangle, the square on the hypotenuse equals the sum of the squares on the other two sides:
a² + b² = c²
a and b are the two legs, the sides that meet at the right angle, and c is the hypotenuse. The diagram shows it literally: the two smaller squares together have exactly the area of the large one.
The working
Finding the hypotenuse:
- Write the theorem, c² = a² + b².
- Put in your two legs.
- Square each and add them.
- Take the square root.
Finding a leg is the same with a subtraction: b² = c² − a², then take the square root. The hypotenuse must be longer than the leg you know. If it is not, the subtraction goes negative and there is no triangle, so the page gives no result.
Pythagorean triples worth knowing
| Triple | Common multiples |
|---|---|
| 3, 4, 5 | 6, 8, 10 and 9, 12, 15 |
| 5, 12, 13 | 10, 24, 26 |
| 8, 15, 17 | 16, 30, 34 |
| 7, 24, 25 | 14, 48, 50 |
| 20, 21, 29 | 40, 42, 58 |
The check allows a tiny tolerance for decimals, so a leg typed as 4.0000000001 still counts as 4.
The converse
The theorem also works backwards. If three lengths satisfy a² + b² = c², the angle between a and b is exactly 90 degrees. That is how the 3-4-5 check squares a corner, a slab or a set-out without a large square: a triangle with those sides must contain a right angle.
Checking a corner is square
The corner check runs the converse the other way round. Mark a distance a along one line from the corner and b along the other, and the diagonal between the marks should be √(a² + b²). With marks at 3 and 4 that is 5; at 6 and 8 it is 10. Any two marks work, so you can use whatever distances fit the site.
Enter the diagonal you actually measured and the page gives the gap between the two and the corner angle that diagonal implies, from the law of cosines:
cos(corner) = (a² + b² − measured²) ÷ (2ab)
A diagonal a little long means a corner a little over 90 degrees, and the page says by how much. Measure from the same points each time, keep the tape straight and level, and use the largest marks the space allows: an error of an eighth of an inch matters less over 10 ft than over 5. How close is close enough depends on the job, and the page does not set a tolerance.
With your numbers
- c² = a² + b²
- c² = (3 ft)² + (4 ft)²
- c² = 9 ft² + 16 ft² = 25 ft²
- c = √25 = 5 ft
Quick reference
A measurement, not a material estimate. Nothing is added for waste.
| Example | Result |
|---|---|
| Legs 3 and 4 m | Missing side: 5 m |
| Legs 5 and 12 m | Missing side: 13 m |
| Legs 8 and 15 m | Missing side: 17 m |
| Legs 1 and 1 m | Missing side: 1.414214 m |
| Leg 5 m, hypotenuse 13 m | Missing side: 12 m |
| Legs 6 and 8 ft | Missing side: 10 ft |
| Leg 9 ft, hypotenuse 15 ft | Missing side: 12 ft |
| Squaring 3-4-5 ft, diagonal 5 ft | Diagonal for a square corner: 5 ft |
| Squaring 6-8-10 ft, diagonal 10.1 ft | Diagonal for a square corner: 10 ft |
| Squaring 0.9-1.2 m, diagonal 1.49 m | Diagonal for a square corner: 1.5 m |
Common questions about the Pythagorean Theorem Calculator
- Which side is c?
- c is always the hypotenuse, the side opposite the right angle and the longest of the three. The two legs a and b can be either way round. The theorem gives the same answer if you swap them.
- Does the theorem work for triangles without a right angle?
- No. For any other triangle, a² + b² differs from c². Use the law of cosines, c² = a² + b² − 2ab cos C, which is the general form: when C is 90 degrees the last term is zero and it becomes Pythagoras. The triangle calculator solves any triangle that way.
- What is a Pythagorean triple?
- Three whole numbers that fit a² + b² = c² exactly, such as 3, 4, 5 or 5, 12, 13. Any multiple of one is also a triple: 6, 8, 10 is 3, 4, 5 doubled. The page checks your three sides against every basic triple with a hypotenuse up to 100, and reports the ratio if they are a multiple of one, whatever unit you used.
- How do I square a room corner?
- Mark 3 units along one wall from the corner and 4 along the other, then measure between the marks. If the corner is square it measures exactly 5. For a large room use 6, 8 and 10 feet or 9, 12 and 15. The longer the triangle, the smaller the error from reading the tape. Choose the corner check to enter your marks and the diagonal you measured.
- My diagonal is a little long. Which way is the corner out?
- A diagonal longer than the square one means the two lines open wider than 90 degrees, so bring them together. A shorter diagonal means the corner is tighter than 90 degrees. The page turns the difference into the corner angle, so you can see how far out it is rather than guess from the tape.