Pythagorean Theorem Calculator

Pythagorean Theorem Calculator

Area
Perimeter

Step-by-step working

    Tip: the hypotenuse is always the longest side of a right triangle, so it must be longer than either leg.

    Pythagorean Theorem Calculator: Get Your Answer in Seconds

    Need the missing side of a right triangle fast? This Pythagorean theorem calculator does the algebra for you. Enter the two sides you know, press Calculate, and you get the missing side, the area, the perimeter and a step-by-step working you can follow or copy into homework.

    The rule behind every result is the famous relation a² + b² = c², where c is the hypotenuse (the side opposite the right angle) and a and b are the two legs. If you know any two sides, the third is fixed, and this calculator finds it for you.

    It is built for students checking a homework answer, builders verifying a corner is square, and anyone who wants a quick, trustworthy answer without fumbling with square roots on a phone calculator. Try the classic 3-4-5 triangle below the calculator, or enter your own numbers and see every step.

    The Formula: a² + b² = c², Explained Simply

    In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. Draw a square on each side and the area of the largest square equals the areas of the two smaller squares added together. That is the whole theorem, and it is why the calculator works in three modes:

    • Find the hypotenuse: c = √(a² + b²). Square both legs, add, then take the square root.
    • Find leg a: a = √(c² − b²). Square the hypotenuse and the known leg, subtract, then take the square root.
    • Find leg b: b = √(c² − a²). The same idea, with the other leg known.

    The one rule to remember: the hypotenuse is always the longest side. If you enter a hypotenuse that is shorter than the leg you already know, the calculator will tell you plainly instead of giving a nonsense answer.

    How to Use This Pythagorean Theorem Calculator

    1. Choose what to solve for: the hypotenuse (c), leg a, or leg b.
    2. Enter the two side lengths you know. Decimals are fine, so 2.5 works just as well as 5.
    3. Press Calculate. The missing side appears at the top, with the area and perimeter underneath.
    4. Read the step-by-step working to check each square, each subtraction or addition, and the final square root.
    5. Press Reset to clear the inputs and start a fresh triangle.

    Answers are rounded to six decimal places, which is plenty for homework, design work and site checks. If your answer is a whole number, it will show as one, with no trailing zeros to confuse things.

    Worked Examples: Classic Triples, Verified

    A Pythagorean triple is a set of three whole numbers that fits the theorem exactly. These are the ones you will meet most often, and the calculator confirms each one:

    Leg aLeg bHypotenuse cAreaPerimeter
    345612
    68102424
    512133030
    724258456
    125133030
    68102424

    Notice how 3-4-5 scales: double it and you get 6-8-10, which still fits perfectly. That scaling property is why builders love triples for checking right angles on site, and it is the same idea behind scaling in our ratio calculator. Not every triangle gives a whole number, though. Legs of 1 and 2 give √5, about 2.236, and legs of 2 and 3 give √13, about 3.606. The calculator handles those just as happily.

    Right triangle diagram illustrating the Pythagorean theorem with labeled sides a, b, and c

    The Distance Formula: Right Triangles on a Grid

    The same theorem gives the distance between two points on a coordinate grid. The horizontal gap and the vertical gap form the two legs of a right triangle, and the straight-line distance is the hypotenuse: distance = √((x2 − x1)² + (y2 − y1)²).

    Take points (1, 2) and (4, 6). The horizontal gap is 3 and the vertical gap is 4, so the distance is √(9 + 16) = √25 = 5. That is the 3-4-5 triangle again, hiding inside a coordinate problem. If you need the slope of that same line as well, try our slope calculator for two points.

    Builders use the same trick in reverse: measure 3 units along one wall and 4 along the other, and the diagonal between the marks must be 5 if the corner is truly square. It is a fast, practical check that needs nothing more than a tape measure.

    Pythagorean Theorem Calculator FAQs

    How do I find the hypotenuse of a right triangle?

    Square both legs, add the squares, and take the square root: c = √(a² + b²). For legs 3 and 4, that is √(9 + 16) = √25 = 5. Choose the hypotenuse mode in the calculator and it shows every step.

    How do I find a missing leg?

    Square the hypotenuse and the leg you know, subtract the leg's square from the hypotenuse's square, and take the square root. For a hypotenuse of 13 and a leg of 5, that is √(169 − 25) = √144 = 12. Choose the matching leg mode in the calculator.

    What is a Pythagorean triple?

    It is three whole numbers that satisfy a² + b² = c² exactly, such as 3-4-5, 5-12-13 and 7-24-25. Triples are handy because they avoid messy decimals, and any multiple of a triple is a triple too.

    Can I use decimals or fractions?

    Yes. Decimals work directly in the calculator, and fractions can be entered as their decimal values. If you need to turn a fraction into a decimal first, use our fraction to decimal calculator.

    Why does the calculator say the hypotenuse must be longer than the leg?

    Because in a right triangle the hypotenuse is always the longest side. If the number you entered as the hypotenuse is shorter than the known leg, the inputs cannot describe a real right triangle, so the calculator asks you to fix them rather than returning a wrong answer.

    Does this work for triangles that are not right-angled?

    No. The theorem only applies to right triangles, where one angle is exactly 90 degrees. For other triangles you need the sine or cosine rules instead.

    Learn More

    If you enjoyed this calculator, these others on Calculator Network cover related maths in the same step-by-step style: