ThisCalculator

Math

Right Triangle Calculator: Find x Value

Updated · Standard formula, shown below

Missing side (x) 5.00 m
Side a
3 m
You entered
Side b
4 m
You entered

Right Triangle Calculator: Find x Value

This calculator finds the missing side length (x) of a right triangle when you enter the other two side lengths. You input the values of any two sides (legs or hypotenuse) in any unit, and it returns the third side using the Pythagorean theorem. The result is given in the same unit you entered, with the option to see it in both metric and US customary units.

Formula

The core formula is the Pythagorean theorem: a² + b² = c²

Where:

  • a and b are the lengths of the two legs (the sides that form the right angle), in meters (or any consistent unit).
  • c is the length of the hypotenuse (the side opposite the right angle), in the same unit.

To find a missing side, rearrange the formula:

  • If the missing side is the hypotenuse (c): c = √(a² + b²)
  • If the missing side is a leg (a or b): a = √(c² – b²) or b = √(c² – a²)

All sides must be in the same unit before calculating. The calculator assumes you enter consistent units (e.g., both in meters, both in feet).

Worked Example

Using the default values: side a = 3 m, side b = 4 m. We want to find the hypotenuse x.

  1. Write the formula: x = √(a² + b²)
  2. Substitute the values: x = √(3² + 4²)
  3. Square each: x = √(9 + 16)
  4. Add: x = √25
  5. Take the square root: x = 5 m

The calculator gives the same result: x = 5.00 m. This is the classic 3-4-5 triangle, a common example in geometry.

When to Use This Calculator

You need to find a missing side of a right triangle whenever you know two sides and the triangle has a 90° angle. Common real-world situations include:

  • Construction: checking if a corner is square (a 3-4-5 method).
  • Ladder problems: finding how high a ladder reaches on a wall.
  • Ramps and inclines: calculating the length of a ramp given rise and run.
  • Navigation and surveying: finding direct distances between two points.
  • Physics: resolving vector components.

If you don’t have a right angle, this calculator won’t work. You would need the law of cosines or the law of sines instead.

How to Read the Result

The result is the length of the missing side in the same unit you entered. For example, if you enter sides in feet, the result is in feet. If you enter in centimeters, the result is in centimeters. The calculator rounds to two decimal places by default. For most practical purposes, that’s enough precision. For very precise work, you can increase the decimal places in the output settings.

Remember that the hypotenuse is always the longest side. If your calculated hypotenuse is shorter than one of the legs, you’ve likely mixed up which side is which. Double-check that you entered the legs for a and b, and the hypotenuse for c.

Common Mistakes and Misconceptions

Here are the most frequent errors people make when finding x in a right triangle:

  • Mixing units: Entering one side in meters and the other in feet. Always convert to the same unit first.
  • Confusing legs and hypotenuse: Remember the hypotenuse is opposite the right angle and is always the longest side. If you’re solving for a leg, you must subtract the square of the known leg from the square of the hypotenuse, not add.
  • Forgetting to square root: After adding or subtracting the squares, you must take the square root to get the side length, not the squared length.
  • Assuming any triangle is right: The Pythagorean theorem only applies to triangles with a 90° angle. If you’re not sure, check for a square corner or use the law of cosines.
  • Rounding too early: If you round intermediate values, your final answer may be off. Keep full precision until the final step.

Limitations of the Formula

The Pythagorean theorem is exact for perfect right triangles, but real-world measurements always have some error. The calculator gives a mathematically precise answer based on the numbers you enter, but if your measurements are approximate, the result is also approximate. Also, the formula only works in Euclidean (flat) geometry. On a curved surface, like the Earth’s surface for very large distances, the relationship changes.

For triangles that are not right, you cannot use this calculator. You would need to use the law of cosines: c² = a² + b² – 2ab·cos(C), where C is the angle between sides a and b. Or the law of sines if you know angles and one side.

Frequently Asked Questions

Can I use this calculator to find an angle?

No, this calculator only finds side lengths. To find angles, you’d use trigonometric functions (sine, cosine, tangent). For example, if you know the opposite and adjacent sides, the angle is tanâ�»Â¹(opposite/adjacent).

What if I only know one side and one angle?

You need two pieces of information to solve a right triangle. If you have one side and one acute angle, you can use trigonometry (SOH-CAH-TOA) to find the other sides. For instance, if you know the hypotenuse and an angle, the opposite side = hypotenuse × sin(angle).

Does it matter which side is a and which is b?

No, for finding the hypotenuse, a and b are interchangeable. The formula adds their squares, so order doesn’t matter. But if you’re solving for a leg, make sure you enter the hypotenuse as the value you subtract from.

What is the 3-4-5 rule?

The 3-4-5 rule is a practical application of the Pythagorean theorem. If two sides of a triangle measure 3 and 4 units, and the third side measures 5 units, the triangle is a right triangle. Builders and carpenters use this to check if corners are square by measuring 3 feet along one wall, 4 feet along the other, and adjusting until the diagonal is exactly 5 feet.

Can I enter negative numbers?

No, side lengths are always positive. The calculator is set to reject negative inputs because they don’t make sense for lengths. If you get a negative result, you’ve likely made an error in your input.

Why does the calculator show only two decimal places?

The default is two decimal places for readability, but you can change the precision in the output settings to show more decimal places if you need greater accuracy.

Related

Formula used
in a | Side a | m | 3 | 0
in b | Side b | m | 4 | 0
out x | Missing side (x) | m | sqrt(a^2 + b^2) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.