Superficie.org
Free Right Triangle Calculator

Pythagorean Theorem Calculator

Find the missing side of a right triangle in seconds. Calculate the hypotenuse or either perpendicular leg, see the formula substituted with your numbers, and follow the solution step by step.

Choose the side you want to find, enter the two known sides, and select your measurement unit. The calculator runs in your browser.

Calculate a Missing Side

Enter the two known sides of a right triangle.

First perpendicular leg.
Second perpendicular leg.

All lengths must be positive. When finding a leg, the hypotenuse must be longer than the known leg.

Right Triangle Diagram

a = 3 cm b = 4 cm c = 5 cm 90°

Side c is the hypotenuse and is always opposite the 90° angle. Sides a and b are the perpendicular legs. The diagram is illustrative and may not be drawn to exact scale.

The Pythagorean Theorem Formula

The Pythagorean theorem describes the relationship between the three sides of a right triangle. It applies only when one angle is exactly 90 degrees.

The main equation

a² + b² = c²

In this equation, a and b are the two perpendicular legs, while c is the hypotenuse, the longest side of the right triangle.

Find the hypotenuse

When both legs are known, add their squares and take the square root.

c = √(a² + b²)

Example: if a = 3 and b = 4, then c = √(9 + 16) = √25 = 5.

Find leg a

When the hypotenuse and leg b are known, subtract the known leg's square.

a = √(c² − b²)

Example: if c = 13 and b = 5, then a = √(169 − 25) = √144 = 12.

Find leg b

The same subtraction method finds the other perpendicular leg.

b = √(c² − a²)

Example: if c = 10 and a = 6, then b = √(100 − 36) = √64 = 8.

Why does it work?

Imagine drawing a square outward from each side of a right triangle. The theorem says the area of the square on the hypotenuse equals the combined areas of the squares on the two legs.

Area of square on c = area on a + area on b

Worked Examples

These examples show how the formula works when finding each of the three sides.

Example 1: Find the hypotenuse

Known sides: a = 3 cm and b = 4 cm.

c² = 3² + 4²
c² = 9 + 16 = 25
c = √25 = 5 cm

Answer: 5 cm

Example 2: Find a missing leg

Known sides: c = 13 m and b = 5 m.

a² = 13² − 5²
a² = 169 − 25 = 144
a = √144 = 12 m

Answer: 12 m

Example 3: Find the other leg

Known sides: c = 10 ft and a = 6 ft.

b² = 10² − 6²
b² = 100 − 36 = 64
b = √64 = 8 ft

Answer: 8 ft

Example 4: A diagonal across a rectangle

A rectangular floor is 9 m long and 12 m wide.

d = √(9² + 12²)
d = √(81 + 144) = √225
d = 15 m

The diagonal divides the rectangle into two right triangles. Each triangle has the same diagonal as its hypotenuse.

Common Pythagorean Triples

A Pythagorean triple is a set of three positive whole numbers that satisfies a² + b² = c². These exact integer examples are useful for homework and for checking a calculator.

Leg a Leg b Hypotenuse c Verification Try it
345 9 + 16 = 25
51213 25 + 144 = 169
81517 64 + 225 = 289
72425 49 + 576 = 625
202129 400 + 441 = 841
94041 81 + 1600 = 1681

How are Pythagorean triples generated?

For positive integers m greater than n, one way to generate a triple is:

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

For example, m = 2 and n = 1 give a = 3, b = 4, and c = 5. Depending on the values chosen, this formula can generate primitive triples or multiples of smaller triples.

Where Is the Pythagorean Theorem Used?

Construction and carpentry

Builders can use the theorem to check square corners, estimate diagonal lengths, and calculate distances between perpendicular measurements.

Rectangles and room diagonals

A rectangle's diagonal creates a right triangle. Its length can be found from the rectangle's length and width.

Navigation and distance

For perpendicular movements on a flat coordinate grid, the theorem gives the straight-line distance between the starting and ending points.

Coordinates and mathematics

The distance formula in a two-dimensional Cartesian plane follows directly from the Pythagorean theorem.

d = √[(x₂ − x₁)² + (y₂ − y₁)²]

Frequently Asked Questions

1. What is the Pythagorean theorem?

It states that the square of the hypotenuse of a right triangle equals the sum of the squares of its two legs. In symbols, a² + b² = c².

2. How do I calculate the hypotenuse?

Square both perpendicular legs, add the squares, and take the square root. For legs of 3 and 4 units, the hypotenuse is √(9 + 16) = 5 units.

3. How do I calculate a missing leg?

Square the hypotenuse, subtract the square of the known leg, and take the square root. For example, with hypotenuse 13 and leg 5, the missing leg is √(169 − 25) = 12.

4. Does the theorem work for every triangle?

It applies directly only to right triangles. For triangles without a right angle, the law of cosines is a more general relationship between the sides and angles.

5. Which side is the hypotenuse?

The hypotenuse is the side opposite the right angle. It is always the longest side of a non-degenerate right triangle.

6. Can I use different units for the two known sides?

Convert both known measurements to the same unit before calculating. This calculator uses one selected unit for both inputs and all displayed length results.

7. What if the known hypotenuse is shorter than a leg?

Those measurements cannot describe a right triangle. The hypotenuse must be longer than either leg, and the square-root expression for the missing leg must be positive.

8. What is a Pythagorean triple?

It is a set of three positive whole numbers satisfying the theorem, such as 3, 4, 5 or 5, 12, 13. Multiplying all three numbers in a triple by the same positive integer produces another triple.