Home / ⚡ Geometry/ Pythagorean Theorem Calculator

Pythagorean Theorem Calculator

Print
Enter any two sides of a right-angled triangle to calculate the third side value using the formula: a² + b² = c².
Solved Parameters
Hypotenuse (c)
5.0000
Side a (Leg) 3.0000
Side b (Leg) 4.0000
Hypotenuse c 5.0000
Area / Perimeter 6.00 / 12.00
Right Triangle Proportions

The Pythagorean Theorem is a fundamental mathematical relation in Euclidean geometry that describes the relationship between the three sides of a right-angled triangle. Named after the ancient Greek thinker and mathematician Pythagoras, the theorem states that in any right triangle (a triangle containing one 90° angle), the area of the square formed by the longest side (the hypotenuse) is equal to the sum of the areas of the squares formed by the other two legs.

Our free Pythagorean Theorem Calculator makes solving right triangles simple. By inputting any two known side lengths (supporting both decimals and square roots like √5), our tool automatically calculates the exact length of the third side, alongside showing the step-by-step arithmetic.


The Pythagorean Equation and Formulas

In a right-angled triangle, let c represent the length of the hypotenuse (the side opposite the 90° right angle), while a and b represent the lengths of the other two perpendicular sides (the legs). The relationship is expressed as:

a² + b² = c²

If you know two sides of the right triangle, you can rearrange the Pythagorean equation to solve for the third unknown side:

  • Solving for the Hypotenuse (c):

    c = √(a² + b²)
  • Solving for Leg a:

    a = √(c² - b²)
  • Solving for Leg b:

    b = √(c² - a²)

Practical Calculation Example

Suppose you have a right triangle with leg lengths a = 3 and b = 4. Let’s find the hypotenuse c:

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

This forms the classic 3-4-5 right triangle, one of the most common integer ratios (Pythagorean triples) used in surveying and construction.


Two Classical Algebraic Proofs

The Pythagorean theorem has more documented proofs than almost any other mathematical theorem. Below are two of the simplest algebraic proofs based on different arrangements of four identical right triangles with sides a, b, and hypotenuse c:

Proof 1: The Outer Square Layout (Orientation i)

In this arrangement, four identical right triangles are placed around an inner square with side lengths of c. This forms a larger enclosing square with side lengths of b + a, representing a total area of (b + a)².

The area of the large outer square must equal the sum of the areas of the four triangles (each with an area of ab / 2) and the inner square (area of ):

(b + a)² = c² + 4 × (ab / 2)

b² + 2ab + a² = c² + 2ab

Subtracting 2ab from both sides yields the Pythagorean equation:

a² + b² = c²

Proof 2: The Inner Square Layout (Orientation ii)

In this arrangement, the four identical right triangles are arranged to form an outer square with side lengths of c and total area . This layout encloses a small square in the center with side lengths of b – a and area (b - a)².

The total area of the outer square must equal the sum of the areas of the four triangles and the inner square:

c² = (b - a)² + 4 × (ab / 2)

c² = (b² - 2ab + a²) + 2ab

Simplifying this equation results in:

c² = a² + b²


Generalization: The Law of Cosines

The Pythagorean theorem is actually a special case of the Law of Cosines, which applies to all triangles (including oblique triangles). The Law of Cosines states:

c² = a² + b² - 2ab × cos(C)

Where C is the angle opposite side c. If C is a perfect right angle (90°), then the cosine of C equals zero (cos(90°) = 0). This eliminates the subtraction term, reducing the formula to the standard Pythagorean equation: c² = a² + b².

Calculate all angles and medians on our Triangle Calculator or verify planar surface boundaries using the Area Calculator.


Frequently Asked Questions (FAQ)

What is a Pythagorean triple?

A Pythagorean triple consists of three positive integers (a, b, c) that perfectly satisfy the Pythagorean equation. The most famous primary triple is 3, 4, 5, but others include 5, 12, 13, 8, 15, 17, and 7, 24, 25. Any integer multiple of these triples (like 6, 8, 10) also satisfies the equation.

Can the Pythagorean theorem be used on non-right triangles?

No. The Pythagorean theorem is strictly limited to right-angled triangles. For triangles without a 90° angle, you must apply the Law of Cosines to solve for unknown side lengths or interior angles.

How do carpenters use the 3-4-5 rule?

Carpenters and builders use the 3-4-5 rule to ensure that corners form a perfect 90° right angle. They measure 3 feet along one wall and 4 feet along the perpendicular wall. If the diagonal distance (hypotenuse) between those two points measures exactly 5 feet, the corner is perfectly square.

What is the difference between Euclidean and spherical triangle math?

The Pythagorean theorem assumes a flat, two-dimensional Euclidean plane. On a curved surface (like a sphere), the sum of the angles of a triangle exceeds 180°, and straight-line rules do not apply. Spherical trigonometry equations must be used instead to solve side lengths.