Math / calculator
Pythagorean Theorem Calculator
Find a missing right-triangle side using a²+b²=c². Enter two positive lengths and leave one blank; hypotenuse c must exceed the known leg.
Calculator
Calculator
Solve the missing right-triangle side.
Enter exactly two lengths and leave one empty. c is the hypotenuse; a and b are perpendicular legs. Use the same unit for all entered lengths.
Your result
Enter details to see the result.
Complete the inputs and calculate to see the main result and its supporting breakdown.
Example
Worked example
Example inputs
- Leg a
- 3
- Leg b
- 4
Calculation breakdown
a²+b²=c². Missing hypotenuse c=√(a²+b²), evaluated with hypot. A missing leg a=√[(c−b)(c+b)] or b=√[(c−a)(c+a)]; c must exceed the known leg.
- Solved side
- c
Example result
Missing length
5
Same length unit as the supplied sides; valid only for a right triangle.
How to interpret the result
The missing side is expressed in the same unit as your known sides. A leg calculation requires a longer hypotenuse, and the output does not establish that an actual measured triangle has a perfect right angle.
How to use this calculator
- Identify the hypotenuse c and perpendicular legs a and b.
- Enter exactly two positive lengths in the same unit and leave the missing side blank.
- Calculate the unknown length; correct the side labeling if the hypotenuse is not longer than the known leg.
How it works
Formula
a²+b²=c². Missing hypotenuse c=√(a²+b²), evaluated with hypot. A missing leg a=√[(c−b)(c+b)] or b=√[(c−a)(c+a)]; c must exceed the known leg.
How do I find a missing right-triangle side?
For the hypotenuse, take the square root of the two leg squares added together. For a leg, subtract the known leg’s square from the hypotenuse’s square before taking the root. The hypotenuse must be longer than the known leg.
What this calculator does
The Pythagorean theorem applies to a right triangle. Its hypotenuse c lies opposite the right angle and is longer than either perpendicular leg. Leave exactly one side empty so the problem has one clear unknown.
Who this is useful for
Learners calculating one unknown length in a right triangle with explicit hypotenuse labeling and validation of exactly two known sides.
Inputs you will need
Required or selected inputs
Optional inputs
- Leg a
- Leg b
- Hypotenuse c
Assumptions
- The triangle contains a right angle and a/b are the perpendicular legs.
- Two positive side lengths share one unit; exactly one of a, b and c is omitted.
Limitations
- The theorem does not solve an arbitrary non-right triangle or confirm that a measured angle is exactly 90 degrees.
- Impossible hypotenuse/leg combinations and values outside the supported numeric range are rejected. Displayed irrational lengths are approximations.
Useful next steps
Solve a general triangle using sides and angles with Triangle Calculator.
Calculate the rise-to-run relation of coordinate legs with Slope Calculator.
References
OpenStax: sine law, cosine law and Heron's formula — Reference equations for planar triangles; right-triangle lengths also use the Pythagorean theorem.
See how HandyChest handles units, validation, rounding, and testing, or Report a problem with this calculator.
Good to know
Frequently asked questions
Which side is c?
c is the hypotenuse opposite the right angle. Naming a shorter side c makes the missing-leg calculation impossible; a and b are interchangeable perpendicular legs.
Keep going