To find a missing leg b in a right triangle, use b = √(c² − a²). This is the Pythagorean theorem, a² + b² = c², rearranged so that the unknown leg is isolated.

The calculation requires two known lengths: a, the leg you already have, and c, the hypotenuse. The method applies only to a right triangle, and the hypotenuse must be longer than either leg. Identifying the sides by their roles is therefore just as important as performing the arithmetic.

how to find pythagorean theorem when b is missing
Pythagorean Theorem Missing-Leg Examples and Checks

Locate B’s Role in the Triangle

In standard notation, a and b are the two legs that meet at the 90° angle. The hypotenuse, labeled c, lies opposite that angle and is the longest side. When b is missing, a is the known leg and c is the known hypotenuse. If a diagram uses different letters, relabel the sides according to their roles rather than relying on the letters alone.

Known side information Missing value Formula
Both legs a and b Hypotenuse c c = √(a² + b²)
Hypotenuse c and leg a Leg b b = √(c² − a²)
Hypotenuse c and leg b Leg a a = √(c² − b²)

The middle row applies when b is missing. For a broader reference covering each possible missing side, see How to Solve the Pythagorean Theorem for a Right Triangle.

Rearrange the Formula

Begin with the Pythagorean theorem:

a² + b² = c²

Subtract a² from both sides to isolate the square of the unknown leg:

b² = c² − a²

Taking the square root gives:

b = √(c² − a²)

A square root has both a positive and a negative result, but only the positive root can represent the length of a triangle side. This is why the side formula is written with the positive square root.

Calculate the Missing Leg

  1. Confirm the triangle and label its sides. Locate the 90° angle. The side opposite it is the hypotenuse c, which must be longer than both legs. The known leg a and missing leg b meet at the right angle. If a diagram labels a leg as c, correct the labels before continuing.
  2. Confirm the units. Make sure the known hypotenuse and known leg are measured in the same unit. Squaring and subtracting the measurements does not convert them, so the missing length will use that same unit.
  3. Substitute the known lengths. Replace c with the hypotenuse measurement and a with the known leg measurement in b = √(c² − a²).
  4. Square and subtract. Calculate c² − a² before taking the square root. The expression is the difference between two squared lengths, not the square of the difference between the lengths.
  5. Take the positive square root. Use the positive result for b because a physical side cannot have a negative length.
  6. Check the result. The missing leg should be shorter than the hypotenuse. Substitution into a² + b² = c² should also reproduce the square of the known hypotenuse.

Work a 5-12-13 Example

Suppose the known leg is a = 5 units and the known hypotenuse is c = 13 units, while b is missing.

Substitute those values into the rearranged formula:

b = √(c² − a²) = √(13² − 5²) = √(169 − 25) = √144 = 12

The missing leg is therefore b = 12 units. Check the answer by placing it back into the original theorem:

5² + 12² = 25 + 144 = 169 = 13²

The result is consistent because the square of the hypotenuse equals the sum of the squares of the two legs.

Try a Scaled 3-4-5 Example

The same method works when a familiar right triangle has been scaled. Consider a triangle with a known leg of 9 units, a hypotenuse of 15 units, and an unknown leg.

b = √(15² − 9²) = √(225 − 81) = √144 = 12

The missing side is 12 units, producing the 9-12-15 triangle. This is a multiple of the classic 3-4-5 triangle: scaling all three sides by three preserves the relationship because 3² + 4² = 5² becomes 9² + 12² = 15².

Other familiar Pythagorean triples include 5-12-13 and 8-15-17. Entering their side values provides a useful way to check that a calculation is producing the expected result.

Run the Missing-Leg Calculation

For a direct calculation, use the Pythagorean Theorem Calculator. Choose the option for finding a missing leg, enter the known hypotenuse and known leg into the two input boxes, and read the solved side.

If the two known values are both legs, choose the hypotenuse option instead. You cannot isolate b from two leg measurements alone because the hypotenuse has not yet been found. The calculator handles both cases by using the appropriate version of the theorem.

A formula line shows the relationship used in the calculation, such as c = √(a² + b²). This makes it possible to follow the mathematical basis of the answer instead of relying on an unexplained number.

Once all three sides are known, the calculator also reports the area, perimeter, and both acute angles. The area is calculated as ½ · a · b, the perimeter as a + b + c, and the angles are worked out using the arctangent. Because the two acute angles in a right triangle are complementary, they add up to 90°.

An important side-order check is built into the tool: the hypotenuse must be greater than either leg. If the entered hypotenuse would be shorter than a leg, the calculator flags the input as impossible. In that situation, recheck the measurements and confirm which side is opposite the right angle.

Every result updates whenever an input changes, making it easy to compare different values without recalculating from scratch. Numbers are rounded to a readable number of decimal places while retaining enough precision to verify exact Pythagorean triples. All calculations are performed privately in your browser, with nothing uploaded.

Why Side Order Controls the Result

The hypotenuse is not simply whichever side happens to be labeled c. It is the side opposite the 90° angle. Since a and b are positive lengths, a² + b² is greater than either square by itself. Taking the positive square root shows why c must be greater than both a and b.

The rearrangement also has a direct geometric meaning. Subtracting a² from c² leaves b², and taking the square root reverses the squaring operation. The positive root gives the possible side length, while the negative root does not describe a physical segment.

Check the Setup Before You Trust the Answer

Review these details whenever a result looks unusual:

  • Confirming the right angle: The Pythagorean theorem assumes a right triangle. It does not establish that an arbitrary triangle has a 90° angle.
  • Confusing the hypotenuse with a leg: The hypotenuse must be opposite the right angle and must be the longest side.
  • Subtracting before squaring: The expression is c² − a², not c − a placed inside a square root.
  • Taking the negative root: A side cannot have a negative length, so only the positive square root is valid.
  • Mixing measurement units: Both known lengths must use the same unit before they are squared and subtracted.
  • Failing to verify the result: Substitute the missing side into a² + b² = c² and check that both sides agree.

When the Theorem Does Not Apply

The Pythagorean theorem works only for right triangles. For a non-right triangle, use the Law of Cosines instead:

c² = a² + b² − 2ab · cos(C)

Here, C is the included angle between a and b. When C is 90°, cos(C) is zero, so the Law of Cosines reduces to the Pythagorean theorem. The calculator is designed for right triangles rather than general triangles, so confirm that the original figure has a right angle before relying on its result. Its hypotenuse-length check can identify impossible side ordering, but it cannot replace checking the shape of the triangle.

Where the Missing-Leg Formula Helps

The formula is useful whenever a known straight-line distance provides the hypotenuse and one perpendicular distance provides a known leg.

  • Construction and layout: Find one leg of a diagonal when the overall diagonal and the other offset are known. This can help when squaring up walls or checking right-angle layouts.
  • Navigation and surveying: Recover one perpendicular distance component from a known straight-line distance and the other component. For example, a direct distance and an east-west displacement can be used to find the north-south displacement.
  • Screen and rectangle dimensions: Determine a missing width or height from a display’s diagonal and its other dimension. A television or monitor size refers to the diagonal, which is the hypotenuse of the rectangular measurement triangle.
  • Coordinate geometry: Connect horizontal and vertical changes to a direct distance using the same side relationship. This principle also underlies distance calculations used in game development.