Pythagorean Theorem Calculator (a² + b² = c²)

Solve one missing side of a right triangle using the Pythagorean theorem.

Pythagorean Theorem Calculator

Formula

a² + b² = c² (enter 0 for the unknown side)

Exactly one of a, b, or c should be zero. The calculator solves for that missing positive side using the Pythagorean theorem.

This Pythagorean theorem calculator solves one missing side of a right triangle. Enter legs a and b and hypotenuse c, with exactly one value set to 0 as the unknown. The default uses a=3, b=4, and c=0, which solves to hypotenuse 5.

When you always have both legs and only need the hypotenuse, the right triangle calculator is a shorter path. For area from three sides, use the triangle calculator.

In a right triangle, a² + b² = c², where c is the hypotenuse (the side opposite the right angle). To find the hypotenuse, use c = √(a² + b²): legs 3 and 4 give √25 = 5. To find a missing leg, use a = √(c² − b²): hypotenuse 5 and leg 4 give 3. In this calculator, enter 0 in the side you want to find.

How the formula works

If c is zero, return √(a² + b²). If a is zero, return √(c² – b²). If b is zero, return √(c² – a²). The hypotenuse must be longer than each known leg when a leg is missing.

Worked example

a = 3, b = 4, c = 0. Missing hypotenuse = √(9 + 16) = √25 = 5.

InputValue
Leg a3
Leg b4
Hypotenuse c0 (solve)
Missing side5

Step-by-step examples

ProblemStepsAnswer
Legs 3 and 49 + 16 = 25; √25c = 5
Hypotenuse 5, leg 425 − 16 = 9; √9a = 3
Legs 1 and 11 + 1 = 2; √2c ≈ 1.414214
Room 10 × 12 ft, corner to corner100 + 144 = 244; √244≈ 15.62 ft
12 ft ladder, base 3 ft from wall144 − 9 = 135; √135reaches ≈ 11.62 ft high
55 in 16:9 TVwidth = 55 × 16/√(16² + 9²); height = 55 × 9/√337≈ 47.94 × 26.96 in

Common Pythagorean triples

abc
345
6810
51213
91215
81517
72425
202129

How to use the fields

  • Leg a: enter the length, or 0 to solve for a.
  • Leg b: enter the length, or 0 to solve for b.
  • Hypotenuse c: enter the length, or 0 to solve for c.
  • Mark the zero field before you type, and leave only one side at zero.

Solving a missing leg

Example pattern: a=0, b=4, c=5 yields a=3. Always confirm c > b before trusting the square root of c² – b².

Common mistakes

  • Leaving two zeros instead of one
  • Putting the longest side in a leg field when it is the hypotenuse
  • Using the theorem on non-right triangles
  • Mixing units across sides

Real-world uses

Carpenters still use 3-4-5 checks to square a corner. Measure 3 and 4 along the edges and confirm the diagonal is 5 in matching units. On a map or grid, horizontal and vertical runs form the legs and the straight line distance is the hypotenuse: enter the runs as a and b with c=0, or put a zero in a leg field if you know the straight distance and one run. For distance between two points, the distance calculator does the same math from coordinates.

Non integer sides

Real cuts are rarely perfect integers, so enter decimals in matching units and expect a decimal hypotenuse. Keep full precision through the square root and round once, as in the legs 1 and 1 example (√2 ≈ 1.414214).

Limitations

Only right triangles with exactly one unknown side are supported. Angles, altitude to the hypotenuse, and oblique triangles are out of scope.

Frequently Asked Questions

How do I find the hypotenuse?

Square both legs, add them and take the square root: c = √(a² + b²). Legs 6 and 8 give √100 = 10.

How do I find a missing leg?

Subtract the square of the known leg from the square of the hypotenuse and take the root: a = √(c² − b²). Hypotenuse 13 and leg 12 give 5.

Does the Pythagorean theorem work for any triangle?

No, only for right triangles. For other triangles use the law of cosines, or the triangle calculator if you know all three sides.

What is a Pythagorean triple?

Three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. Any multiple of a triple, like 6-8-10, is also a triple.

How do I enter the unknown side?

Type 0 in the field you want to solve and fill the other two. The hypotenuse must be longer than the known leg.