TR

Home / Guides / How to Calculate the Pythagorean Theorem: Formula and Examples

How to Calculate the Pythagorean Theorem: Formula and Examples

Updated: October 31, 2026 · AracMerkezi

▶ Open Pythagorean Theorem (Hypotenuse) Calculator

The Pythagorean theorem is the best-known rule in geometry for the sides of a right triangle. It says that the squares of the two sides that form the right angle (the legs) add up to the square of the longest side opposite the right angle, the hypotenuse. In this guide we explain what the formula means, how to find the hypotenuse and a missing leg step by step, how to work out area, perimeter and angles, and what Pythagorean triples such as 3-4-5 are, all with numerical examples. To try your own numbers, you can use the Pythagorean Theorem (Hypotenuse) Calculator.

Formula and notation

In a right triangle the legs are called a and b, and the hypotenuse is called c. The theorem is written as:

a² + b² = c²

Two useful forms follow from it:

The hypotenuse is always the longest side. That is why, when you look for a missing leg, the hypotenuse you use cannot be smaller than or equal to the leg you already know. Otherwise the number under the root would be negative or zero, and no such right triangle exists.

Finding the hypotenuse step by step

  1. Identify the right angle; the two sides that form it are a and b.
  2. Square each of the two sides.
  3. Add the squares.
  4. Take the square root of the sum; that is the hypotenuse.
  5. Do not forget the unit (cm, m, inches, and so on).

Example 1: Let a = 6 cm and b = 8 cm. The squares are 36 and 64, the sum is 100, and the square root is 10. The hypotenuse is c = 10 cm. The area of the triangle is 6 × 8 ÷ 2 = 24 cm², and the perimeter is 6 + 8 + 10 = 24 cm.

Example 2: Let a = 5 m and b = 7 m. The squares are 25 and 49, and the sum is 74. Since √74 is about 8.6023, c ≈ 8.6023 m. The result is not a whole number here, and that is normal, because not every square root comes out even. The area is 17.5 m² and the perimeter is about 20.6023 m.

Finding a missing leg

If you know the hypotenuse and one leg, you find the missing leg by subtraction.

Example 3: Let a = 5 m and c = 13 m. Since c² = 169 and a² = 25, b² = 169 − 25 = 144 and b = 12 m. The sides of the triangle are 5-12-13; the area is 5 × 12 ÷ 2 = 30 m² and the perimeter is 30 m.

Example 4: If c = 10 cm and a = 6 cm, then b² = 100 − 36 = 64 and b = 8 cm. This is the reverse of the first example; you get consistent results in both directions.

Area, perimeter, height and angles

Because the legs are perpendicular to each other, the area formula is simple: Area = a × b ÷ 2. The perimeter is the sum of the three sides. The height onto the hypotenuse is found by dividing twice the area by the hypotenuse: h = a × b ÷ c. In the 6-8-10 triangle, h = 48 ÷ 10 = 4.8 cm.

The two acute angles are found with trigonometry. For the angle opposite side a, tan A = a ÷ b, so A = arctan(a ÷ b). In the 6-8-10 triangle, A = arctan(6 ÷ 8) ≈ 36.87° and the other angle is B = 90° − 36.87° ≈ 53.13°. In the 5-7 triangle, A ≈ 35.54° and B ≈ 54.46°. The three angles always add up to 180°.

Pythagorean triples

Right triangles whose three sides are all positive whole numbers are called Pythagorean triples. The best-known ones are in the table:

Triple (a-b-c)CheckNote
3-4-59 + 16 = 25Smallest primitive triple
5-12-1325 + 144 = 169Primitive triple
8-15-1764 + 225 = 289Primitive triple
7-24-2549 + 576 = 625Primitive triple
20-21-29400 + 441 = 841Primitive triple
6-8-1036 + 64 = 1002 times 3-4-5

If you multiply every side of a triple by the same positive whole number, you get a new triple; 6-8-10, 9-12-15 and 30-40-50 are derived from 3-4-5. To generate all triples, Euclid's method is used: for positive whole numbers m > n, a = m² − n², b = 2mn, c = m² + n². With m = 2, n = 1 you get 3-4-5; with m = 3, n = 2 you get 5-12-13; with m = 4, n = 3 you get 7-24-25.

The converse: is it a right triangle?

The theorem works in reverse too. If you know the three side lengths, compare the square of the longest with the sum of the squares of the other two:

This comparison only makes sense if the three lengths really form a triangle, that is, the longest side must be shorter than the sum of the other two.

Common mistakes

Note on currency of information

The Pythagorean theorem is a universal mathematical rule and does not change from year to year. This guide was prepared on October 31, 2026. For critical work such as engineering, construction or exams, verify the results separately; the tool is for information only.

Summary

In a right triangle, the rule a² + b² = c² lets you find the third side when you know two. Take the square root of the sum of the squares for the hypotenuse, and of the difference of the squares for a missing leg. In the 6-8-10 example the hypotenuse came out as 10 cm, the area as 24 cm² and the angles as about 36.87° and 53.13°. For quick calculations you can use the Pythagorean Theorem (Hypotenuse) Calculator, and for area and volume calculations the geometric shapes tool.

Frequently asked questions

What is the Pythagorean theorem formula?

In a right triangle, a² + b² = c² holds, where a and b are the legs and c is the hypotenuse. The hypotenuse is c = √(a² + b²), and a missing leg is b = √(c² − a²). For example, for 6 and 8, c = √100 = 10.

What is a Pythagorean triple?

A right triangle whose three sides are all positive whole numbers is called a Pythagorean triple. 3-4-5, 5-12-13, 8-15-17 and 7-24-25 are primitive triples; multiples such as 6-8-10 are triples too.

Why is the hypotenuse the longest side?

Because c² = a² + b², c² is always larger than both a² and b², so c is longer than either leg. That is why, in a missing-leg calculation, the hypotenuse must be larger than the leg you know.

Tools mentioned in this guide

More guides

This article is for general information only and is not legal, financial or medical advice. We are not an official institution.