Skip to main content

Pythagorean Theorem Calculator with Converse and Steps

Calculate the hypotenuse or a leg of a right triangle with the Pythagorean theorem, test whether a triangle is right-angled with the converse and contrapositive, and get the step-by-step working: equation, squares, square root and conclusion.

  • Clipboard

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Result

-

Worked solution

  1. Enter two lengths to see the full worked solution.

Was this tool useful?

How does this tool work?

This calculator uses the Pythagorean theorem (Pythagoras’ theorem) to find the hypotenuse or a missing leg of a right triangle, and its converse to tell whether a triangle with three known sides is right-angled. Each answer comes with the working you would write in class: the equation a² + b² = c², the substituted values, the squares, the exact square root and a rounded value.

The Pythagorean theorem states: if triangle ABC has a right angle at A, the square of the hypotenuse equals the sum of the squares of the other two sides, BC² = AB² + AC². The hypotenuse BC is the side opposite the right angle and always the longest side; the other two sides are called the legs.

To find the hypotenuse, add the squares of the legs and take the square root: with AB = 3 and AC = 4, BC² = 9 + 16 = 25, so BC = √25 = 5. To find a leg, rearrange by subtracting: AB² = BC² − AC². When the square root is not a whole number, the calculator keeps the exact value (for example √52) and also gives an approximation to two decimal places.

The converse proves that a triangle is right-angled: if the square of the longest side equals the sum of the squares of the other two sides, the triangle has a right angle, located at the vertex opposite the longest side. The calculator finds the longest side for you before comparing.

The contrapositive proves the opposite: if the square of the longest side is not equal to the sum of the other two squares, the triangle is not a right triangle. Comparing c² with a² + b² also tells you more: if c² is smaller, every angle is acute; if it is larger, the angle opposite c is obtuse.

A complete written answer states the right angle, names the theorem, writes the equation with letters, substitutes the values, works out the squares and the square root, and ends with a sentence that includes the unit. For the converse, work out the square of the longest side and the sum of the other two squares separately, compare them, then quote the converse or the contrapositive.

How to use this tool

  1. Pick a mode

    Theorem to find a length in a right triangle; Converse to check whether a triangle is right-angled.

  2. Choose the side to find and the unit

    The hypotenuse BC or one of the legs, AB or AC; the fields adapt to your choice.

  3. Enter the known lengths

    Two lengths in Theorem mode, all three sides in Converse mode; the result updates as you type.

  4. Read and copy the solution

    Equation, squares, square root and conclusion are laid out as in a notebook; the button copies them as plain text.

Pythagorean theorem formulas

In a right triangle, a and b are the legs and c is the hypotenuse.

Hypotenuse

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

Add the squares of the legs, then take the square root.

Missing leg

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

Subtract the square of the other leg from the square of the hypotenuse.

Converse

c² = a² + b² ⇒ right triangle

Here c is the longest side; the right angle is at the vertex opposite c.

Contrapositive

c² ≠ a² + b² ⇒ not a right triangle

If the equation fails for the longest side, the triangle has no right angle.

a, b
legs, the two sides that form the right angle
c
hypotenuse, opposite the right angle and the longest side

Example: with a = 3 and b = 4, c = √(3² + 4²) = √25 = 5.

Use cases

Homework and exam practice

Check a hypotenuse calculation or a right-angle proof and compare your working with a complete solution.

DIY and construction

Square a corner with the 3-4-5 rule (3 ft, 4 ft, 5 ft or 60 cm, 80 cm, 1 m), or work out the length of a rafter, ramp or ladder.

Diagonals and distances

Find the diagonal of a screen, a room or any rectangle, or a straight-line distance on a grid.

Exact values and rounding

Practise keeping an exact square root and giving a correctly rounded approximation.

Examples

Find the hypotenuse

BC² = 3² + 4² = 9 + 16 = 25, so BC = √25 = 5 cm.

Input

AB = 3 cm, AC = 4 cm

Result

BC = 5 cm

Hypotenuse that is not a whole number

BC² = 16 + 36 = 52; √52 is not a whole number, so it is rounded to 7.21 cm.

Input

AB = 4 cm, AC = 6 cm

Result

BC = √52 ≈ 7.21 cm

Find a leg

AB² = BC² − AC² = 169 − 25 = 144, so AB = √144 = 12 cm.

Input

BC = 13 cm, AC = 5 cm

Result

AB = 12 cm

How high a ladder reaches

h² = 5² − 1.4² = 25 − 1.96 = 23.04, so h = √23.04 = 4.8 m.

Input

5 m ladder, foot 1.4 m from the wall

Result

height = 4.8 m

Diagonal of a rectangle

d² = 1.44 + 0.25 = 1.69, so d = √1.69 = 1.3 m.

Input

sides of 1.2 m and 0.5 m

Result

diagonal = 1.3 m

Converse: right triangle

BC² = 100 and AB² + AC² = 36 + 64 = 100, so the equation holds.

Input

AB = 6, AC = 8, BC = 10

Result

right angle at A

Contrapositive: not a right triangle

8² = 64 but 5² + 6² = 25 + 36 = 61, and 64 ≠ 61.

Input

sides of 5, 6 and 8

Result

not a right triangle

Tips and best practices

  • Spot the hypotenuse first: it is opposite the right angle and is the longest side. It stands alone on one side of BC² = AB² + AC².
  • To find a leg, subtract: AB² = BC² − AC². Adding the squares instead is the most common mistake.
  • Do not forget the final square root: BC² = 25 means BC = 5, not 25.
  • Keep the exact value (√52) until the end and round only at the last step, to the accuracy you are asked for.
  • For the converse, compare the square of the longest side with the sum of the other two squares, never an arbitrary side.
  • Use one unit throughout: convert centimetres and metres (or inches and feet) before squaring.

Sources and references

Frequently asked questions

When can I use the Pythagorean theorem?

Only in a right triangle, when you know two sides and need the third. If the triangle has no right angle, the equation does not apply and you need other tools, such as trigonometry or the law of cosines.

How do I find the hypotenuse?

Add the squares of the two legs and take the square root: c = √(a² + b²). For legs of 6 and 8 cm, √(36 + 64) = √100 = 10 cm.

How do I 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²). With c = 13 and b = 5, √(169 − 25) = √144 = 12.

What are the converse and the contrapositive?

The theorem starts from a right triangle to find a length. The converse starts from c² = a² + b², with c the longest side, to prove that a triangle is right-angled. The contrapositive starts from c² ≠ a² + b² to prove that it is not.

Why does the calculator show a square root and a decimal?

When the result is not a perfect square, the exact length is written with a square root, such as √52. The calculator keeps it and also gives the rounded value, 7.21, which is what you need for a real measurement.

What are Pythagorean triples?

Sets of three whole numbers that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13. Any multiple of a triple is also a triple (6, 8, 10), which is why builders use the 3-4-5 rule to set out a right angle.

Does the theorem work in three dimensions?

Yes, by applying it twice. The space diagonal of a box with sides a, b and c is √(a² + b² + c²): first find the diagonal of the base, then use it as a leg of a second right triangle.

Is my data sent to a server?

No. The calculations and the worked solution run entirely in your browser, with no account and no data sent anywhere.

Related tools

Tools similar or complementary to this one.

Similar tools

Add up the three sides of a triangle, or find the third side with the law of cosines from two sides and the included angle.

Mathematics & calculationUse this tool