Pythagorean Theorem Calculator

Use this browser-only tool to calculate a mathematical result from the displayed inputs.

Enter values

Result—

Enter valid values.

Formula and method

For a right-angled triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c², so c = √(a² + b²).

a and b are the two perpendicular sides (the legs). c is the hypotenuse, the side opposite the 90° angle and the longest side.

Worked examples

Example 1 — the 3–4–5 triangle

Let a = 3 cm and b = 4 cm. Then c = √(3² + 4²) = √(9 + 16) = √25 = 5 cm. Check: 3² + 4² = 5², or 9 + 16 = 25.

Example 2 — a 5–12–13 triangle

Let a = 5 m and b = 12 m. Then c = √(5² + 12²) = √(25 + 144) = √169 = 13 m.

How to use this calculator

  1. Confirm that the angle between the measured sides is 90°.
  2. Measure both legs from the same triangle and convert them to the same length unit.
  3. Enter the two positive lengths in Leg a and Leg b.
  4. Read the hypotenuse result in the same unit as the inputs. Default values 3 and 4 reproduce the first example.
  5. For schoolwork, show both squares, their sum and the square root.

Assumptions and limitations

Related learning and reference

OpenStax explains the right-triangle relationship in Contemporary Mathematics, Section 10.8: Right Triangle Trigonometry.