Math & Engineering
Pythagorean Theorem Calculator
Calculate the length of any side in a right triangle using the Pythagorean theorem (a² + b² = c²).
Reviewed by the calculator.uk.com Team · Last reviewed 14 May 2026 · Our methodology
Enter at least two sides of the right triangle to calculate the third side.
Related to Pythagorean Theorem Calculator
The Pythagorean Theorem Calculator uses the fundamental mathematical principle that in a right triangle, the square of the length of the hypotenuse (the longest side, opposite to the right angle) equals the sum of squares of the other two sides (legs). This relationship is expressed by the famous equation: a² + b² = c², where c is the hypotenuse and a and b are the legs of the right triangle.
Calculation Methods
The calculator can solve for any side of the right triangle when given the other two sides:
• Finding the hypotenuse (c): c = √(a² + b²)
• Finding a leg (a): a = √(c² - b²)
• Finding a leg (b): b = √(c² - a²)
The calculator also validates the input values to ensure they form a valid right triangle. For instance, the hypotenuse must always be longer than either leg, and when all three sides are provided, they must satisfy the Pythagorean equation within a small margin of error to account for rounding.
The calculator provides the lengths of all three sides of the right triangle. The results are displayed with up to 4 decimal places for precision, but trailing zeros are removed for clarity. The sides are labeled as follows:
Understanding the Sides
• Side A and Side B (legs): These are the two sides that form the right angle (90 degrees)
• Side C (hypotenuse): This is the longest side, opposite to the right angle
• All measurements are in the same unit (e.g., if you input in meters, the result is in meters)
When using the calculator, you can input any two sides to find the third. The calculator will automatically determine which side to calculate based on your input. If you enter all three sides, it will verify if they form a valid right triangle.
1. What is the Pythagorean theorem used for?
The Pythagorean theorem is used in various real-world applications, including construction, architecture, engineering, and navigation. It helps in calculating distances, determining right angles, and solving problems involving triangular measurements.
2. Why must the hypotenuse be the longest side?
The hypotenuse is always the longest side because it's opposite to the right angle (90 degrees). This is a mathematical necessity: since the square of the hypotenuse equals the sum of squares of the other two sides, it must be longer than either of them individually.
3. Can the Pythagorean theorem work with decimal numbers?
Yes, the Pythagorean theorem works with any positive real numbers, including decimals. The calculator can handle decimal inputs and provides results with up to 4 decimal places for precision.
4. What happens if the sides don't form a right triangle?
If you enter three sides that don't satisfy the Pythagorean theorem (a² + b² = c²), the calculator will indicate that these sides cannot form a right triangle. This helps verify whether a triangle has a right angle or not.
5. What is the scientific source for this calculator?
The relationship a² + b² = c² is traditionally attributed to Pythagoras (c. 570-495 BCE) and receives its earliest surviving rigorous proof in Book I, Proposition 47 of Euclid's Elements (c. 300 BCE). This calculator simply rearranges that same equation algebraically to solve for whichever side is missing, using JavaScript's Math.sqrt() for the square root.