Skip to main content
math

Pythagorean Theorem Calculator

Calculate the missing side of a right triangle using the Pythagorean theorem a² + b² = c².

By Christopher FloiedPublished Updated

One leg of the right triangle

The other leg of the right triangle

Results

Hypotenuse (c)

5 units

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Pythagorean Theorem Calculator. Follow the units and input format printed next to each field. Where a unit selector is available, choose the units that match your data.

2

Review your inputs

Double-check that all values are correct and match the units or format shown for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Pythagorean Theorem Calculator computes the output in your browser and displays the results, with units clearly labeled, as soon as they are ready — no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

When to Use This Calculator

  • •Use the Pythagorean Theorem Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • •Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • •Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • •Use it to explore the behavior of mathematical functions across a range of inputs.

Related Calculators

About Pythagorean Theorem Calculator

The Pythagorean theorem is one of the most well-known and widely used results in all of mathematics. It states that in a 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 theorem has been known for over 2,500 years and has hundreds of distinct proofs. It is fundamental to distance calculations, navigation, construction, and physics. Carpenters use the 3-4-5 rule to verify right angles, GPS systems rely on it for positioning, and it underpins the distance formula in coordinate geometry. This calculator finds the hypotenuse when you provide both legs. The theorem extends to three dimensions via d = √(x² + y² + z²) and forms the basis of the metric tensor in general relativity.

The Math Behind It

The Pythagorean theorem applies exclusively to right triangles in Euclidean geometry. One elegant proof uses area: construct squares on each side of the triangle, then show the area of the large square equals the sum of the areas of the two smaller squares. The converse is also true: if a² + b² = c² for a triangle with sides a, b, c, then the triangle is a right triangle. Pythagorean triples are sets of three positive integers (a, b, c) satisfying the theorem, such as (3, 4, 5), (5, 12, 13), and (8, 15, 17). Every primitive triple can be generated by m² − n², 2mn, m² + n² for coprime integers m > n > 0 of opposite parity. Fermat's Last Theorem, proved by Andrew Wiles in 1995, states that no analogous integer solutions exist for exponents greater than 2. In non-Euclidean geometry, the Pythagorean theorem does not hold: on a sphere, the relationship involves cosines rather than squares, and in hyperbolic geometry, the formula uses hyperbolic cosines.

Formula Reference

Pythagorean Theorem

a² + b² = c²

Variables: a, b = legs; c = hypotenuse

Worked Examples

Example 1: Ladder against a wall

A ladder reaches 12 ft up a wall and its base is 5 ft from the wall.

Step 1:c² = 12² + 5²
Step 2:c² = 144 + 25 = 169
Step 3:c = √169

c = 13 feet (the ladder is 13 ft long)

Example 2: Diagonal of a field

A rectangular field is 40 m by 30 m. Find the diagonal.

Step 1:d² = 40² + 30²
Step 2:d² = 1600 + 900 = 2500
Step 3:d = √2500

d = 50 meters

Common Mistakes & Tips

  • !Applying the theorem to non-right triangles — use the Law of Cosines instead.
  • !Forgetting to take the square root at the end to get the actual length.
  • !Confusing which side is the hypotenuse (it is always the longest side, opposite the right angle).

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

Can I use this to find a leg instead of the hypotenuse?

Yes. Rearrange the formula: a = √(c² − b²) to find a missing leg when you know the hypotenuse and one leg.

Does the theorem work in 3D?

Yes. The 3D distance formula d = √(x² + y² + z²) is a direct extension of the Pythagorean theorem.

Add the live Pythagorean Theorem Calculator to your site. Free to embed, with a link back to MegaCalc.