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

Side a
3
Side b
4
Side c (hypotenuse)
5
Area
6
Perimeter
12
Angle A (opposite a)
36.87°
Angle B (opposite b)
53.13°
Angle C (right angle)
90°

Triangle Diagram

Copied!

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
HypotenuseThe longest side of a right triangle, located directly opposite the 90-degree angle. Denoted as side c in the formula.
Right TriangleA triangle with exactly one interior angle measuring 90 degrees. The Pythagorean theorem applies only to right triangles.
LegsThe two shorter sides of a right triangle (sides a and b) that form the right angle. Sometimes called catheti (singular: cathetus).
Pythagorean TripleA 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 TheoremIf 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 CosinesA 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
3456-8-10, 9-12-15, 12-16-20, 15-20-25
5121310-24-26, 15-36-39
8151716-30-34, 24-45-51
7242514-48-50, 21-72-75
9404118-80-82
11606122-120-122
12353724-70-74
20212940-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:

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.

Frequently Asked Questions

Related Calculators

Standard Deviation Calculator Probability Calculator Quadratic Formula Calculator Triangle Calculator Slope Calculator Circle Calculator