Skip to main content

Calcu.fit

Pythagorean Theorem Calculator: Find a Missing Side with a² + b² = c²

Use this free Pythagorean theorem calculator to find the hypotenuse or a missing leg of a right triangle. Enter any two sides, and the calculator finds the third, with steps. You can also check whether three sides form a right triangle, find the distance between two points, and find the diagonal of a rectangle or a box. No signup needed.

Pythagorean theorem calculator

Enter two sides

Leave the unknown side empty. The hypotenuse c is the longest side.

Missing side
–

Steps

    How to Use This Pythagorean Theorem Calculator

    Find a missing side:

    1. Enter the two sides you know. Leave the unknown side empty.
    2. The calculator works out which side is missing. The hypotenuse is c, and the legs are a and b.
    3. Click Calculate.

    Check a right triangle:

    1. Enter three side lengths.
    2. Click Check to see if the triangle is right, acute, or obtuse.

    Distance and diagonals:

    1. Choose “distance between two points”, “rectangle diagonal”, or “box diagonal”.
    2. Enter the values and click Calculate.

    What You’ll See in Your Results

    • The missing side, in exact form (such as √74) and as a decimal
    • The check that a² + b² = c², with your numbers
    • Whether three sides form a right, acute, or obtuse triangle
    • The area and perimeter of the triangle, as extras
    • Steps using your numbers

    For angles and trigonometry, see our Right Triangle Calculator.

    What Is the Pythagorean Theorem?

    In a right triangle (a triangle with a 90° angle), the square of the hypotenuse equals the sum of the squares of the two legs.

    a² + b² = c²

    • a and b are the legs (the two sides that meet at the right angle).
    • c is the hypotenuse (the longest side, opposite the right angle).

    The theorem works only for right triangles. In geometric terms, the area of the square on the hypotenuse equals the sum of the areas of the squares on the other two sides. For a 3-4-5 triangle: 3² + 4² = 9 + 16 = 25 = 5².

    A Short History

    The relationship is named after the Greek mathematician Pythagoras, but it was known much earlier. Babylonian clay tablets and the Sulba Sutras of ancient India (such as those of Baudhayana) describe the rule, and many cultures used it for building and surveying. Mathematicians have since found hundreds of different proofs.

    The Formulas

    Hypotenuse: c = √(a² + b²)

    A leg: a = √(c² − b²), and b = √(c² − a²)

    Converse (check for a right triangle): with c as the longest side,

    ResultTriangle type
    a² + b² = c²Right triangle
    a² + b² > c²Acute triangle (all angles less than 90°)
    a² + b² < c²Obtuse triangle (one angle greater than 90°)

    Distance between two points (x₁, y₁) and (x₂, y₂):
    d = √[(x₂ − x₁)² + (y₂ − y₁)²]

    Rectangle diagonal: d = √(l² + w²)

    Box (3D) diagonal: d = √(l² + w² + h²)

    Area: ½ × a × b, and Perimeter: a + b + c

    Pythagorean Theorem Calculator Examples

    All answers are rounded for display.

    Example 1: Find the Hypotenuse

    Legs of 3 and 4.

    • c = √(3² + 4²) = √(9 + 16) = √25 = 5

    Legs of 5 and 7:

    • c = √(25 + 49) = √74 ≈ 8.602

    Example 2: Find a Missing Leg

    Hypotenuse 13 and a leg of 5.

    • b = √(13² − 5²) = √(169 − 25) = √144 = 12

    Hypotenuse 10 and a leg of 6:

    • b = √(100 − 36) = √64 = 8

    Hypotenuse 9 and a leg of 4:

    • b = √(81 − 16) = √65 ≈ 8.062

    Example 3: Decimal Sides

    Legs of 1.5 and 2.

    • c = √(2.25 + 4) = √6.25 = 2.5

    Example 4: Is It a Right Triangle?

    Always put the longest side as c.

    • 8, 15, 17: 64 + 225 = 289 = 17². Right.
    • 7, 24, 25: 49 + 576 = 625 = 25². Right.
    • 6, 7, 9: 36 + 49 = 85, which is greater than 81. Acute.
    • 4, 5, 8: 16 + 25 = 41, which is less than 64. Obtuse.

    Example 5: Distance Between Two Points

    Points (2, 3) and (10, 9).

    • Horizontal change = 8, and vertical change = 6
    • Distance = √(64 + 36) = √100 = 10

    Points (−1, −2) and (4, 10):

    • Changes = 5 and 12
    • Distance = √(25 + 144) = 13

    Example 6: The Diagonal of a Rectangle

    A rectangle that is 12 by 5.

    • Diagonal = √(144 + 25) = 13

    Example 7: The Diagonal of a Box

    A box that is 3 by 4 by 12.

    • Diagonal = √(9 + 16 + 144) = √169 = 13

    A box that is 2 by 3 by 6:

    • Diagonal = √(4 + 9 + 36) = √49 = 7

    A cube with a side of 4:

    • Diagonal = 4√3 ≈ 6.928

    Example 8: A Ladder

    A 5 m ladder reaches 3 m up a wall. How far is the foot from the wall?

    • Distance = √(5² − 3²) = √16 = 4 m

    For real ladders, follow the ladder’s label and local safety guidance.

    Example 9: A Shortcut

    A field is 120 m by 90 m. You can walk along two sides (210 m) or across the diagonal.

    • Diagonal = √(120² + 90²) = √22,500 = 150 m
    • You save 60 m

    Example 10: The Height of an Equilateral Triangle

    An equilateral triangle has sides of 10. Split it in half to make a right triangle with a hypotenuse of 10 and a leg of 5.

    • Height = √(10² − 5²) = √75 = 5√3 ≈ 8.660

    Example 11: An Isosceles Right Triangle

    Both legs are 1.

    • Hypotenuse = √(1 + 1) = √2 ≈ 1.4142

    In general, the hypotenuse is leg × √2.

    Example 12: Squares on the Sides

    For a 3-4-5 triangle, the squares on the sides have areas 9, 16, and 25.

    • 9 + 16 = 25

    Example 13: Multiples of a Triple

    Scale 3-4-5 by 20.

    • 60, 80, 100: 3,600 + 6,400 = 10,000 = 100². It still works.

    Pythagorean Triples

    A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c². Any multiple of a triple is also a triple.

    TripleCheck
    3, 4, 59 + 16 = 25
    5, 12, 1325 + 144 = 169
    8, 15, 1764 + 225 = 289
    7, 24, 2549 + 576 = 625
    20, 21, 29400 + 441 = 841
    9, 40, 4181 + 1,600 = 1,681
    6, 8, 10Double of 3-4-5

    Euclid’s Formula

    For whole numbers m > n > 0, this gives a triple:

    a = m² − n², b = 2mn, c = m² + n²

    mna = m² − n²b = 2mnc = m² + n²
    21345
    3251213
    4115817
    4372425
    52212029
    5494041

    When the Theorem Does Not Apply

    • The triangle is not a right triangle. For other triangles, use the Law of Cosines (see our Triangle Calculator).
    • The hypotenuse must be the longest side. If a leg is longer than the “hypotenuse”, the numbers are wrong.
    • The theorem is for flat (Euclidean) geometry. On a sphere (such as the Earth’s surface over long distances), it does not hold exactly.

    Where the Pythagorean Theorem Is Used

    • Construction: checking that a corner is square, using the 3-4-5 rule
    • Carpentry and roofing: the length of rafters and braces
    • Navigation and surveying: straight-line distances
    • Screens and frames: the diagonal of a rectangle
    • Computer graphics and maps: the distance between two points
    • Physics and engineering: vectors and forces
    • School math

    Common Mistakes

    • Using it on a triangle without a right angle.
    • Putting a leg in place of the hypotenuse. c is always the longest side.
    • Adding when you should subtract. To find a leg, use c² − b², not c² + b².
    • Forgetting the square root. a² + b² gives c², not c.
    • Squaring the sum instead of summing the squares. (a + b)² is not a² + b².
    • Mixing units. Use the same unit for all sides.
    • Rounding too early. Keep full precision until the end.

    Tips for Using a Pythagorean Theorem Calculator

    • Draw a sketch and mark the right angle.
    • Label the longest side c.
    • Check your answer: the hypotenuse must be longer than either leg.
    • Use the exact form (such as √74) for homework that asks for it, and decimals for measurements.
    • Remember common triples (3-4-5, 5-12-13, 8-15-17) for quick checks.
    • For real jobs, measure carefully, and check local rules and safety guidance.

    Pythagorean Theorem Calculator vs. Other Tools

    • Right Triangle Calculator: angles, trigonometry, area, and more for right triangles.
    • Triangle Calculator: solves any triangle.
    • Slope Calculator: rise over run.
    • Circle Calculator: area, circumference, arc, and sector.
    • Scientific Calculator: powers, roots, and trig.

    Frequently Asked Questions (FAQ)

    What is the Pythagorean theorem?

    In a right triangle, a² + b² = c², where c is the hypotenuse and a and b are the legs.

    Add the squares of the two legs and take the square root: c = √(a² + b²). For legs 3 and 4, c = 5.

     Subtract the square of the known leg from the square of the hypotenuse and take the square root. For c = 13 and a = 5, the other leg is √(169 − 25) = 12.

    No. It works only for right triangles.

    Check if a² + b² = c², with c as the longest side. If equal, it is a right triangle. If a² + b² is greater, the triangle is acute, and if smaller, it is obtuse.

    Three whole numbers that satisfy a² + b² = c², such as 3-4-5 or 5-12-13.

    If the sides of a triangle satisfy a² + b² = c², then the triangle is a right triangle.

    Use d = √[(x₂ − x₁)² + (y₂ − y₁)²]. For (2, 3) and (10, 9), the distance is √(64 + 36) = 10.

    Use d = √(l² + w²). For a 12 by 5 rectangle, it is 13.

    Use d = √(l² + w² + h²). For a 3 by 4 by 12 box, it is 13.

    A triangle with sides 3, 4, and 5 has a right angle. Builders use multiples of it (such as 6-8-10) to check that a corner is square.

    Yes. It is free, with no registration and no limits.

    Exact forms are exact. Decimals are rounded for display.

    Disclaimer

    This calculator is for general and educational use. Exact answers are exact, and decimals are rounded for display. For construction, carpentry, surveying, ladders, or any work that affects safety, measure carefully, follow local rules and safety guidance, and consult a qualified professional. Follow your teacher’s rules on the form of the answer.