AI CalculatorAI Calculator

    Pythagorean Theorem Calculator

    Solve right triangle problems using a² + b² = c²

    How It Works

    Overview

    The Pythagorean theorem calculator solves for any unknown side of a right triangle when the other two are known. A right triangle is one with exactly one 90° angle; the side opposite the right angle is the hypotenuse (c) — always the longest — and the two sides forming the right angle are the legs (a and b).

    The theorem, attributed to the Greek mathematician Pythagoras (~570–495 BCE), is one of the most-used results in geometry. It links the three side lengths through a² + b² = c² and underlies countless practical calculations: ladder placement, screen diagonals, navigation, structural diagonals, and the straight-line distance between any two points in coordinate geometry.

    The Formula

    a² + b² = c²

    Where:

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

    Rearranged forms for solving each side:

    • c = √(a² + b²) — find the hypotenuse from both legs
    • a = √(c² − b²) — find a leg from the hypotenuse and other leg
    • b = √(c² − a²) — find the other leg

    Important: this only applies to right triangles. For other triangles, use the Law of Cosines, which is the Pythagorean theorem's general form.

    Worked Example

    A 25-foot ladder leans against a wall with its base 7 feet from the wall. How high up the wall does the ladder reach?

    • Hypotenuse (ladder): c = 25 ft
    • Leg (base distance): b = 7 ft
    • Unknown leg (wall height): a = √(25² − 7²) = √(625 − 49) = √576 = 24 ft

    Another quick example: a 32-inch by 18-inch monitor has a diagonal of √(32² + 18²) = √(1024 + 324) = √1348 ≈ 36.7 inches. Manufacturers round this to the nearest size class (e.g., "37-inch").

    When to Use This

    • Construction and carpentry — verify square corners using the 3-4-5 rule, or compute rafter diagonals.
    • Ladder safety — figure how far the base should sit from a wall to safely reach a given height.
    • Display sizing — convert a TV or monitor's width and height to a diagonal screen size.
    • Coordinate geometry — find the straight-line distance between two points: d = √((x₂−x₁)² + (y₂−y₁)²).
    • Navigation and surveying — calculate direct distance from horizontal and vertical offsets.

    Common Mistakes to Avoid

    • Applying it to non-right triangles. The theorem only works when one angle is exactly 90°. Use the Law of Cosines otherwise.
    • Misidentifying the hypotenuse. The hypotenuse is the longest side and is always opposite the right angle, not just any side you call "c".
    • Forgetting to take the square root. a² + b² gives c², not c. Don't stop at the squared value.
    • Negative under the radical. If you're solving for a leg and get a negative value inside √, your hypotenuse is too short — check your inputs.
    • Mixing units. All three sides must be measured in the same unit before plugging into the formula.

    Frequently Asked Questions

    Ad Space