CalcTray

Pythagorean Theorem Calculator

Enter any two sides — the calculator finds the third

Leave exactly one field blank — it will be solved automatically.

Embed this calculator

Add it to your website or blog

Embed this calculator

Paste this code into your website's HTML.

Optional: auto-resize iframe to fit content

Add this snippet to your page so the iframe height adjusts automatically after each calculation:

Pythagorean Theorem Calculator Formula

The Pythagorean theorem relates the three sides of a right triangle.

a² + b² = c²

a and b are the two legs of the right triangle, c is the hypotenuse (the side opposite the right angle).

Rearranged to solve for any unknown side.

c = √(a² + b²) a = √(c² − b²) b = √(c² − a²)

When solving for a leg, the hypotenuse must be longer than the other leg.

How to Use This Calculator

  1. Enter the values you know for two of the three sides (a, b, or c).
  2. Leave exactly one field blank — that is the side the calculator will solve for.
  3. Side c is always the hypotenuse (the longest side, opposite the right angle). Sides a and b are the two legs.
  4. Click Calculate to find the missing side plus area, perimeter, and all interior angles.
  5. Copy the URL to share your result — the link auto-fills the inputs and calculates on load.

Frequently Asked Questions

What is the Pythagorean theorem?

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (c) equals the sum of the squares of the other two sides (a and b): a² + b² = c². It is one of the most fundamental relationships in geometry.

Which side is the hypotenuse?

The hypotenuse is always the longest side of a right triangle and is the side opposite the 90° angle. In this calculator, it is labeled c.

What if the hypotenuse is shorter than a leg?

That is geometrically impossible — the hypotenuse must always be the longest side. The calculator will show an error if you enter a hypotenuse value that is not longer than the known leg.

Are the results exact?

Results are displayed with up to 4 decimal places. For the classic 3-4-5 triangle, all values are exact integers. For non-integer results, the displayed values are rounded for readability.

Does this calculator handle non-right triangles?

No. This calculator only works for right triangles (triangles with one 90° angle). For the area of any triangle given three sides, use our triangle area calculator, which uses Heron's formula.

What are Pythagorean triples?

Pythagorean triples are sets of three positive integers that satisfy a² + b² = c². Common examples include 3-4-5, 5-12-13, 8-15-17, and 7-24-25. Any multiple of a triple (e.g., 6-8-10) is also a valid triple.

Further Reading

Related Calculators