Free online calculator

Pythagorean Theorem Calculator

Find one missing side of a right triangle. Choose the missing side and enter the other two in the same length unit; c is always the hypotenuse opposite the right angle.

Side a3
Side b4
Hypotenuse c5
Area6
Perimeter12

Pythagorean theorem

  • a² + b² = c², where c is the hypotenuse (the side opposite the right angle).
  • Find c = √(a² + b²); find a = √(c² − b²).
  • Builder's check: 3, 4 and 5 (or 6, 8, 10) feet make a perfect right angle.
  • Only works for right triangles.

How to use the Pythagorean Theorem Calculator

  1. Identify the two known sides of the right triangle.
  2. Side c is the hypotenuse opposite the right angle.
  3. To find c, calculate √(a² + b²).
  4. To find leg a, calculate √(c² − b²).
  5. To find leg b, calculate √(c² − a²).
  6. When solving for a leg, the hypotenuse must be longer than the known leg.
  7. The calculator rejects side combinations that cannot form a valid right triangle.

Beyond triangles: diagonals and distances

The theorem finds any straight-line distance across a right angle. The diagonal of a rectangle is √(width² + height²), which is how screen sizes are measured. The distance between two points (x₁, y₁) and (x₂, y₂) is √((x₂ − x₁)² + (y₂ − y₁)²).

It extends to three dimensions: the longest diagonal of a box is √(a² + b² + c²). For a 3 × 4 × 12 box that is √(9 + 16 + 144) = √169 = 13.

Right-angle and measurement assumptions

The known sides must be positive and the hypotenuse longer than either leg. This assumes a right angle and straight sides; it does not establish a safe ladder setup or building-code compliance. Irrational answers are decimal approximations.

Examples

3-4-5 triangle

With legs 3 and 4, c = √(3² + 4²) = √25 = 5.

Find a missing leg

If c = 13 and b = 5, then a = √(13² − 5²) = √144 = 12.

Equal legs

If both legs are 1, the hypotenuse is √2 ≈ 1.4142.

Invalid hypotenuse

A proposed hypotenuse of 4 with a known leg of 5 is invalid because the hypotenuse must be the longest side.

Ladder against a wall

A 3.6 m ladder stands 1 m from the wall. It reaches √(3.6² − 1²) = √11.96 ≈ 3.46 m up the wall.

Distance between two points

From (1, 2) to (7, 10): the horizontal change is 6 and the vertical change is 8, so the distance is √(36 + 64) = √100 = 10.

Check the result in context

Missing leg: with hypotenuse 13 and known leg 5, the other leg is √(169−25) = 12. Area = 5×12/2 = 30 square units; perimeter = 30 units.

Whole-number right triangles (Pythagorean triples)

abc
345
51213
81517
72425
202129
94041
6810
91215

16:9 screen sizes from the diagonal

Width = d × 16 ÷ √337 and height = d × 9 ÷ √337, because 16² + 9² = 337.

DiagonalWidthHeight
32"27.9" (70.8 cm)15.7" (39.8 cm)
43"37.5" (95.2 cm)21.1" (53.5 cm)
50"43.6" (110.7 cm)24.5" (62.3 cm)
55"47.9" (121.8 cm)27.0" (68.5 cm)
65"56.7" (143.9 cm)31.9" (80.9 cm)
75"65.4" (166.0 cm)36.8" (93.4 cm)

Frequently asked questions

What is the Pythagorean theorem?

For a right triangle, the squares of the two legs add to the square of the hypotenuse: a² + b² = c².

Which side is c?

c is the hypotenuse, the side opposite the right angle.

Can I use this for a non-right triangle?

No. The Pythagorean theorem in this form applies specifically to right triangles.

Why must the hypotenuse be longest?

Because c² equals the sum of two positive squared leg lengths, c must be greater than either individual leg.

Do all right triangles have whole-number sides?

No. Many right triangles have irrational side lengths, such as a triangle with legs 1 and 1 and hypotenuse √2.

How do I check a corner is square?

Measure 3 ft along one side and 4 ft along the other. If the diagonal is exactly 5 ft, the corner is 90°.

How do I find the diagonal of a rectangle?

Square the width and the height, add them and take the square root. A 30 × 40 cm rectangle has a 50 cm diagonal.

Does the Pythagorean theorem work in 3D?

Yes. The space diagonal of a box with sides a, b and c is √(a² + b² + c²).

Can I use a screen diagonal to find its width?

Only with its aspect ratio. For 16:9, width = diagonal × 16/√337 and height = diagonal × 9/√337. The diagonal alone cannot determine both dimensions.

Related tools

More math tools