Pythagorean Theorem Calculator (a² + b² = c²)

Know two sides of a right triangle? Get the third — plus angles, area and perimeter.

Enter your numbers

Results

How this calculator works

In a right triangle, the square on the hypotenuse (the side opposite the right angle) equals the sum of the squares on the other two sides: a² + b² = c². To find the hypotenuse, add the squares of the legs and take the square root. To find a leg, subtract the square of the other leg from the square of the hypotenuse and take the square root.

Builders use the same rule to check a corner is square: measure 3 ft along one side and 4 ft along the other — the diagonal should be exactly 5 ft (or 6-8-10, 9-12-15 for bigger layouts).

c = √(a² + b²) a = √(c² − b²) b = √(c² − a²) Angle A = tan⁻¹(a ÷ b), Angle B = 90° − A Area = a × b ÷ 2

Assumptions and tips

  • The triangle must have a 90° angle; for other triangles use the law of cosines.
  • Use the same unit for every side.

Worked example

Using the default values in the calculator above:

InputValue
FindHypotenuse c (know a and b)
Leg a3
Leg b4

ResultValue
Hypotenuse c5
Angle A (opposite a)36.8699 °
Angle B (opposite b)53.1301 °
Area6 sq units
Perimeter12 units
Sidesa = 3, b = 4, c = 5

Step by step:

  1. c² = a² + b² = 9 + 16 = 25
  2. c = √25 = 5

Pythagorean triples (whole-number right triangles)

Useful for squaring corners on the job — any multiple works too (6-8-10, 9-12-15).

Legs a, bHypotenuse cAngle A
3, 4536.8699 °
5, 121322.6199 °
8, 151728.0725 °
7, 242516.2602 °
20, 212943.6028 °
9, 404112.6804 °
6, 81036.8699 °
12, 162036.8699 °
1, 11.41421445 °

Common mistakes to avoid

  • Using the formula on a triangle without a right angle.
  • Adding the sides before squaring: (3 + 4)² is not 3² + 4².
  • Treating the longest side as a leg when solving for a missing side.

Frequently asked questions

What is the hypotenuse of a 3-4-5 triangle?

5: √(3² + 4²) = √25 = 5.

How do I find a missing leg?

Subtract: b = √(c² − a²). For c = 13 and a = 5, b = √(169 − 25) = 12.

How do I check if a corner is square?

Use the 3-4-5 rule: mark 3 and 4 units along the two sides; if the diagonal is 5 units, the corner is 90°.

How long is the diagonal of a 10 × 12 room?

√(100 + 144) = 15.62 ft.

Sources

Anirban KunduBuilt and reviewed by Anirban Kundu, Creator & Editor · M.Sc Physics, 20 years teaching science

Last reviewed: 2026-11-05 · Editorial policy · How we build and check calculators