Hypotenuse Calculator - Pythagorean Theorem Step Solver
Use this hypotenuse calculator to compute c from two legs or recover a missing leg from c plus the other leg, with the Pythagorean theorem and step math.
Hypotenuse Calculator
Results
What Is a Hypotenuse Calculator?
A hypotenuse calculator is a focused Pythagorean-theorem tool that finds the longest side of a right triangle from the two legs, or recovers a missing leg from the hypotenuse and the other leg. It returns the hypotenuse, the two acute angles, the area, and the perimeter so a single problem is finished in one pass instead of three separate formulas.
- • Geometry homework and right triangles: Confirm a problem that asks for the hypotenuse or a missing leg, including the 3-4-5 and 5-12-13 triples.
- • Carpentry and construction layout: Compute the diagonal of a rectangular frame, a stair stringer, or a rafter from two measured sides.
- • Roof pitch and rafter length: Convert a measured run and rise into the rafter length, which is the hypotenuse of the right triangle the slope makes with the horizontal.
- • Screen and pixel distance: Measure the straight-line distance between two corners of an image or layout using their horizontal and vertical separation as the two legs.
The page is intentionally narrow: the hypotenuse problem is the case where the right angle is known and only the longest side is missing. If you also need the angles of an arbitrary triangle, the right triangle calculator in the same category is the broader tool.
The 3-4-5 example is a Pythagorean triple, and the Pythagorean Triples Calculator page generates and verifies every integer triple up to a chosen limit so you can spot the clean answers in any problem.
How the Hypotenuse Calculator Works
The page implements the Pythagorean theorem in both directions. In hypotenuse mode it squares the two legs and takes the square root of the sum. In leg mode it squares the hypotenuse, subtracts the square of the known leg, and takes the square root of the result.
- a: Length of leg a, one of the two sides that meet at the right angle.
- b: Length of leg b, the other side that meets at the right angle.
- c: Length of the hypotenuse, the side opposite the right angle.
- a^2 + b^2: Sum of the squares of the two legs. The hypotenuse squared equals this sum, so c^2 = a^2 + b^2.
- sqrt(...): The principal (non-negative) square root, which gives the positive length of the missing side.
The two acute angles come from arctan of the opposite leg divided by the adjacent leg. Angle at the end of leg a is arctan(b / a) and angle at the end of leg b is arctan(a / b); together they always sum to 90 degrees for a valid right triangle.
Worked example: the 3-4-5 right triangle
Mode: Hypotenuse. Leg a = 3, Leg b = 4.
a^2 + b^2 = 3^2 + 4^2 = 9 + 16 = 25. c = sqrt(25) = 5.
Hypotenuse c = 5 units. Perimeter = 12, area = 6, angle A = 53.13°, angle B = 36.87°.
The result is a clean integer because (3, 4, 5) is a Pythagorean triple.
According to Encyclopaedia Britannica, in any right triangle the square of the hypotenuse equals the sum of the squares of the two legs, so c = sqrt(a^2 + b^2).
If you need to solve a right triangle from any two values, including cases where one of the inputs is an angle, the Right Triangle Calculator page does the broader job using the same Pythagorean theorem plus sine, cosine, and tangent.
Key Concepts Behind the Hypotenuse Formula
Four ideas explain why the formula is what it is and how the hypotenuse behaves in the rest of the triangle.
Right triangle
A triangle with exactly one 90 degree angle. The two sides forming that right angle are the legs, and the third side, opposite the right angle, is the hypotenuse.
Pythagorean theorem
In any right triangle, c squared equals a squared plus b squared. The theorem gives a clean way to recover c from a and b, or to recover one leg from c and the other leg.
Pythagorean triple
A set of three positive integers (a, b, c) that satisfy c^2 = a^2 + b^2. The smallest is 3-4-5; others include 5-12-13, 8-15-17, and 7-24-25, plus any multiple of those.
Acute angles and their sum
The two non-right angles are always acute and sum to 90 degrees. Angle at the end of leg a is arctan(b / a) and angle at the end of leg b is arctan(a / b).
If you find yourself applying the same formula to two arbitrary points on a coordinate plane, the underlying idea is the same: the 2D distance formula is the Pythagorean theorem with the two leg differences played by Δx and Δy.
The same c = sqrt(a^2 + b^2) idea is the engine behind the distance between two points, and the 2D Distance Calculator page applies it to coordinate points with the horizontal and vertical separation playing the role of the two legs.
How to Use This Hypotenuse Calculator
Five short steps cover both modes, from the classic 3-4-5 textbook case to a leg mode problem where the hypotenuse is known.
- 1 Pick the solve-for mode: Choose Hypotenuse to find c from two legs, or Leg to recover a missing leg from c and the other leg.
- 2 Enter the leg lengths: Type the lengths of the two legs in any same unit. The defaults of 3 and 4 form the 3-4-5 right triangle.
- 3 Enter the hypotenuse in leg mode: In leg mode, type the length of c. Leave this field at its default in hypotenuse mode.
- 4 Read the hypotenuse and the supporting values: The primary output is c (or the recovered leg in leg mode). The panel also shows both legs, the perimeter, the area, and the two acute angles.
- 5 Reset or change units if needed: Click Reset to return to the 3-4-5 example. Use the Distance Converter to change the unit of the answer.
Try the 5-12-13 triple: enter a = 5 and b = 12 in hypotenuse mode. The calculator returns c = 13, perimeter = 30, area = 30, angle A = 67.38°, and angle B = 22.62°. Switch to leg mode and enter c = 13, b = 5 to recover a = 12.
The right triangle area shown in the results panel uses (a x b) / 2, and the Triangle Area Calculator page handles the same area calculation for non-right triangles where the base and height are not the two legs.
Benefits of Using This Hypotenuse Calculator
These benefits matter most when you are solving a problem by hand and want a quick, trustworthy check.
- • Skip the arithmetic mistakes: Squaring two numbers and adding them is the most error-prone step. The calculator handles that step and reports the result to four decimals.
- • Switch between hypotenuse and leg: Most homework problems give two legs and ask for c; some give c and one leg and ask for the other. The same page handles both.
- • See the full triangle at once: Both acute angles, the area, and the perimeter come back with the hypotenuse, so a follow-up question does not need a second calculator.
- • Handle any unit consistently: The result is in the same unit as the inputs, so the page works in centimeters, meters, feet, inches, or pixels. The Distance Converter on the result changes the unit.
- • Connect to the rest of geometry: If the next step is the integer triple behind a clean answer, or a full triangle solve, the peer calculators in the same category are linked from each section.
The page is most useful as a check, not as a replacement for understanding the formula. Use it to confirm a homework answer, to verify a rafter or diagonal measurement on the job, or to recover a missing leg in a design problem where the hypotenuse was the easier number to measure.
If the result comes back in generic units and you need meters, feet, inches, or pixels, the Distance Converter page changes the unit of the answer without re-entering the legs.
Factors That Affect the Hypotenuse Result
The Pythagorean theorem is the same in every case, but a few factors change how the result should be read and what counts as a valid input.
Which leg is which
The hypotenuse only depends on a squared plus b squared, so swapping a and b leaves c, the area, and the perimeter unchanged. The two acute angles swap, because angle A depends on the leg at the end of vertex A.
Unit of the inputs
The result is in the same unit as the legs. If a and b are in centimeters, c is in centimeters. Use the Distance Converter to change the unit to meters, feet, inches, or pixels.
Isosceles right triangle (a = b)
When the two legs are equal, c = a * sqrt(2) and both acute angles are 45 degrees. If the two acute angles are not 45 degrees, the legs were not actually equal.
Leg mode and the hypotenuse must be longest
In leg mode the calculator rejects c values that are not strictly greater than the known leg. The hypotenuse is, by definition, the longest side, so a c that is shorter than the other leg means the inputs are inconsistent.
- • The formula is exact only for right triangles. For a non-right triangle, the hypotenuse as the longest side does not always hold and the Pythagorean theorem does not apply; use the general triangle solver in the same category.
- • The calculator uses the principal (non-negative) square root, so a negative leg is treated as an invalid input rather than producing a complex number. Lengths in real geometry are always non-negative.
- • Decimal precision is limited to four displayed digits. For engineering work that needs more decimals, run the formula directly with a tool that supports higher precision.
According to Wolfram MathWorld, for a right triangle with legs a and b the hypotenuse satisfies c^2 = a^2 + b^2, which gives c = sqrt(a^2 + b^2).
According to Khan Academy, the Pythagorean theorem says that in a right triangle with legs a and b the hypotenuse c is the square root of a squared plus b squared, and the converse is also used to recover a missing leg.
For a triangle that is not right-angled, the hypotenuse formula does not apply, and the Triangle Calculator page solves for the unknown side and angles using the law of sines and cosines instead.
Frequently Asked Questions
Q: What is the formula for the hypotenuse of a right triangle?
A: The formula is c = sqrt(a^2 + b^2). Square the two legs a and b, add the squares, and take the square root of the sum to get the hypotenuse c. For a missing leg, use a = sqrt(c^2 - b^2).
Q: How do I find the hypotenuse of a right triangle?
A: Type the two legs (a and b) into the calculator in any same unit, leave the Solve for selector on Hypotenuse, and read the result c. The page also returns the perimeter, the area, and the two acute angles for the same triangle.
Q: Can a hypotenuse calculator find a missing leg too?
A: Yes. Switch the Solve for selector to Leg, type the hypotenuse c and the known leg, and the calculator returns the missing leg with the same perimeter, area, and acute angles it returns in hypotenuse mode.
Q: Is the hypotenuse always the longest side of a right triangle?
A: Yes. The hypotenuse is the side opposite the 90 degree angle, and the Pythagorean theorem c^2 = a^2 + b^2 forces c to be at least as long as either leg. For this reason, the calculator rejects a leg mode input where c is not strictly greater than the known leg.
Q: What units does the hypotenuse calculator use?
A: The calculator is unit-agnostic: it returns the hypotenuse in the same unit as the legs. If the legs are in centimeters the result is in centimeters; if the legs are in feet the result is in feet. Use the Distance Converter in the same category to change the unit of the answer.
Q: How accurate is the hypotenuse calculator?
A: The underlying formula is exact, and the page rounds the result to four decimal places. Any small difference between the displayed answer and a manual calculation comes from rounding the final number for display, not from an approximation in the math itself.