Pythagorean Theorem Calculator Formula

Understand the math behind the pythagorean theorem calculator. Each variable explained with a worked example.

Formulas Used

C

c = sqrt(a^2 + b^2)

Area

area = 0.5 * a * b

Perimeter

perimeter = a + b + sqrt(a^2 + b^2)

Variables

VariableDescriptionDefault
aSide a3
bSide b4

How It Works

Pythagorean Theorem

Formula

c = √(a² + b²)

For a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides.

Solving for a Side

  • c = √(a² + b²)
  • a = √(c² - b²)
  • b = √(c² - a²)
  • Worked Example

    A right triangle with sides a=3 and b=4.

    a = 3b = 4
    1. 01c² = 3² + 4² = 9 + 16 = 25
    2. 02c = √25 = 5
    3. 03Area = 0.5 × 3 × 4 = 6
    4. 04Perimeter = 3 + 4 + 5 = 12

    When to Use This Formula

    • Verifying whether a corner is square in construction — if a 3-4-5 triangle (or any multiple like 6-8-10) fits, the corner is a perfect 90 degrees.
    • Calculating the actual walking distance diagonally across a rectangular field, park, or city block to see how much shorter the diagonal shortcut is.
    • Determining the required length of a ladder to safely reach a given height when placed a certain distance from a wall.
    • Finding the line-of-sight distance between two points that are separated both horizontally and vertically — such as the straight-line distance from a hilltop to a point in the valley.
    • Computing the diagonal measurement of screens, rooms, or rectangular objects from their width and height dimensions.
    • Checking whether a triangle is right-angled by verifying if the sides satisfy a² + b² = c² — useful in surveying and drafting.

    Common Mistakes to Avoid

    • Assigning the hypotenuse (c) to the wrong side — c must be the longest side, opposite the right angle. If you solve for c using a shorter side in its place, the equation yields an imaginary number (square root of a negative) or a wrong answer.
    • Forgetting to take the square root at the end — a² + b² gives c², not c. A very common arithmetic slip is reporting c² as the answer instead of √(a² + b²).
    • Applying the theorem to non-right triangles — the Pythagorean theorem only works for right triangles. For other triangles, you need the law of cosines: c² = a² + b² - 2ab·cos(C).
    • Squaring a sum instead of summing squares — computing (a + b)² instead of a² + b². These are very different: (a + b)² = a² + 2ab + b², which includes an extra 2ab cross term.

    Frequently Asked Questions

    What is the Pythagorean theorem?

    The Pythagorean theorem states that in a right triangle, a² + b² = c², where c is the hypotenuse (the longest side, opposite the right angle).

    What are Pythagorean triples?

    Pythagorean triples are sets of three whole numbers that satisfy a² + b² = c². Common examples: (3,4,5), (5,12,13), (8,15,17), (7,24,25).

    Learn More

    Guide

    Pythagorean Theorem - Complete Guide

    Master the Pythagorean theorem with this comprehensive guide. Learn the formula a² + b² = c², proofs, Pythagorean triples, and real-world applications.

    Ready to run the numbers?

    Open Pythagorean Theorem Calculator