Skip to content
UtilHQ

Pythagorean Theorem Calculator

The Pythagorean theorem is one of the oldest and most widely used formulas in mathematics.

100% Free No Data Stored Instant

Enter exactly 2 sides to solve for the missing one. Side c is always the hypotenuse (longest side).

Enter exactly 2 positive side values above to calculate the missing side.
Ad Space
Ad Space

Share this tool

About This Tool

The Pythagorean theorem is one of the oldest and most widely used formulas in mathematics. It states that in any right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides. Written as a² + b² = c², this relationship has applications in construction, navigation, physics, computer graphics, and everyday distance calculations. From determining the diagonal of a TV screen to figuring out how long a ladder needs to be, the Pythagorean theorem shows up constantly in both academic and practical settings. The formula dates back to ancient Babylon and Greece, and it remains a foundational concept taught in every geometry course worldwide. This free Pythagorean theorem calculator solves for any missing side of a right triangle when two sides are known. Enter two values and leave the third blank to get an instant answer with a full step-by-step formula breakdown. The calculator also includes a right triangle verification mode that checks if three given side lengths actually form a valid right triangle. Every result is rounded to two decimal places for clarity, and the solution shows each intermediate calculation so you can follow the math or verify it by hand. No signup or download required. The tool auto-detects which side to solve for based on which fields you fill in, making it fast and intuitive to use for homework problems, construction planning, and engineering calculations alike.

Understanding the Pythagorean Theorem

The Pythagorean theorem applies exclusively to right triangles, which are triangles containing one 90-degree angle. The two sides that form the right angle are called legs (labeled a and b), and the side opposite the right angle is the hypotenuse (labeled c). The hypotenuse is always the longest side of a right triangle.

The formula is:

a² + b² = c²

This means you can always find the third side if you know two sides. To solve for the hypotenuse, use c = sqrt(a² + b²). To solve for a leg, rearrange to a = sqrt(c² - b²). The formula works with any unit of measurement as long as all sides use the same unit.

How to Find the Hypotenuse

Finding the hypotenuse is the most common use of the Pythagorean theorem. Given two legs a and b:

  1. Square each leg: compute a² and b²
  2. Add the two squares together: a² + b²
  3. Take the square root of the sum: c = sqrt(a² + b²)

Example: If a = 3 and b = 4, then c = sqrt(9 + 16) = sqrt(25) = 5. The classic 3-4-5 right triangle is the simplest example with whole-number sides, called a Pythagorean triple.

Other common Pythagorean triples include 5-12-13, 8-15-17, and 7-24-25. These integer solutions appear frequently in standardized tests and textbook problems.

How to Find a Missing Leg

When you know the hypotenuse and one leg, you can find the other leg by rearranging the formula:

a = sqrt(c² - b²)

  1. Square both known sides: compute c² and b²
  2. Subtract the leg squared from the hypotenuse squared: c² - b²
  3. Take the square root of the difference

Example: If c = 13 and b = 5, then a = sqrt(169 - 25) = sqrt(144) = 12.

Note: If the hypotenuse value you enter is smaller than the leg, the calculation is impossible because the hypotenuse must always be the longest side in a right triangle. The calculator will detect this and prompt you to correct the input.

Verifying a Right Triangle

Given three side lengths, you can check if they form a right triangle by testing whether a² + b² = c², where c is the largest side. If the equation holds (within a small rounding tolerance), the triangle is a right triangle.

The verification mode in this calculator takes all three sides, identifies the longest one as the potential hypotenuse, and tests the Pythagorean relationship. It also checks the triangle inequality theorem (the sum of any two sides must exceed the third) to confirm the sides can form a valid triangle at all.

This is useful for checking measurements in real-world projects. For instance, construction workers use the 3-4-5 method to verify that corners are square: measure 3 feet along one wall, 4 feet along the other, and if the diagonal between those points is exactly 5 feet, the corner is a perfect 90 degrees.

Real-World Applications

The Pythagorean theorem has practical uses across many fields:

  • Construction: Verifying square corners, calculating roof rafter lengths, and determining diagonal measurements
  • Navigation: Computing straight-line distances between two points on a map or coordinate system
  • Ladders and Ramps: Determining the correct ladder length to safely reach a certain height at the proper angle
  • Screen Sizes: TV and monitor screens are measured diagonally, and the theorem relates width, height, and the diagonal measurement
  • Surveying: Land surveyors use it to calculate distances that cannot be directly measured

In coordinate geometry, the distance formula between two points (x1, y1) and (x2, y2) is directly derived from the Pythagorean theorem: d = sqrt((x2-x1)² + (y2-y1)²).

Frequently Asked Questions

What is the Pythagorean theorem formula?

The formula is a² + b² = c², where a and b are the two legs (shorter sides) of a right triangle and c is the hypotenuse (the longest side, opposite the 90-degree angle). You can rearrange this formula to solve for any side: c = sqrt(a² + b²) for the hypotenuse, or a = sqrt(c² - b²) for a leg.

Does the Pythagorean theorem work for all triangles?

No. The Pythagorean theorem only applies to right triangles (triangles with one 90-degree angle). For non-right triangles, you would use the Law of Cosines: c² = a² + b² - 2ab·cos(C), which generalizes the Pythagorean theorem. When angle C is exactly 90 degrees, cos(C) = 0, and the Law of Cosines reduces to a² + b² = c².

What is a Pythagorean triple?

A Pythagorean triple is a set of three positive integers that satisfy a² + b² = c². The most well-known triple is 3, 4, 5. Other common triples include 5, 12, 13 and 8, 15, 17 and 7, 24, 25. Any scalar multiple of a Pythagorean triple is also a triple: for example, 6, 8, 10 is double the 3, 4, 5 triple.

Why does my leg calculation return no result?

When solving for a leg, the hypotenuse (side c) must be larger than the other known leg. If c is smaller than or equal to the known leg, the calculation produces a negative number under the square root, which has no real solution. This means the given measurements cannot form a valid right triangle. Check that you entered the hypotenuse in the "Side c" field.

How accurate is this calculator?

Results are displayed rounded to 2 decimal places. Internally, the calculator uses full floating-point precision for intermediate steps. For most practical purposes, 2 decimal places provide sufficient accuracy. The step-by-step breakdown shows intermediate values to 4 decimal places so you can trace the calculation.

Can I use decimals and fractions as input?

You can enter any positive decimal number such as 3.5 or 12.75. The calculator does not directly accept fraction notation, but you can convert fractions to their decimal equivalents before entering them. For example, three-fourths equals 0.75. All standard decimal inputs are supported.

U

Reviewed by the UtilHQ Team

Our tools are verified for accuracy. Results are estimates for planning purposes.