Country & language

Sets the currency, units and country-specific rules (tax, VAT, salary) in calculators. General tools stay the same.

Pages that are not translated yet open in English.

↑ ↓ to move · Enter to open · Esc to close

Pythagorean Theorem Calc

Give two sides of a right triangle and we find the third – the hypotenuse or a missing leg – with the exact radical, the angles, area and height. Or give all three measured sides and we tell you whether the corner is really 90°, and by how much it is out.

Quick answer: The hypotenuse is c = √(a² + b²): legs of 3 and 4 give √(9 + 16) = √25 = 5. Turned round, the same sum checks a corner – walls of 3 m and 4 m with a 5.02 m diagonal meet at 90.48°, not 90°.

Updated · Free · No sign-up

Pythagorean Theorem Calc inputs

Result

Hypotenuse

c = 5

Sides
3, 4, 5
Area (½ab)
6
Perimeter
12
Height to the hypotenuse (ab ÷ c)
2.4
Angle opposite a
36.8699°
Angle opposite b
53.1301°

Step by step

  1. Pythagorean theorem: c = √(a² + b²)
  2. Square the legs: 3² = 9, 4² = 16
  3. Add: 9 + 16 = 25
  4. Square root: c = √25 = 5

What the theorem says – and what it doesn’t

In a triangle with a 90° corner, the square built on the longest side (the hypotenuse, c) has exactly the same area as the two squares on the shorter sides (the legs, a and b) put together. That is Proposition 47 of Book I of Euclid’s Elements. Proposition 48 runs the other way: if the two smaller squares add up to the big one, the corner must be 90°. The first lets you find a length; the second lets you test an angle using nothing but a tape measure. Neither applies to a triangle without a right angle – there the law of cosines takes over.

a² + b² = c²  ·  c = √(a² + b²)  ·  b = √(c² − a²)  ·  angle opposite c = cos⁻¹((a² + b² − c²) ÷ 2ab)

Three questions, three set-ups

You knowModeFormulaExample
Both legsHypotenuse c√(a² + b²)4.5 and 3.6 → 5.762812
One leg and the hypotenuseA leg√(c² − a²)8 and 12 → 4√5 ≈ 8.944272
All three sidesIs it a right angle?compare a² + b² with c²3, 4, 5.02 → 90.4784°
Two points on a gridHypotenuse clegs = difference in x and in y(1, 2) to (7, 10) → 6, 8 → 10

Worked examples

How far is it corner to corner?

A bedroom is 4.5 m by 3.6 m. The floor diagonal is √(4.5² + 3.6²) = √(20.25 + 12.96) = √33.21 = 5.762812 m – the longest straight run for a cable, or the longest rug edge that fits on the diagonal. For the diagonal from a floor corner to the opposite ceiling corner of a 3 m-high room, run the calculator again with legs 5.762812 and 3: √42.21 ≈ 6.50 m. That second step is the three-dimensional use of the theorem in Common Core 8.G.B.7.

Is the corner really square?

Before tiling, you mark 3 m along one wall and 4 m along the other, then measure between the marks. The tape reads 5.02 m. Choose “Is it a right angle?”: 3² + 4² = 25 but 5.02² = 25.2004, so the corner is 90.4784° – slightly open. Had the tape read 4.97 m, the corner would be 89.2859°, slightly closed. On a 4 m wall, half a degree is about 3.3 cm of drift at the far end, enough to show as a tapering grout line.

The size of the triangle matters. The same 2 cm error on a small 1.2 m – 1.6 m – 2 m triangle (diagonal 2.02 m) gives 91.1997°, more than twice as far out. Use the biggest 3-4-5 multiple the room allows.

How high does a ladder reach?

A 5 m ladder stands with its foot 1.25 m from the wall. Choose “A leg”: √(5² − 1.25²) = √23.4375 = 4.841229 m up the wall, with the ladder at 75.5225° to the ground. The UK Health and Safety Executive’s guidance (INDG455) asks for about 75°, which it describes as 1 unit out for every 4 units up – here 1.25 m out for 4.84 m up is close to that.

Exact answers and radicals

When the sum under the root is a whole number that is not a perfect square, the calculator gives the simplified radical as well as the decimal. A leg of 8 with a hypotenuse of 12 leaves √80; because 80 = 16 × 5, that is 4√5 ≈ 8.944272. A square plot 20 m on each side has a diagonal of √800 = 20√2 ≈ 28.284271 m. Exam questions that say “leave your answer in surd form” want the 4√5, not the decimal.

Pythagorean triples

Whole-number right triangles all come from two whole numbers m > n: the sides are m² − n², 2mn and m² + n², or a multiple of those.

m, na = m² − n²b = 2mnc = m² + n²Check
2, 13459 + 16 = 25
3, 25121325 + 144 = 169
4, 115817225 + 64 = 289
4, 37242549 + 576 = 625
5, 2212029441 + 400 = 841

Rules that change the answer

  • Which side is c. The hypotenuse is opposite the right angle. Legs of 5 and 13 give 13.928388; a leg of 5 with a hypotenuse of 13 gives 12.
  • Units. All sides must be in the same unit. 120 cm and 1.6 m entered as 120 and 1.6 give nonsense; 1.2 and 1.6 give 2.
  • A real right angle. If the corner is not 90°, the theorem’s answer is wrong by an amount that grows with the error – the check mode measures it.
  • Rounding. Square the full measurements and round only the final answer; rounding 5.762812 to 5.8 before the 3D step gives 6.53 m instead of 6.50 m.

Common mistakes

  • Adding the sides before squaring: √(3 + 4) = 2.65, not 5.
  • Forgetting the last square root and reporting c² = 25 as the length.
  • Adding when finding a leg – the leg needs c² minus a².
  • Testing a right angle with the longest side as a leg. The calculator sorts the sides for you, so the order you type them in doesn’t matter.

When to get help

For setting out a building, a boundary wall or anything recorded on a site plan, the measurement that counts is a licensed surveyor’s – a tape-and-triangle check is for your own confidence. For ladders, follow the safety guidance for your workplace. For homework, the step-by-step working shows the method, so copy the steps rather than just the number.

Frequently asked questions

How do you find the hypotenuse?

Square both legs, add them and take the square root: c = √(a² + b²). A 4.5 m × 3.6 m room measures √(20.25 + 12.96) = √33.21 = 5.76 m from corner to corner.

How do you find a missing leg of a right triangle?

Subtract instead of adding: b = √(c² − a²). With a hypotenuse of 12 and a leg of 8, b = √(144 − 64) = √80 = 4√5 ≈ 8.944272. Choose “A leg” in the Solve for menu.

Which side is the hypotenuse?

The side opposite the right angle – always the longest of the three. Mixing it up changes the answer completely: legs of 5 and 13 give a hypotenuse of 13.93, while a leg of 5 and a hypotenuse of 13 give a second leg of 12.

Does the Pythagorean theorem work for any triangle?

No – only when one angle is exactly 90°. For other triangles the law of cosines adds a correction term, c² = a² + b² − 2ab·cos C, which is zero at 90°. Sides 6, 7 and 9 fail the test (36 + 49 = 85, not 81), and the angle opposite 9 is 87.27°.

How do you check whether three sides make a right triangle?

Use the converse (Euclid, Elements I.48): square the two shorter sides and add them. If the total equals the longest side squared, the angle is 90° – 20, 21 and 29 pass because 400 + 441 = 841 = 29². A smaller total means an obtuse corner, a larger one an acute corner.

How do builders use 3-4-5 to set out a right angle?

Mark 3 units along one line and 4 along the other; the diagonal between the marks must be exactly 5. Any multiple works – 0.6, 0.8 and 1 m, or 6, 8 and 10 m. A 5.02 m diagonal on 3 m and 4 m means 90.48°; 4.97 m means 89.29°.

What are Pythagorean triples?

Whole numbers that fit a² + b² = c² exactly, such as 3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29. Multiples work too (6-8-10), and every triple comes from m² − n², 2mn and m² + n², times a whole number – m = 3, n = 2 gives 5-12-13.

How long is the diagonal of a square?

Side × √2. A 20 m × 20 m plot has a diagonal of √(400 + 400) = √800 = 20√2 ≈ 28.284271 m – about 1.414 times the side, whatever the size.

What changed

  • – Page fully reviewed and a right-angle check added: enter three measured sides to see whether the corner is 90°, the actual angle (law of cosines) and the length a true right angle needs. Results now also show the height to the hypotenuse; key rules, six scenarios, a triples table and common mistakes added.

Sources

Last reviewed: · Reviewed by Chelsea, CalcBright's animated guide, for the CalcBright editorial team · How we check our numbers