SciCalc.net
IndiaFree tools

Pythagorean theorem calculator

Choose what to find, type the two sides you know, and get the third side exactly (for example √50 = 5√2) and as a decimal.

Last updated

√32 + 42 =

5

Working

  1. 132 = 9
  2. 242 = 16
  3. 332 + 42 = 25
Try:

How it works

In a right-angled triangle the two shorter sides (the legs a and b) and the longest side opposite the right angle (the hypotenuse c) are linked by a² + b² = c².

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

It only works for right-angled triangles. For other triangles use the cosine rule.

Worked example

A TV screen is 6 units wide and 8 high. How long is the diagonal? c = √(6² + 8²) = √100 = 10. A 13 m ladder has its foot 5 m from the wall. How high does it reach? b = √(13² − 5²) = √144 = 12 m.

Pythagorean triples

Some right triangles have whole-number sides. These sets are called Pythagorean triples, and they are worth knowing because exam questions often use them:

abcCheck
3459 + 16 = 25
5121325 + 144 = 169
8151764 + 225 = 289
7242549 + 576 = 625
202129400 + 441 = 841

Any multiple of a triple is also a triple: 6, 8, 10 and 30, 40, 50 come from 3, 4, 5.

Distance between two points

The distance formula is the Pythagorean theorem on a grid. The horizontal and vertical gaps are the legs:

d = √((x₂ − x₁)² + (y₂ − y₁)²)

From (1, 2) to (7, 10): the gaps are 6 and 8, so d = √(36 + 64) = √100 = 10.

Is the triangle right-angled?

Compare a² + b² with c², where c is the longest side. Equal means a right angle; if a² + b² is smaller, the angle opposite c is obtuse; if larger, it is acute. For sides 7, 9 and 12: 49 + 81 = 130, which is less than 144, so the triangle has an obtuse angle.

Common mistakes

  • Adding the sides before squaring: for legs 6 and 8, c is √(36 + 64) = 10, not 6 + 8 = 14.
  • Adding instead of subtracting when the hypotenuse is known: a leg is √(c² − a²).
  • Using the theorem on a triangle that has no right angle; use the cosine rule there.

Tips

  • The hypotenuse is always the longest side. If you get a leg longer than c, the numbers have been swapped.
  • Common whole-number triples: 3-4-5, 5-12-13, 8-15-17, 7-24-25.
  • Square the sides, add or subtract, and only then take the square root.

Questions

Does it work for any triangle?

No, only right-angled ones. For any other triangle, use the cosine rule c² = a² + b² − 2ab cos C.

What is the hypotenuse of a 5 by 5 right triangle?

√50 = 5√2 ≈ 7.071067812.

How do I find a leg instead of the hypotenuse?

Subtract: b = √(c² − a²).

What are Pythagorean triples?

Sets of three whole numbers that fit a² + b² = c², such as 3, 4, 5 and 5, 12, 13. Multiplying a triple by any whole number gives another one.

How do I find the distance between two points?

Subtract the x-values and the y-values, square both gaps, add them and take the square root. From (1, 2) to (7, 10) that is √(6² + 8²) = 10.

Is a triangle with sides 7, 9 and 12 right-angled?

No. 7² + 9² = 130, but 12² = 144. Because 130 is less than 144, the largest angle is obtuse.

Sources

  1. NIST Digital Library of Mathematical Functions, §4.42 Solution of Triangles. Figure 4.42.1 (right angle at C, hypotenuse c); Eq. 4.42.5 cosine rule c² = a² + b² − 2ab cos C, which gives a² + b² = c² when C = 90° and decides acute or obtuse otherwise. Checked 22 November 2026.
  2. NIST Digital Library of Mathematical Functions, §1.9 Calculus of a Complex Variable. Eq. 1.9.4 r = (x² + y²)^½ and Eq. 1.9.14 z₁ − z₂ = x₁ − x₂ + i(y₁ − y₂): the distance between two points. Checked 22 November 2026.
  3. Euclid’s Elements (primary-source edition, ed. David E. Joyce, Clark University), Book I, Proposition 47. Primary-source edition: in right-angled triangles the square on the side opposite the right angle equals the sum of the squares on the other two sides. Checked 22 November 2026.
  4. Euclid’s Elements (primary-source edition, ed. David E. Joyce, Clark University), Book I, Proposition 48. Primary-source edition: the converse; if the square on one side equals the sum of the squares on the other two, the angle between them is right. Checked 22 November 2026.
  5. Euclid’s Elements (primary-source edition, ed. David E. Joyce, Clark University), Book II, Proposition 12. Primary-source edition: in an obtuse-angled triangle the square on the side opposite the obtuse angle is greater than the sum of the other two squares (Proposition 13 gives the acute case). Checked 22 November 2026.