Pythagorean Theorem Calculator

Enter two sides of a right-angled triangle and this calculator finds the third using Pythagoras’ theorem, showing the full working plus the triangle’s area and perimeter.

Your right-angled triangle

What would you like to find?

Pythagoras’ theorem applies only to right-angled triangles.

Enter the lengths of the two shorter sides.

Hypotenuse (c)
5

The longest side, opposite the right angle

Formula: c = √(a² + b²)

Side a
3
Side b
4
Area
6 square units
Perimeter
12 units
How the hypotenuse is worked out
StepValue
Pythagoras’ theorema² + b² = c²
Known side a3
Known side b4
Substitute the values3² + 4² = c²
Square each side9 + 16 = c²
Add the squares25 = c²
Square rootc = √25
Hypotenusec = 5

How to use this calculator

  1. Choose what to find — Hypotenuse when you know both shorter sides, or Shorter side when you know the hypotenuse and one shorter side. Only the two inputs that mode needs are shown.
  2. Enter the two known lengths, using the same unit for both.
  3. Read the result: the missing side is the large figure, with the triangle’s area and perimeter beside it and the full working in the calculation table.

Pythagoras’ theorem applies only to right-angled triangles, and the hypotenuse must always be the longest side. The calculation runs in the page as you type — nothing is sent to a server.

How Pythagoras’ theorem is calculated

In a right-angled triangle, the square of the hypotenuse equals the sum of the squares of the other two sides.

a² + b² = c²
  • a and b — the two shorter sides, called the legs (interchangeable)
  • c — the hypotenuse, the longest side, opposite the right angle

The same relationship rearranges to solve for whichever side is missing:

c = √(a² + b²)
  • Find a shorter side: a = √(c² − b²)
  • Area of the triangle: (a × b) ÷ 2
  • Perimeter of the triangle: a + b + c

Results are shown to at most six decimal places with trailing zeroes removed, so an exact answer reads 5 and an irrational one reads 1.414214. No intermediate value is rounded before the final figure is formatted.

Worked example: finding the hypotenuse

A right-angled triangle has shorter sides of 3 and 4. The hypotenuse is:

Finding the hypotenuse of a 3, 4 right-angled triangle
StepValue
Pythagoras’ theorema² + b² = c²
Known side a3
Known side b4
Substitute the values3² + 4² = c²
Square each side9 + 16 = c²
Add the squares25 = c²
Square rootc = √25
Hypotenusec = 5

The area is (3 × 4) ÷ 2 = 6 square units and the perimeter is 3 + 4 + 5 = 12 units.

Worked example: finding a shorter side

A right-angled triangle has a hypotenuse of 10 and one shorter side of 6. The missing shorter side is:

Finding a shorter side from a hypotenuse of 10 and a shorter side of 6
StepValue
Pythagoras’ theorema² + b² = c²
Known hypotenusec = 10
Known shorter sideb = 6
Rearrange the formulaa² = c² − b²
Substitute the valuesa² = 10² − 6²
Square each sidea² = 100 − 36
Subtract the squaresa² = 64
Square roota = √64
Missing shorter sidea = 8

Common right-angled triangles

A Pythagorean triple is three whole numbers that satisfy a² + b² = c² exactly. Most right-angled triangles do not have whole-number sides.

Example right-angled triangles and their hypotenuse
Side aSide bHypotenuse c
345
51213
81517
72425
11≈ 1.414214

When Pythagoras’ theorem applies

Pythagoras’ theorem works only for right-angled triangles — those with one 90° angle. The hypotenuse is always the longest side and always sits opposite the right angle. For a triangle with no right angle, use the law of cosines instead. This calculator does not check angles, so enter lengths you know belong to a right-angled triangle.

Frequently asked questions

How do I use Pythagoras’ theorem to find a missing side?

Square the two sides you know. To find the hypotenuse, add the squares and take the square root: c = √(a² + b²). To find a shorter side, subtract the smaller square from the hypotenuse squared and take the square root: a = √(c² − b²). For a = 3 and b = 4, c = √(9 + 16) = √25 = 5.

Which side is the hypotenuse?

The hypotenuse is the side opposite the right angle, and it is always the longest side of a right-angled triangle. In the formula a² + b² = c² it is c. The other two sides, a and b, are called the legs and are interchangeable.

Does Pythagoras’ theorem work for any triangle?

No. It only applies to right-angled triangles — triangles with one 90° angle. For triangles without a right angle you need the law of cosines instead. If a² + b² does not equal c² for the three sides, the triangle is not right-angled.

What units does this calculator use?

Any unit you like, as long as you use the same one for both known lengths. Enter centimetres, metres, inches or feet — the calculator never converts between units. The missing side comes out in that same unit, the area in square units and the perimeter in units.

Why must the hypotenuse be longer than the other sides?

When you know the hypotenuse and one shorter side, the missing side is √(c² − b²). If the hypotenuse equalled the shorter side the answer would be zero, and if it were shorter the value under the square root would be negative, which has no real answer. So the calculator needs c to be strictly greater than b.

How are the area and perimeter worked out?

The area of a right-angled triangle is half the product of its two shorter sides: (a × b) ÷ 2. The perimeter is the sum of all three sides: a + b + c. Both are shown once all three sides are known.

What is a Pythagorean triple?

A Pythagorean triple is a set of three whole numbers that fit a² + b² = c² exactly, such as 3-4-5, 5-12-13 and 8-15-17. Most right-angled triangles do not have whole-number sides — a triangle with legs of 1 and 1 has a hypotenuse of √2 ≈ 1.414214.