a² + b² = c² · With steps & diagram

Pythagorean Theorem Calculator

Use this free Pythagorean theorem calculator to find the hypotenuse or a missing leg of any right triangle. You get the exact answer in simplified radical form, a live triangle diagram, the angles, and every step of the working.

  • Hypotenuse or leg
  • Exact radical answers
  • Live triangle diagram
  • Right triangle checker
  • Step-by-step working

Solve a right triangle

Solve for

Try a classic triangle

Hypotenuse

c = 2√13

≈ 7.211 cm

Diagram of the triangle with its sides and angles
Area
12 cm²
Perimeter
17.211 cm
Angle A
33.69°
Angle B
56.31°
Height to c
3.328 cm
Triangle type
Right triangle

Step-by-step solution

  1. a² + b² = c² (Pythagorean theorem)
  2. c = √(a² + b²)
  3. c = √(4² + 6²)
  4. c = √(16 + 36)
  5. c = √52
  6. c = 2√13 ≈ 7.211

Features

Why this Pythagorean theorem calculator is different

Most tools stop at a long decimal. This one shows the exact answer, draws the triangle to scale and explains every step, so you can learn from it as well as use it.

Exact radical answers

See results like 5√2 as well as 7.071. That is the form teachers and textbooks ask for.

Live, to-scale diagram

The triangle redraws as you type, with every side and angle labelled, so you can see the shape instantly.

Full working shown

Every step appears in order: formula, substitution, squares, sum and square root. It is ideal for homework checks.

Right triangle checker

Enter three sides and find out whether they form a right, acute or obtuse triangle, or no triangle at all.

Angles, area and more

Get both acute angles, the area, the perimeter and the height to the hypotenuse with no extra work.

Copy and share

Copy the full worked solution into your notes, or share a link that reopens the calculator with your numbers.

How it works

How to use the Pythagorean theorem calculator

You only need two sides of a right triangle. Follow these four steps.

  1. Choose what to solve

    Pick the hypotenuse c, or leg a or b if the hypotenuse is already known.

  2. Enter two sides

    Type the two lengths you know. The answer and diagram update as you type.

  3. Set units and decimals

    Choose a unit such as cm or ft, and how many decimal places to show.

  4. Read the working

    Check the exact answer, the angles and each step, then copy or share it.

The formula

What is the Pythagorean theorem?

In any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. The hypotenuse c is always the longest side, opposite the 90° angle. Legs a and b form the right angle.

The formula and its rearranged forms

Theorem:a² + b² = c²
Find hypotenuse:c = √(a² + b²)
Find leg a:a = √(c² − b²)
Find leg b:b = √(c² − a²)
Example 1

Find the hypotenuse

The legs are 6 and 8.

c = √(6² + 8²)
c = √(36 + 64) = √100 = 10

So the hypotenuse is exactly 10.

Example 2

Find a missing leg

The hypotenuse is 13 and one leg is 5.

b = √(13² − 5²)
b = √(169 − 25) = √144 = 12

So the missing leg is 12.

Example 3

An irrational answer

Both legs are 5.

c = √(5² + 5²) = √50
c = 5√2 ≈ 7.071

Here the exact answer is 5√2, because 50 = 25 × 2.

Reference

Common Pythagorean triples

A Pythagorean triple is a set of three whole numbers that fit a² + b² = c² exactly. These are the ones you will see most often.

Primitive Pythagorean triples
abcCheck
3459 + 16 = 25
5121325 + 144 = 169
8151764 + 225 = 289
7242549 + 576 = 625
202129400 + 441 = 841
123537144 + 1225 = 1369
9404181 + 1600 = 1681
116061121 + 3600 = 3721
  • Multiples work too. Multiply any triple by the same number and you get another one, so 6-8-10 and 9-12-15 both come from 3-4-5.
  • The 3, 4, 5 pattern. In every triple, one leg is divisible by 3, one leg is divisible by 4, and one side is divisible by 5.
  • The hypotenuse is longest. If a result makes a leg longer than the hypotenuse, a value was entered in the wrong box.
  • The converse is useful. If a² + b² = c² for three sides, the triangle must contain a right angle. The Check tab tests this for you.
Benefits

Real-world uses of the Pythagorean theorem

This simple rule solves everyday problems in building, design and travel. Here is where it saves you time.

Square corners

Builders mark 3 ft and 4 ft along two walls. If the diagonal measures 5 ft, the corner is a true 90°.

Screen sizes

A TV or monitor is sold by its diagonal. Use the width and height to confirm the real screen size.

Ladders and ramps

Work out how long a ladder or ramp must be to reach a set height from a safe distance.

Straight-line distance

Find the direct distance between two points on a map or a graph. It is the basis of the distance formula.

FAQ

Pythagorean theorem calculator FAQs

Clear answers to the questions students and DIYers ask most.

What is the Pythagorean theorem?

It states that in a right triangle, a² + b² = c². Here a and b are the two legs that form the right angle, and c is the hypotenuse, the side opposite the right angle.

How do you find the hypotenuse?

Square both legs, add them and take the square root: c = √(a² + b²). For example, legs of 3 and 4 give c = √(9 + 16) = √25 = 5.

How do you find a missing leg?

Subtract the square of the known leg from the square of the hypotenuse, then take the square root: a = √(c² − b²). For example, c = 13 and b = 5 give a = √144 = 12.

Does the Pythagorean theorem work for all triangles?

No. It only works for right triangles. For other triangles, use the law of cosines, or try our triangle calculator, which solves any triangle.

What is a Pythagorean triple?

It is a set of three whole numbers that satisfy a² + b² = c². The best known is 3, 4, 5. Others include 5, 12, 13 and 8, 15, 17.

How can I tell if a triangle is a right triangle?

Let c be the longest side. If a² + b² equals c², the triangle is right. If it is greater, the triangle is acute. If it is smaller, the triangle is obtuse. The Check tab does this for you.

Can a leg be longer than the hypotenuse?

No. The hypotenuse is always the longest side of a right triangle. So when you solve for a leg, the hypotenuse you enter must be longer than the other leg.

Who discovered the Pythagorean theorem?

It is named after the Greek mathematician Pythagoras, who lived around 500 BC. However, Babylonian mathematicians recorded Pythagorean triples more than a thousand years earlier.

Solve any right triangle in seconds

From homework to home projects, this Pythagorean theorem calculator gives you the exact answer, a clear diagram and the full working. Try it with your own numbers, then explore our other geometry tools.

Open the calculator

Results are rounded to your chosen decimal places. Exact radical forms are shown when the value under the square root is a whole number.

Scroll to Top