Pythagorean Theorem Calculator

Find the hypotenuse or a missing leg of a right triangle.

Quick answer

  • Formula: c = √(a² + b²) for the hypotenuse; leg = √(c² − b²) for a missing leg
  • Worked example — Solved side: 5.0000 (full example below).

Pythagorean Theorem Calculator

Worked example result
Solved side5.0000
Perimeter12.0000
Area6.0000

The classic 3-4-5 triangle: legs of 3 and 4 give a hypotenuse of exactly 5, a perimeter of 12 and an area of 6.

The Pythagorean theorem is the most famous formula in geometry: in a right-angled triangle, the square of the hypotenuse equals the sum of the squares of the other two sides, a² + b² = c².

Use it in two modes. To find the hypotenuse, enter the two legs. To find a missing leg, enter the hypotenuse as the first value and the known leg as the second — the calculator checks the hypotenuse really is the longest side. The perimeter and area of the triangle are shown too.

The formula

c = √(a² + b²) for the hypotenuse; leg = √(c² − b²) for a missing leg

Worked example

The classic 3-4-5 triangle: legs of 3 and 4 give a hypotenuse of exactly 5, a perimeter of 12 and an area of 6.

The example is pre-loaded in the result panel — press Calculate with your own numbers to replace it.

Frequently asked questions

Which side is the hypotenuse?

The side opposite the right angle, and always the longest side of the triangle. If your 'hypotenuse' is shorter than a leg you entered, the values are inconsistent and the calculator tells you.

Where is the Pythagorean theorem used outside school?

Anywhere a straight-line distance crosses a grid: screen sizes (a 55-inch TV is measured diagonally), construction squaring (the 3-4-5 rule for right-angle corners), navigation and ladder safety.

Does it work for non-right triangles?

No — the theorem holds only when one angle is exactly 90°. For other triangles, the law of cosines generalizes it with an extra term involving the angle.

Category: Math calculators

Sources & methodology

This calculator applies the formula shown on this page exactly as written, using the standard definitions for its inputs. Results are computed from the values you enter — no data is stored — and are rounded only for display.

Content last reviewed by CalcHub Editorial.

Embed this calculator on your site

Free to use with attribution — paste the snippet below and the calculator appears on your page, with a link back to CalcHub.

<iframe src="https://calculator-site-57a.pages.dev/embed/pythagorean-calculator" width="100%" height="640" style="border:1px solid #d9e2ea;border-radius:12px" loading="lazy" title="Pythagorean Theorem Calculator — CalcHub"></iframe>

Open the embed version →