Pythagorean Theorem Calculator

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

Missing side
Adjust the inputs

Your result updates live as you type.

Pythagoras theorem states that in a right triangle the square on the hypotenuse equals the sum of the squares on the other two sides. It is the foundation of all distance measurement, from setting out a building to computing the length of a vector, and it holds only for right triangles.

The theorem works in both directions. Given two legs you square, add and take the root to find the hypotenuse; given the hypotenuse and one leg you subtract instead. The converse is equally useful on site: if a triangle measures 3, 4 and 5 in any units, the angle between the two shorter sides is exactly 90 degrees, which is how builders square a corner without an instrument.

Below the calculator sits the right triangles and their properties table: 9 rows — 3 at one end, 1 at the other — which is usually faster than entering a value you have seen before. Nothing has to be entered to see it work: the default for known side a is 3, and the output recomputes the moment that changes. The 4 bands (short side at one end, very long side at the other) exist to answer the question a number on its own cannot: is this high, low or ordinary? Most visitors arrive here from, or leave for, Distance Between Two Points Calculator and Capsule Volume Calculator.

The formula

a2 + b2 = c2
a, b
The two legs, meeting at the right angle
c
The hypotenuse, always the longest side
Triple
Three whole numbers that satisfy the equation exactly

How it works, step by step

  1. Choose whether you are solving for the hypotenuse or a leg.
  2. Enter the two sides you already know.
  3. The gauge shows the missing side.
  4. Area, perimeter and both acute angles appear below.

Worked examples

Legs of 3 and 4

9 + 16 = 25, so the hypotenuse is exactly 5. The area is 6 and the acute angles are 36.87 and 53.13 degrees.

A missing leg

With a hypotenuse of 13 and one leg of 5, the other leg is the root of 169 − 25 = 144, which is exactly 12. That makes 5-12-13 another Pythagorean triple.

Checking the 8 row

The reference table lists Leg a = 8, giving Leg b: 15, Hypotenuse: 17.0000, Area: 60, Smaller acute angle: 28.07 deg. Entering that above should reproduce the same figures — if it does not, the input is being read differently to the way the table assumes.

How to read your score

0–5Short sideA small triangle.
5–15Moderate sideThe everyday range for practical layout work.
15–50Long sideA large triangle.
50–—Very long sideSurvey scale.

Frequently asked questions

Does the theorem work for any triangle?

No, only right-angled ones. For other triangles you need the law of cosines, which adds a correction term involving the angle.

What is a Pythagorean triple?

Three whole numbers that satisfy the equation exactly, such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25. There are infinitely many, and all can be generated from two integers.

How do builders use this to square a corner?

By the 3-4-5 method. Measure three units along one wall and four along the other; if the diagonal between the marks is exactly five, the corner is square.

Does it extend to three dimensions?

Yes. The space diagonal of a box is the square root of the sum of three squares, which is Pythagoras applied twice.

What do the bands under the missing side mean?

They label the figure so it can be read without a reference point of your own: Short side from 0 to 5; Moderate side from 5 to 15; Long side from 15 to 50; Very long side from 50 upwards. The band is a reading aid only — the number itself is exact, and a value sitting just over a boundary is not meaningfully different from one just under it.

What formula does the Pythagorean Theorem Calculator use?

It computes a^2 + b^2 = c^2, where a, b is the two legs, meeting at the right angle; c is the hypotenuse, always the longest side; Triple is three whole numbers that satisfy the equation exactly. The same expression is printed on the page above the inputs, so the result can be reproduced by hand or in a spreadsheet.

Pythagorean triples and near misses

Right triangles and their properties
Leg aLeg bHypotenuseAreaSmaller acute angle
345.0000636.87 deg
51213.00003022.62 deg
6810.00002436.87 deg
72425.00008416.26 deg
81517.00006028.07 deg
94041.000018012.68 deg
202129.000021043.60 deg
557.071112.545.00 deg
122.2361126.57 deg

The last two rows are not triples, so their hypotenuses are irrational.

Related calculators