How the pythagorean theorem calculator works
In a right triangle, the square of the longest side (the hypotenuse) equals the sum of the squares of the other two. Enter any two sides to find the third, plus the angles, area and perimeter.
Formula
a² + b² = c², so c = √(a² + b²) and a = √(c² − b²).
- 1
Square the two short sides
For sides a = 3 and b = 4: 3² = 9 and 4² = 16.
- 2
Add the squares
9 + 16 = 25. This is c².
- 3
Take the square root
√25 = 5, so the hypotenuse is 5. The area is 3 × 4 ÷ 2 = 6 square units.
Worked example
The calculator opens with these values
- Which side do you want to find?
- Hypotenuse c
- Side a
- 3
- Side b
- 4
Hypotenuse c
5
Common Pythagorean triples
Every multiple of a triple is also a triple: 3-4-5 gives 6-8-10, 9-12-15 and 30-40-50. If your two sides are a multiple of a row below, the hypotenuse is the same multiple of c, with no square root needed.
| Side a | Side b | Hypotenuse c | Angle opposite a |
|---|---|---|---|
| 3 | 4 | 5 | 36.87° |
| 5 | 12 | 13 | 22.62° |
| 8 | 15 | 17 | 28.07° |
| 7 | 24 | 25 | 16.26° |
| 20 | 21 | 29 | 43.6° |
| 12 | 35 | 37 | 18.92° |
| 9 | 40 | 41 | 12.68° |
| 11 | 60 | 61 | 10.39° |
Checking a square corner with 3-4-5
Builders, gardeners and tilers use the theorem backwards: if the three sides fit a² + b² = c², the corner between a and b is exactly 90°.
- Mark 3 ft along one edge from the corner and 4 ft along the other. The diagonal between the marks should be 5 ft.
- Scale up for a large layout, such as 6-8-10 ft or 9-12-15 ft. Over a longer distance a small error is easier to see.
- A diagonal longer than 5 ft means the corner is wider than 90°; a shorter one means it is tighter.
- Any unit works: 30-40-50 cm suits a picture frame, a shelf or a tile layout.
Distance between two points and diagonals
On a graph, the horizontal and vertical gaps between two points are the legs of a right triangle, so the distance is d = √((x₂ − x₁)² + (y₂ − y₁)²). From (1, 2) to (7, 10) the gaps are 6 and 8, so the distance is 10.
The same rule gives the diagonal of any rectangle: a 12 ft by 16 ft room measures 20 ft from corner to corner. For a box, add the third side under the root: √(l² + w² + h²).
Common questions
Which side is the hypotenuse?
The side opposite the right angle. It is always the longest side, so when you solve for a or b, the hypotenuse you enter must be longer than the other side.
Does the theorem work for any triangle?
No, only for triangles with a 90° angle. For other triangles use the law of cosines: c² = a² + b² − 2ab × cos(C).
What is a Pythagorean triple?
Three whole numbers that fit a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. Builders use 3-4-5 to mark a square corner.
Which units should I use?
Any unit, as long as both sides use the same one. The answer comes out in that unit, and the area in its square.
Related calculators
Square Root Calculator
Calculate square roots and nth roots
Circle Calculator
Calculate area, circumference, and diameter of circles
Quadratic Equation
Solve quadratic equations and find roots
Square Footage
Calculate area in square feet for rooms and spaces