Pythagorean Theorem Calculator
Find the hypotenuse, a missing leg, or verify a Pythagorean triple for any right triangle.
📐 What is the Pythagorean Theorem?
The Pythagorean theorem is one of the most fundamental relationships in all of mathematics. It states that in any right triangle - a triangle containing exactly one 90-degree angle - the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides, known as the legs. Expressed as a formula: a² + b² = c², where a and b are the legs and c is the hypotenuse.
The theorem bears the name of the ancient Greek philosopher and mathematician Pythagoras of Samos (c. 570–495 BC), although the relationship was known to Babylonian, Indian, and Chinese mathematicians centuries earlier. The Babylonians used Pythagorean triples as far back as 1900–1600 BC (as seen on the clay tablet Plimpton 322), while the Sulba Sutras of ancient India documented the same relationship around 800–600 BC. What Pythagoras contributed was a formal logical proof within the framework of Greek deductive geometry.
The theorem is foundational to Euclidean geometry and underlies virtually every field of science, engineering, and technology. It is used in architecture to find rafter lengths from a roof's rise and run, in navigation to compute straight-line distances from component directions, in physics to find the magnitude of a resultant vector, in computer graphics to calculate the pixel distance between two points, and in surveying to lay out square corners using the 3-4-5 method. The theorem extends naturally into higher dimensions: in 3D, the space diagonal of a box with dimensions a, b, c is d = √(a² + b² + c²).
This calculator supports three modes: Find Hypotenuse (compute c given both legs a and b), Find Missing Leg (compute one leg given the hypotenuse and the other leg), and Verify Triple (check whether three numbers form a Pythagorean triple). Each mode returns the result along with the triangle area and perimeter where applicable, plus a step-by-step formula note so you can follow the working.
Formulas
Formula 1 - Find the Hypotenuse (c):
Square both legs, add the results together, then take the positive square root. Example: legs 3 and 4 give c = √(9 + 16) = √25 = 5.
Formula 2 - Find a Missing Leg (a):
Rearrange the theorem by subtracting b² from both sides: c² − b² = a², then take the square root. The known leg must be strictly shorter than the hypotenuse, otherwise the calculation is undefined.
Formula 3 - Find a Missing Leg (b):
Identical rearrangement, solving for the other leg. Example: hypotenuse 13, known leg 5 gives b = √(169 − 25) = √144 = 12.
Additional results - Area and Perimeter:
How to Use This Calculator
- Choose your calculation mode — click Find Hypotenuse if you know both legs, Find Missing Leg if you know the hypotenuse and one leg, or Verify Triple to check whether three numbers satisfy a² + b² = c².
- Enter your values — type the known side lengths into the input fields. All values must be positive numbers. For Verify Triple mode you can enter the three sides in any order; the calculator automatically sorts them.
- Click Calculate — press the Calculate button to instantly see the missing side (or triple verdict), along with the triangle area, perimeter, and a step-by-step formula note in the grey box.
- Share or revisit — use Copy Link to generate a permalink with your exact inputs pre-filled, so you can share the calculation or return to it later.