Pythagorean Theorem Calculator (Hypotenuse and Legs)

Pythagorean Theorem Calculator

You know both legs and want the hypotenuse.

u

u

Hypotenuse (c):

-

Angle A (opposite leg a):

-

Angle B (opposite leg b):

-

Perimeter:

-

Area:

-

Calculation:

-

Use this Pythagorean theorem calculator to find the hypotenuse of a right triangle from its two legs, or a missing leg from the hypotenuse and the other leg. Besides the answer, you get both acute angles, the perimeter, the area and the work with your numbers.

Below you will find the formula, worked examples, a table of Pythagorean triples and the most common questions.

How to use the Pythagorean theorem calculator

Step 1: Choose what you want to find: Find the hypotenuse if you know both legs, or Find a leg if you know the hypotenuse and the other leg.

Step 2: Enter the sides you know. You can type a decimal point or a comma, for example 7.5 or 7,5. Pick a unit if you like.

Step 3: Click Calculate or press Enter.

Step 4: The missing side appears in the right-hand panel along with both acute angles, the perimeter and the area. The Calculation box shows every operation with your numbers.

Pythagorean theorem formula

In a right triangle, the square of the hypotenuse equals the sum of the squares of the legs. The hypotenuse (c) is the longest side and sits opposite the right angle. The legs (a and b) are the two sides that form the right angle.

c² = a² + b²

To find the hypotenuse, solve for c:

c = √(a² + b²)

To find a leg, subtract the square of the leg you know from the square of the hypotenuse:

b = √(c² - a²)

The acute angles come from the tangent. Angle A, opposite leg a, satisfies tan(A) = a ÷ b, so A = arctan(a ÷ b). The angles of a triangle add up to 180° and one is 90°, so the other is B = 90° - A.

If the hypotenuse you enter is not longer than the leg, the calculator tells you: in a right triangle the hypotenuse is always the longest side.

Pythagorean theorem examples

Example 1: Hypotenuse of a triangle with legs 3 and 4

The legs are 3 and 4. We square them, add, and take the square root:

c = √(3² + 4²) = √(9 + 16) = √25 = 5

The hypotenuse is 5. The acute angles are:

A = arctan(3 ÷ 4) ≈ 36.87°

B = 90° - 36.87° = 53.13°

Example 2: Legs 7 and 10

c = √(7² + 10²) = √(49 + 100) = √149 ≈ 12.21

The result is not exact, so we round it: the hypotenuse is about 12.21. The perimeter is 29.21 and the area is 35.

Example 3: How high a ladder reaches

A 15 ft ladder leans against a wall with its base 4 ft from the wall. The ladder is the hypotenuse (c = 15) and the distance along the ground is a leg (a = 4). We look for the other leg, which is the height on the wall:

b = √(15² - 4²) = √(225 - 16) = √209 ≈ 14.46

The ladder reaches 14.46 ft up the wall.

Example 4: The diagonal of a TV screen

A screen is 48 in wide and 27 in tall. The diagonal is the hypotenuse of the right triangle formed by the two sides, and it is how TVs are sold:

c = √(48² + 27²) = √(2304 + 729) = √3033 ≈ 55.07

The diagonal is 55.07 in, so this is a 55 inch TV.

Table of Pythagorean triples

A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c². These are the most common ones, with their acute angles:

Leg aLeg bHypotenuse cAngle AAngle B
34536.87°53.13°
5121322.62°67.38°
8151728.07°61.93°
7242516.26°73.74°
20212943.6°46.4°
9404112.68°77.32°
11606110.39°79.61°
12353718.92°71.08°

Frequently asked questions

How do you find the hypotenuse?

Square both legs, add them, and take the square root of the sum. With legs 6 and 8: √(36 + 64) = √100 = 10.

How do you find a leg when you know the hypotenuse?

Subtract the square of the known leg from the square of the hypotenuse, then take the square root. With hypotenuse 10 and leg 6: √(100 - 36) = √64 = 8.

Does the Pythagorean theorem work for any triangle?

Only for right triangles, the ones with a 90° angle. It also works in reverse: if three sides satisfy a² + b² = c², the triangle is a right triangle (the converse). Other triangles need the law of cosines.

What is a Pythagorean triple?

Three positive whole numbers that satisfy a² + b² = c², such as 3, 4 and 5. Any multiple of a triple is also a triple: 6, 8 and 10 come from multiplying by 2.

How do I find the diagonal of a rectangle?

The diagonal is the hypotenuse of the triangle formed by the length and the width. A 120 by 90 rectangle has a diagonal of √(14400 + 8100) = √22500 = 150.

Learn more

Related calculators

You can explore other calculators here.