Pythagoras Theorem Solver

Use this Pythagoras Theorem Solver to enter values, adjust options, and review results in a compact responsive workspace.

Results are calculated automatically as you enter data.

Missing side

▼ See explanations and tips below ▼

What Is the Pythagorean Theorem?

The Pythagorean theorem explains the relationship between the three side lengths of a right triangle. A right triangle has one angle measuring \(90^\circ\). The two sides that form the right angle are called the legs, and the side opposite the right angle is called the hypotenuse.

The theorem says that the square of the hypotenuse is equal to the sum of the squares of the two legs:

$$ a^2 + b^2 = c^2 $$

In this formula, \(a\) and \(b\) are the legs, and \(c\) is the hypotenuse. Because the hypotenuse is opposite the right angle, it must be the longest side of a right triangle.

The Pythagorean theorem is useful because it lets you find one missing side length when you already know the other two side lengths. It is one of the most practical formulas in geometry because it connects length, distance, squares, and square roots in a simple way.


Why the Pythagorean Theorem Matters

The Pythagorean theorem appears anywhere a right angle creates a triangle. Students use it in geometry and algebra, but it also shows up in construction, design, navigation, coordinate geometry, and physics.

For example, if you know the width and height of a rectangle, the diagonal across the rectangle is the hypotenuse of a right triangle. If you know the horizontal and vertical distance between two points on a coordinate grid, the straight-line distance between those points comes from the same idea.

The theorem also helps prevent mistakes. It makes clear that you cannot choose any three positive numbers and expect them to form a right triangle. The two legs and the hypotenuse must satisfy \(a^2 + b^2 = c^2\).


Key Terms to Know

  • Right triangle: A triangle with one \(90^\circ\) angle.
  • Legs: The two sides that meet to form the right angle. In the standard formula, they are \(a\) and \(b\).
  • Hypotenuse: The side opposite the right angle. It is labeled \(c\) in the standard formula and is the longest side of a right triangle.
  • Square: A number multiplied by itself, such as \(5^2 = 25\).
  • Square root: A value that gives the original number when squared, such as \(\sqrt{25} = 5\).
  • Radical: A square-root expression such as \(\sqrt{74}\).
  • Exact form: A result written without rounding, often as a simplified radical.
  • Decimal approximation: A rounded decimal version of a value that may not be exact.

How the Pythagorean Theorem Works

The theorem compares the squares built on the sides of a right triangle. If the legs have lengths \(a\) and \(b\), then the total area of the two smaller squares, \(a^2 + b^2\), equals the area of the square on the hypotenuse, \(c^2\).

To find the hypotenuse, add the squares of the two legs and then take the square root:

$$ c = \sqrt{a^2 + b^2} $$

To find a missing leg, rearrange the theorem by subtracting the known leg's square from the hypotenuse's square:

$$ a = \sqrt{c^2 - b^2} $$

or

$$ b = \sqrt{c^2 - a^2} $$

Only the positive square root is used for side length, because a triangle side cannot have a negative length.


Examples of the Pythagorean Theorem in Practice

Example 1: Finding the Hypotenuse

Suppose the legs of a right triangle are \(3\) and \(4\). The hypotenuse is \(c\).

$$ c^2 = 3^2 + 4^2 $$
$$ c^2 = 9 + 16 = 25 $$
$$ c = \sqrt{25} = 5 $$

The missing hypotenuse is \(5\). This is the classic \(3\)-\(4\)-\(5\) right triangle.


Example 2: Finding a Missing Leg

Suppose the hypotenuse is \(13\) and one leg is \(5\). Let the missing leg be \(b\).

$$ b^2 = 13^2 - 5^2 $$
$$ b^2 = 169 - 25 = 144 $$
$$ b = \sqrt{144} = 12 $$

The missing leg is \(12\). A quick check confirms the result:

$$ 5^2 + 12^2 = 25 + 144 = 169 = 13^2 $$

Example 3: An Exact Radical and a Decimal Approximation

Some right triangles do not have whole-number side lengths. If the legs are \(5\) and \(7\), then:

$$ c^2 = 5^2 + 7^2 $$
$$ c^2 = 25 + 49 = 74 $$
$$ c = \sqrt{74} \approx 8.602325267 $$

The exact answer is \(\sqrt{74}\). The decimal answer is useful for measurement, but it is an approximation.


Example 4: When a Missing Leg Is Not Possible

Suppose you try to find a missing leg when the hypotenuse is \(6\) and the known leg is \(8\).

$$ \text{missing leg}^2 = 6^2 - 8^2 $$
$$ \text{missing leg}^2 = 36 - 64 = -28 $$

A positive side length cannot have a negative square. This means the numbers cannot describe a right triangle with \(6\) as the hypotenuse and \(8\) as a leg. The hypotenuse must be longer than either leg.


How to Interpret the Result

A missing side result is a length. It uses the same unit as the inputs, as long as both known side lengths were entered in the same unit. For example, if the known sides are measured in centimeters, the result is also in centimeters.

An exact radical such as \(\sqrt{74}\) means the missing side is exactly the square root of \(74\). A decimal shown after \(\approx\) is an approximation. It is easier to use for measuring, but it may be rounded.

The squared value tells you the value before the square root is applied. For example, if the calculator shows \(c^2 = 74\), the side length is not \(74\); it is \(\sqrt{74}\).

A verification line such as \(a^2 + b^2 \approx c^2\) is a check that the side lengths satisfy the Pythagorean theorem. Small differences can happen when a decimal approximation is used.

A triangle preview is helpful for understanding which side is which, but it should be treated as a scaled visual guide rather than a precise drawing.


Common Mistakes and Misconceptions

  • Mixing up the hypotenuse and a leg: The hypotenuse is always \(c\) in the standard formula and is always opposite the right angle.
  • Using the theorem for any triangle: The Pythagorean theorem applies to right triangles only.
  • Entering inconsistent units: Do not enter one side in inches and another in centimeters unless you convert them first.
  • Forgetting to subtract when solving for a leg: To find a missing leg, use \(c^2 - \text{known leg}^2\), not addition.
  • Expecting every answer to be a whole number: Many right-triangle side lengths are radicals or decimals, not integers.
  • Rounding too early: Use the exact radical or full calculator result when possible, then round at the end.
  • Treating an approximation as exact: A result marked with \(\approx\) has been rounded or formatted.
  • Using zero or negative side lengths: Triangle side lengths must be positive.

When to Use the Pythagorean Theorem

Use the Pythagorean theorem when:

  • You have a right triangle and know two side lengths.
  • You need the diagonal of a rectangle, screen, field, room, or rectangular object.
  • You know a horizontal distance and a vertical distance and need the straight-line distance.
  • You want to check whether three side lengths can form a right triangle.
  • You are working with coordinate geometry, where horizontal and vertical changes form the legs of a right triangle.

Do not use it when the triangle is not a right triangle or when you need to solve for angles. Other geometry or trigonometry tools are needed for those cases.


Limitations and Things to Keep in Mind

The Pythagorean theorem is powerful, but it depends on clear assumptions:

  • The triangle must be a right triangle.
  • Side \(c\) must be the hypotenuse.
  • Side lengths must be positive numbers.
  • The two known sides must use the same unit.
  • Only one missing side can be solved from two known side lengths.

The calculator does not convert units, solve for angles, or solve general non-right triangles. It also does not accept symbolic entries such as \(\sqrt{2}\), fractions typed as \(3/4\), or variables; use positive numeric side lengths instead.

When solving for a leg, the hypotenuse must be greater than the known leg. If it is not, the result would require the square root of a negative number, which does not represent a real triangle side length.

Displayed decimals are formatted to the calculator's precision, so they may be rounded. Very small nonzero values may appear in exponential notation. Exact radical simplification is available only when the squared value fits the calculator's supported simplification rules.

For schoolwork, measurements, construction sketches, or safety-related decisions, double-check the side labels, units, and rounding. For engineering, building, or safety-critical work, use appropriate professional methods and review.


How to Use This Calculator

  1. Choose which side is missing: leg \(a\), leg \(b\), or hypotenuse \(c\).
  2. Enter the two known side lengths in the visible number fields.
  3. Use positive numbers only.
  4. When solving for a leg, make sure the hypotenuse is longer than the known leg.
  5. Read the missing side from the result line.
  6. Use the exact radical when you need an exact value, and use the decimal approximation when you need a measurement-friendly value.
  7. Review the formula substitution, squared value, verification, side summary, and triangle preview for context.

Frequently Asked Questions

What is the hypotenuse?

The hypotenuse is the side opposite the right angle in a right triangle. It is the longest side and is usually labeled \(c\) in the Pythagorean theorem.


Can I use any unit of measurement?

Yes, as long as both known side lengths use the same unit. If you enter both sides in meters, the result is in meters. If one side is in inches and the other is in centimeters, convert one of them before calculating.


Why does the answer sometimes show a radical and a decimal?

A radical such as \(\sqrt{74}\) is an exact answer. The decimal after \(\approx\) is an approximation that is easier to read or measure. Both describe the same length, but the radical avoids rounding.


Can the Pythagorean theorem be used for non-right triangles?

No. The theorem applies only when the triangle has a right angle. For non-right triangles, you may need other triangle methods such as the Law of Cosines or trigonometric relationships.


Why must the hypotenuse be longer than the known leg?

In a right triangle, the hypotenuse is the longest side. If the entered hypotenuse is shorter than or equal to a leg, subtracting the known leg's square from the hypotenuse's square gives zero or a negative value, which cannot produce a positive missing side length.


Is the triangle preview an exact drawing?

The preview is scaled to fit the display, so it is useful for orientation and labeling. It should not be treated as a precise construction drawing or a replacement for measured geometry.


Sources and References

Books and Open Textbooks

  1. Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis. Elementary Algebra 2e. OpenStax, Apr. 22, 2020. Sections 3.4, “Solve Geometry Applications: Triangles, Rectangles, and the Pythagorean Theorem,” and 9.2, “Simplify Square Roots.” Accessed July 4, 2026. https://openstax.org/books/elementary-algebra-2e/pages/3-4-solve-geometry-applications-triangles-rectangles-and-the-pythagorean-theorem; https://openstax.org/books/elementary-algebra-2e/pages/9-2-simplify-square-roots.
  2. Donna Kirk. Contemporary Mathematics. OpenStax, Mar. 22, 2023. Section 10.8, “Right Triangle Trigonometry.” Accessed July 4, 2026. https://openstax.org/books/contemporary-mathematics/pages/10-8-right-triangle-trigonometry.
  3. Samar ElHitti, Marianna Bonanome, Holly Carley, Thomas Tradler, and Lin Zhou. Arithmetic and Algebra. New York City College of Technology / LibreTexts. Section 2.4, “The Pythagorean Theorem.” Accessed July 4, 2026. https://math.libretexts.org/Bookshelves/Algebra/Book%3AArithmeticandAlgebra%28ElHittiBonanomeCarleyTradlerandZhou%29/02%3AAppendices/2.04%3AThePythagorean_Theorem.