How to use the Pythagorean theorem calculator
- Under Solve for, pick Hypotenuse (c), Leg (a), Leg (b), or Check 3 sides to test whether three lengths make a right triangle.
- Type the sides you know into Leg a, Leg b and Hypotenuse c. The field being solved fills in for you.
- Choose the Decimal places (default 4), then read the answer, the working, and the triangle's area, perimeter and angles. Use one unit for every side.
The formula
In a right triangle, the square of the hypotenuse c (the side opposite the 90 degree angle) equals the sum of the squares of the two legs: a² + b² = c². Solving for each side gives c = √(a² + b²), a = √(c² - b²) and b = √(c² - a²). The converse, which Check 3 sides relies on, is Euclid's Proposition 48.
The calculator also gives the area (a × b ÷ 2), the perimeter, and the two acute angles: angle A = arctan(a ÷ b) and angle B = arctan(b ÷ a). With whole-number sides you also get exact answers, such as 2√5.
Worked example with the default values
Solve for Hypotenuse (c) with a = 3 and b = 4:
- c² = a² + b² = 3² + 4² = 9 + 16 = 25
- c = √25 = 5
- Area = 3 × 4 ÷ 2 = 6, perimeter = 3 + 4 + 5 = 12
- Angle A = 36.8699°, angle B = 53.1301°, and the right angle is 90°
To find a leg, pick Leg (a), then enter b = 12 and c = 13. The calculator returns a² = 169 - 144 = 25, so a = 5. A 10 ft ladder standing 3 ft from a wall reaches √(10² - 3²) = √91 ≈ 9.5394 ft up it.
Real uses
- Squaring a corner. Mark 3 ft along one edge and 4 ft along the other. If the diagonal between the marks is exactly 5 ft, the corner is square.
- Diagonals. The rectangle area calculator gives a room or screen diagonal along with its area.
Limits and edge cases
- It only works for right triangles. For other triangles, try the triangle area calculator. For points on a coordinate grid, use the distance formula calculator.
- The hypotenuse must be longer than either leg, and sides must be positive. Commas such as 1,250.5 are accepted.
- Check 3 sides compares the squares to about nine digits, so rounded measurements usually fail: 1, 1 and 1.414 is not a right triangle, because 1² + 1² = 2 but 1.414² = 1.999396.
Frequently asked questions
How do I find a missing leg of a right triangle?
Choose Leg (a) or Leg (b) under Solve for, then enter the other leg and the hypotenuse. The calculator subtracts the squares: a = √(c² - b²). For c = 13 and b = 12 it returns a = 5.
How can I tell if a triangle is a right triangle?
Choose Check 3 sides and enter the lengths in any order. If the squares of the two shorter sides add up to the square of the longest, it is a right triangle (the converse of the theorem). For 3, 4 and 5, 9 + 16 = 25, so the answer is yes.
What are Pythagorean triples?
A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13. Multiples such as 6, 8, 10 also count. The calculator points out when your sides form one.
Does the Pythagorean theorem work for non-right triangles?
No, it only holds when one angle is exactly 90 degrees. For other triangles use the law of cosines, c² = a² + b² - 2ab cos(C), which reduces to the Pythagorean theorem when C is 90 degrees.
Sources: Euclid, Elements, Book I, Proposition 47 (Clark University edition) and Wolfram MathWorld, Pythagorean Theorem.