Skip to the calculator
Rule Calculator

Pythagorean Theorem Calculator

With leg a 3, leg b 4, pythagorean theorem comes to 5.0000 — missing side. It is reached in 9 steps, the last of which is solve_for_hypotenuse ? from_legs : from_hypotenuse, and each one is printed on the page with its numbers filled in. The formula is the one published by Wolfram MathWorld, not an approximation fitted to it.

Solves a² + b² = c² in either direction — the hypotenuse from two legs, or the missing leg from a leg and the hypotenuse — with the squares shown.

Formula and sources checked · How we check

What is missing The hypotenuse c, Leg a 3, Leg b 4

5.0000

Missing side for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.

It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.

Missing side
5.0000
Missing side
5
a²
3 * 39
b²
4 * 416
c² — and a² + b² equals it
5 * 525
Area of the triangle
3 * 4 / 26
Perimeter
3 + 4 + 512
Angle opposite a
atan(3 / 4) * 180 / pi36.87 °
Angle opposite b
90 - 36.86989853.13 °
How far the hypotenuse is from a whole number
abs(5 - round(5))0

Ask about this in the chat

Worked example

The 3-4-5 triangle: 9 + 16 = 25, so the hypotenuse is exactly 5. It is the smallest triangle with three whole-number sides, which is why builders use it to square a corner — measure 3 along one wall, 4 along the other, and the diagonal reads 5 only if the corner is true.

How to work it out yourself

  1. 1.Identify the hypotenuse first: it is opposite the right angle and always the longest side. Everything else follows from putting the right number in the right place.
  2. 2.Square the two known sides, add or subtract, then take the square root. Adding gives the hypotenuse; subtracting the smaller square from the larger gives the missing leg.
  3. 3.To square a corner on site, measure 3 units along one edge and 4 along the other. If the diagonal between the marks is not 5, the corner is not 90°. Multiples work as well and measure more accurately — 6-8-10, or 12-16-20 for a room.
  4. 4.The theorem only holds for right triangles. With three known sides and no right angle you need the law of cosines instead.

Hypotenuse when leg a is 3

06.212.41 Leg b: 3.22 Leg b: 3.63 Leg b: 4.24 Leg b: 55 Leg b: 5.86 Leg b: 6.77 Leg b: 7.68 Leg b: 8.59 Leg b: 9.510 Leg b: 10.411 Leg b: 11.412 Leg b: 12.4112Leg b
Hypotenuse when leg a is 3
Leg bMissing sideHow far the hypotenuse is from a whole number
13.16230.16
23.60560.39
34.24260.24
45.00000
55.83100.17
66.70820.29
77.61580.38
88.54400.46
99.48680.49
1010.44030.44
1111.40180.4
1212.36930.37

Only b = 4 gives a whole-number hypotenuse here. Whole-number triples are rare, which is what makes 3-4-5 worth memorising.

The formula

  1. Missing side
  2. a²3 * 3
  3. b²4 * 4
  4. c² — and a² + b² equals it5 * 5
  5. Area of the triangle3 * 4 / 2
  6. Perimeter3 + 4 + 5
  7. Angle opposite aatan(3 / 4) * 180 / pi
  8. Angle opposite b90 - 36.869898
  9. How far the hypotenuse is from a whole numberabs(5 - round(5))

Source: Wolfram MathWorld — Pythagorean theorem, Euclid, Elements, Book I, Proposition 47

Questions people actually ask

What is the Pythagorean theorem?
In a right triangle, the square on the hypotenuse equals the sum of the squares on the other two sides: a² + b² = c². It holds in every right triangle and in no other kind, which is why it doubles as a test for a right angle.
How do I find a leg instead of the hypotenuse?
Subtract instead of adding: b = √(c² − a²). Switch the mode above and the working shows the same three squares in the other order. If the leg you enter is longer than the hypotenuse there is no such triangle, and the answer comes back as zero rather than an error.
What are the common Pythagorean triples?
3-4-5, 5-12-13, 8-15-17, 7-24-25 and 9-40-41, plus every multiple of each. They are the only right triangles whose three sides are all whole numbers at that size, which is why the same handful appears in every textbook and on every framing square.
Does it work in three dimensions?
Yes, applied twice: the diagonal of a box is √(l² + w² + h²). Measuring whether a room is square, or whether a crate fits through a door, is the same theorem run once on the floor and once up the side.

Related

Put this calculator on your site

Free, no attribution required beyond the link.

<iframe src="https://rulecalculators.com/embed/pythagorean-theorem" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="Pythagorean Theorem Calculator"></iframe>
Did this answer your question?