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:
- Hypotenuse: c = √(a² + b²)
- Missing leg: b = √(c² − a²) (or a = √(c² − b²))
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
- Identify the right angle; the two sides that form it are a and b.
- Square each of the two sides.
- Add the squares.
- Take the square root of the sum; that is the hypotenuse.
- 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) | Check | Note |
|---|---|---|
| 3-4-5 | 9 + 16 = 25 | Smallest primitive triple |
| 5-12-13 | 25 + 144 = 169 | Primitive triple |
| 8-15-17 | 64 + 225 = 289 | Primitive triple |
| 7-24-25 | 49 + 576 = 625 | Primitive triple |
| 20-21-29 | 400 + 441 = 841 | Primitive triple |
| 6-8-10 | 36 + 64 = 100 | 2 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:
- If they are equal, the triangle is right-angled. Example: for 7-24-25, 49 + 576 = 625.
- If the sum is larger, the triangle is acute. Example: for 4-5-6, 16 + 25 = 41 > 36.
- If the sum is smaller, the triangle is obtuse. Example: for 4-5-7, 16 + 25 = 41 < 49.
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
- Forgetting the square root: a² + b² gives c², not c. Do not take 36 + 64 = 100 as the hypotenuse; the answer is 10.
- Picking the wrong hypotenuse: The hypotenuse is the side opposite the right angle, and it is always the longest.
- Adding instead of subtracting: To find a missing leg you take c² − a²; you do not add.
- Mixing units: If you enter one side in cm and the other in m, the result is meaningless; convert to the same unit first.
- Rounding too early: Do not round roots in the intermediate steps; round at the end.
- Applying it to a non-right triangle: The theorem is valid only for right triangles.
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
- Pythagorean Theorem in Everyday Life: Examples and Mistakes – Where is the Pythagorean theorem used in daily life? Examples with ladder length, screen diagonal, checking square corners and ramps, plus common mistakes.
- How to Calculate Concrete Quantity? m³, Waste Allowance, and Mixer Count – Concrete m³ for foundations, slabs, columns, and shear walls, a 5% waste allowance, mixer count, and approximate C25 cement, sand, and gravel.
- How to Calculate Stair Step Count and Riser Height? (2r+g=63) – Stair calculation: step count from floor height, riser (16-18 cm), tread width (2r+g=63), stair run length, and slope. With example tables.
- How to Calculate Percentages: Six Question Types, Formulas and Examples – Percentage math: percent of a number, what percent one is of another, increase and decrease, percentage points and reverse percentages, with examples.
- How to Calculate VAT: VAT-Inclusive and VAT-Exclusive Formulas and Examples – How do you separate VAT from a VAT-inclusive amount or add it to a VAT-exclusive one? Formulas, a mixed-rate invoice, rounding gaps and shortcuts.
This article is for general information only and is not legal, financial or medical advice. We are not an official institution.