Pythagorean Theorem Calculator
Quick Answer
The Pythagorean theorem states that in any right triangle, the square of the hypotenuse (c) equals the sum of the squares of the other two sides (a and b): a^2 + b^2 = c^2. To find the hypotenuse, compute c = sqrt(a^2 + b^2). To find a missing leg, rearrange to a = sqrt(c^2 - b^2). This theorem, named for the Greek mathematician Pythagoras, applies only to triangles with a 90-degree angle.
Also searched as: pythagorean theorem, pythagorean theorem calculator
Enter Any Two Sides
Leave one field empty to solve for the missing side. Side c is the hypotenuse (longest side).
Results
Triangle Diagram
What Is the Pythagorean Theorem?
The Pythagorean theorem is one of the oldest and most fundamental theorems in all of mathematics. It states that in any right triangle (a triangle containing exactly one 90-degree angle), the square of the length of the hypotenuse equals the sum of the squares of the lengths of the other two sides:
a² + b² = c²
The theorem is named after Pythagoras of Samos (c. 570 - c. 495 BCE), a Greek mathematician and philosopher, although evidence suggests the relationship was known to Babylonian mathematicians over a thousand years earlier. The Plimpton 322 clay tablet, dating to approximately 1800 BCE, contains a table of Pythagorean triples, indicating an understanding of the relationship long before Pythagoras. In ancient India, the Baudhayana Sulba Sutra (c. 800 BCE) also describes the theorem. Regardless of its origins, the theorem has been proven in over 370 different ways throughout history, including a famous proof by U.S. President James Garfield in 1876.
The theorem applies exclusively to right triangles. The hypotenuse (side c) is always the longest side and is always located directly opposite the right angle. The other two sides are called the legs (sides a and b). If all three angles of a triangle are acute (less than 90 degrees) or one angle is obtuse (greater than 90 degrees), the Pythagorean theorem does not hold. For non-right triangles, the generalized form is the Law of Cosines: c² = a² + b² - 2ab·cos(C).
The Formula Explained
There are three primary use cases for the Pythagorean theorem, depending on which side you need to find:
Finding the Hypotenuse (c)
When you know both legs a and b: c = √(a² + b²)
Example: If a = 6 and b = 8, then c = √(36 + 64) = √100 = 10
Finding Leg a
When you know b and c: a = √(c² - b²)
Example: If c = 13 and b = 12, then a = √(169 - 144) = √25 = 5
Finding Leg b
When you know a and c: b = √(c² - a²)
Example: If c = 17 and a = 8, then b = √(289 - 64) = √225 = 15
This calculator also computes additional properties: the area of the right triangle (A = ½ × a × b), the perimeter (a + b + c), and both acute angles using inverse trigonometric functions (angle A = arcsin(a/c), angle B = arcsin(b/c)).
Key Terms
| Term | Definition |
|---|---|
| Hypotenuse | The longest side of a right triangle, located directly opposite the 90-degree angle. Denoted as side c in the formula. |
| Right Triangle | A triangle with exactly one interior angle measuring 90 degrees. The Pythagorean theorem applies only to right triangles. |
| Legs | The two shorter sides of a right triangle (sides a and b) that form the right angle. Sometimes called catheti (singular: cathetus). |
| Pythagorean Triple | A set of three positive integers (a, b, c) that satisfy a² + b² = c². Examples: (3, 4, 5), (5, 12, 13). A primitive triple has no common factor other than 1. |
| Converse Theorem | If a² + b² = c² holds for the three sides of a triangle, then the triangle is a right triangle. This is used in construction to verify 90-degree angles. |
| Law of Cosines | A generalization of the Pythagorean theorem for any triangle: c² = a² + b² - 2ab·cos(C). When C = 90°, it reduces to a² + b² = c². |
Common Pythagorean Triples
Pythagorean triples are sets of three whole numbers that perfectly satisfy the theorem. They are immensely useful in construction, problem-solving, and standardized tests because they eliminate the need for square root calculations. The table below lists the most common primitive triples (where the three numbers share no common factor greater than 1) along with their first few multiples:
| a | b | c | Common Multiples |
|---|---|---|---|
| 3 | 4 | 5 | 6-8-10, 9-12-15, 12-16-20, 15-20-25 |
| 5 | 12 | 13 | 10-24-26, 15-36-39 |
| 8 | 15 | 17 | 16-30-34, 24-45-51 |
| 7 | 24 | 25 | 14-48-50, 21-72-75 |
| 9 | 40 | 41 | 18-80-82 |
| 11 | 60 | 61 | 22-120-122 |
| 12 | 35 | 37 | 24-70-74 |
| 20 | 21 | 29 | 40-42-58 |
The 3-4-5 triple is by far the most commonly used in practical applications. Carpenters, framers, and masons routinely use the "3-4-5 rule" to ensure corners are square. By measuring 3 feet along one wall and 4 feet along the adjacent wall, then checking that the diagonal between those points is exactly 5 feet, they can confirm a perfect right angle without any special tools.
Real-World Applications
The Pythagorean theorem may seem abstract, but it appears constantly in everyday life and professional fields:
- Construction and Carpentry: The 3-4-5 rule (and its multiples like 6-8-10) is the standard method for checking that walls, foundations, and frames are perfectly square. If the diagonal measurement does not match the expected hypotenuse, the corner is not 90 degrees and must be adjusted.
- Navigation and GPS: Calculating the straight-line distance between two points uses the Pythagorean theorem (or its 3D extension). Pilots, sailors, and GPS systems rely on this to compute shortest distances and bearings.
- Screen Sizes: TV and monitor sizes are measured diagonally. A 16:9 display with a width of 44 inches and height of 24.75 inches has a diagonal of √(44² + 24.75²) ≈ 50.5 inches, which is why it is marketed as a 50-inch screen.
- Architecture and Roofing: Roof pitch calculations use the theorem to determine rafter lengths. If a roof rises 6 feet over a horizontal run of 12 feet, the rafter length is √(6² + 12²) = √180 ≈ 13.42 feet.
- Sports Fields: The distance from home plate to second base in baseball is the diagonal of a 90-foot square, calculated as 90√2 ≈ 127.28 feet.
- Computer Graphics and Game Development: Calculating distances between objects on a 2D screen or in 3D virtual worlds relies on the Pythagorean theorem (extended to 3D as d = √(x² + y² + z²)).
Practical Examples
Example 1: Ladder Against a Wall
A 13-foot ladder leans against a wall with its base 5 feet from the wall. How high up the wall does the ladder reach?
Here, c = 13 (ladder = hypotenuse), a = 5 (distance from wall). Solving for b:
b = √(13² - 5²) = √(169 - 25) = √144 = 12 feet
Example 2: TV Screen Diagonal
A television has a width of 48 inches and a height of 27 inches. What is the diagonal screen size?
c = √(48² + 27²) = √(2304 + 729) = √3033 ≈ 55.1 inches
This would be marketed as a 55-inch TV.
Example 3: Building a Rectangular Deck
You are building a 12-foot by 16-foot deck and need to verify the corners are square. What should the diagonal measure?
c = √(12² + 16²) = √(144 + 256) = √400 = 20 feet
This is a 3-4-5 triple scaled by 4. If you measure the diagonal and get exactly 20 feet, your corners are perfectly square.