Skip to content

Pythagorean Theorem Calculator

Find
Missing side —
Hypotenuse c
—
Perimeter
—
Area
—
Angle opposite a (°)
—
Angle opposite b (°)
—

The Pythagorean theorem says that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². With legs 3 and 4, c² = 9 + 16 = 25, so the hypotenuse is 5. To find a leg instead, subtract: a = √(c² − b²).

About this tool

Students checking homework, carpenters squaring a frame and anyone measuring a diagonal across a room all run into the same right-triangle problem: two sides are known and the third is not. Pick which side is missing, enter the other two, and the calculator returns the unknown length to four decimal places along with the hypotenuse, perimeter, area and the two acute angles in degrees. The working shows each squared value so you can follow the arithmetic line by line. Lengths can be in any unit as long as all of them use the same one, and the answer comes back in that unit. One limit: the theorem only holds when one angle is exactly 90°. For an oblique triangle, use the law of cosines instead.

How to use it

  1. Choose the missing side

    Select Hypotenuse c, Leg a or Leg b. Only the two sides you know stay on screen.

  2. Enter the known lengths

    Type both values in the same unit, such as centimetres or feet. Decimals are accepted.

  3. Read the result and working

    The missing side appears at the top, with area, perimeter, both acute angles and the squared terms used to get there.

Examples

Legs 3 and 4

Find
Hypotenuse c
Leg a
3
Leg b
4

Result Missing side: 5
Hypotenuse c: 5
Perimeter: 12
Area: 6
Angle opposite a (°): 36.87
Angle opposite b (°): 53.13

  1. c² = a² + b² = 9 + 16 = 25
  2. c = √25 = 5

The classic Pythagorean triple: 3² + 4² = 25, so the hypotenuse is exactly 5.

Hypotenuse 13, leg 12

Find
Leg a
Leg b
12
Hypotenuse c
13

Result Missing side: 5
Hypotenuse c: 13
Perimeter: 30
Area: 30
Angle opposite a (°): 22.62
Angle opposite b (°): 67.38

  1. a² = c² − b² = 169 − 144 = 25
  2. a = √25 = 5

Subtracting 12² from 13² leaves 25, so the missing leg is 5.

Legs 1 and 1

Find
Hypotenuse c
Leg a
1
Leg b
1

Result Missing side: 1.4142
Hypotenuse c: 1.4142
Perimeter: 3.4142
Area: 0.5
Angle opposite a (°): 45
Angle opposite b (°): 45

  1. c² = a² + b² = 1 + 1 = 2
  2. c = √2 = 1.4142

An isosceles right triangle: the hypotenuse is √2 and both acute angles are 45°.

How it is calculated

c = √(a² + b²); a = √(c² − b²); b = √(c² − a²)

a, b
the two legs that meet at the right angle
c
the hypotenuse, opposite the right angle and always the longest side

Squaring each known side and adding (for the hypotenuse) or subtracting (for a leg) gives the square of the missing side, and its square root is the length. Area is half the product of the legs, because the legs are base and height. The angle opposite leg a is atan(a ÷ b); the other acute angle is 90° minus that. When finding a leg, the hypotenuse must be strictly longer than the known leg, or no real triangle exists.

When not to use it

  • The triangle has no 90° angle; use the law of cosines.
  • You know one side and an angle but not a second side; that needs trigonometric ratios.
  • Distances on the Earth's surface over long ranges, where the surface curves.

Common mistakes

  • Adding the squares when solving for a leg instead of subtracting from c².
  • Mixing units, such as one side in inches and the other in feet.
  • Labelling the longest side as a leg; the hypotenuse is always opposite the right angle.
  • Forgetting the square root and reporting c² as the length.

Frequently asked questions

Which side is the hypotenuse?

It is the side opposite the right angle, and it is always the longest of the three. If a side you thought was a leg is longer than the side you called the hypotenuse, the labels are swapped round and the calculation will fail.

What is a Pythagorean triple?

A set of three whole numbers that satisfies a² + b² = c², such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25. Any multiple of a triple, like 6-8-10, is also a triple. Builders use 3-4-5 with a tape measure to check that a corner is square.

Why do I get an error when finding a leg?

The hypotenuse must be longer than the known leg. If c is equal to or shorter than the leg, c² − b² is zero or negative and there is no real length for the missing side, so no right triangle with those measurements exists.

Can I use this to check if a corner is square?

Yes. Measure two sides from the corner and the diagonal between their ends. Enter the two sides to get the expected diagonal; if your measured diagonal matches, the corner is 90°. A longer diagonal means the angle is wider than 90°, a shorter one means it is tighter.

How are the angles worked out?

The angle opposite leg a equals the arctangent of a divided by b, converted to degrees. The two acute angles of a right triangle always add up to 90°, so the second is 90° minus the first. With legs 3 and 4 the angles are 36.87° and 53.13°.

Does the theorem work in three dimensions?

It extends naturally. The space diagonal of a box with sides x, y and z is √(x² + y² + z²). You can get it here in two passes: first find the floor diagonal from x and y, then use that result and z as the two legs.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 24). Pythagorean Theorem Calculator. Tools Directory. Retrieved October 27, 2026, from https://tools.milunir.com/math/triangles-and-trigonometry/pythagorean-theorem-calculator/

MLA

Tools Directory Editorial Team. “Pythagorean Theorem Calculator.” Tools Directory, 24 Oct. 2026, https://tools.milunir.com/math/triangles-and-trigonometry/pythagorean-theorem-calculator/. Accessed 27 Oct. 2026.

Chicago

Tools Directory Editorial Team. “Pythagorean Theorem Calculator.” Tools Directory. Last modified October 24, 2026. Accessed October 27, 2026. https://tools.milunir.com/math/triangles-and-trigonometry/pythagorean-theorem-calculator/.

Link<a href="https://tools.milunir.com/math/triangles-and-trigonometry/pythagorean-theorem-calculator/">Pythagorean Theorem Calculator – Tools Directory</a>