FLXCode Pythagorean Theorem Calculator

FLXCode apps

Appearance

Pythagorean Theorem Calculator

Fill in two sides and leave the one you want empty. Fill in all three to test for a right angle. The steps show a² + b² = c² with your numbers.

ExampleFill in two sides and leave the one you want empty. Fill all three to test for a right triangle.
bac

Solved.

b = 12

Side b
12
Area
30
Perimeter
30
Angle opposite a
22.6199°
Angle opposite b
67.3801°
Height to the hypotenuse
4.6154

The steps, with your numbers

  1. b = √(c² − a²)
  2. b = √(13² − 5²) = √(169 − 25) = √144
  3. b = 12

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it.

Problem or idea? Email us

The theorem

a² + b² = c²

a and b are the legs, the two sides next to the right angle. c is the hypotenuse, across from it. Rearranged, you get the side you need:

  • Hypotenuse: c = √(a² + b²)
  • A leg: a = √(c² − b²) or b = √(c² − a²)

Worked examples

SituationYou enterAnswerMode
A 12 ft ladder leans on a wall with its foot 3 ft out. How high does it reach?a = 3 (foot), c = 12b = 3√15 ≈ 11.619Find a leg
A 55 inch TV is 48 inches wide. How tall is the screen?b = 48, c = 55a = √721 ≈ 26.8514Find a leg
A rectangle 6 ft by 8 ft. How long is the diagonal?a = 6, b = 8c = 10Find c
A square room 10 ft on a side. Corner to corner?a = 10, b = 10c = 10√2 ≈ 14.1421Find c
Is 20, 21, 29 a right triangle?a = 20, b = 21, c = 29Yes, it is a right triangleCheck
Is 7, 8, 12 a right triangle?a = 7, b = 8, c = 12No, not a right triangleCheck

The ladder reaches about 11.6 ft up the wall. The TV screen is about 26.85 inches tall (that is the 16:9 shape, give or take).

Whole-number triples up to 65

These satisfy a² + b² = c² with whole numbers. The primitive ones can not be divided down to a smaller triple.

abc
345
51213
81517
72425
202129
123537
94041
284553
116061
166365
335665

Multiples count too: 6-8-10, 9-12-15, 12-16-20, 15-20-25, 10-24-26, 18-24-30 and so on.

Squaring a corner with 3-4-5

Builders mark 3 units along one edge and 4 along the other. If the distance between the marks is exactly 5, the corner is square. Use a bigger multiple (6-8-10, or 9-12-15 on a deck) for more accuracy. A frame that measures 5 where it should be 5 has a right angle, and the tool above runs the check with all three boxes filled.

Numbers this uses

  • No constants. The theorem is exact, and the tool does it on exact fractions, so 0.1 and 0.2 do not pick up rounding noise.
  • Only the final decimal is rounded, to the "Decimals" you pick (default 4).
  • Angles come from arctan of the two legs, in degrees. The two acute angles add up to 90°.
  • Area is a × b / 2. The height to the hypotenuse is a × b / c.
  • Values above 1,000,000,000,000 are rejected so the arithmetic stays accurate.

Limits

  • Right triangles only. For any other triangle use the triangle calculator, or the law of cosines, which reduces to this theorem when the angle is 90°.
  • The legs and hypotenuse must be above 0, and the hypotenuse must be longer than either leg.
  • For slopes and distances between two points, see the slope calculator. For just the hypotenuse, the hypotenuse calculator.

Nothing you type is uploaded. We count events without cookies (details).

FAQ

What is the Pythagorean theorem?

In a right triangle, the square of the longest side equals the sum of the squares of the other two: a² + b² = c². Side c is the hypotenuse, the one opposite the right angle. If you know two sides, you can find the third.

How do I find a missing leg?

Subtract: a = √(c² − b²). For c = 13 and b = 12, that is √(169 − 144) = √25 = 5. Leave the leg you want empty, fill in c and the other leg, and the tool does this with your numbers.

How do I know which side is c?

The hypotenuse c is always the longest side and sits opposite the 90° angle. The legs a and b are the two sides that make the right angle, and it does not matter which one you call a. If the number you enter as c is not the longest, the tool says so.

How can I tell if a triangle is a right triangle?

Put the longest side in c, fill in all three boxes, and the tool compares a² + b² with c². If they are equal, it is right-angled. If a² + b² is bigger the big angle is acute, if smaller it is obtuse. The tool uses exact arithmetic on what you typed, so 1.5, 2, 2.5 passes without rounding trouble.

What is a Pythagorean triple?

Three whole numbers that satisfy a² + b² = c², like 3-4-5, 5-12-13 and 8-15-17. Multiples of a triple also work, so 6-8-10 and 9-12-15 are right triangles. The table on this page lists every triple up to 65.

Can the answer be a square root that does not end?

Yes. Legs of 5 and 9 give c = √106, which is 10.2956 and keeps going. The tool shows the exact root, simplified when it can be (2√5 instead of √20), and the decimal beside it.

Does it work for any units?

Yes, as long as all sides use the same unit. Feet, inches, metres and centimetres all work, and the answer comes out in the same unit. Do not mix inches and feet in one calculation.

Are my numbers uploaded or saved?

No. The maths runs in your browser. What you type is not put in the address bar, not stored and not counted. We only count which mode was used.

More from FLXCode

Share Pythagorean Theorem Calculator