The calculator uses the Pythagorean theorem formula, a2 + b2 = c2, where a and b are the two legs that meet at the right angle and c is the hypotenuse, the side opposite the right angle. Give it any two of the three lengths and it rearranges the formula, substitutes your numbers and shows the arithmetic line by line, so you can check your homework rather than just copy an answer.
How to use the calculator
- Find the right angle. The two sides that touch it are the legs, a and b. The side across from it is the hypotenuse, c, and it is always the longest side. Not sure which is which? See parts of a right triangle.
- Type the two lengths you know into their boxes and leave the third box empty. Two legs give you the hypotenuse; the hypotenuse and one leg give you the other leg.
- Pick units and rounding if you want them. Units are only labels — both lengths must already be in the same unit before you enter them.
- Read the result. You get the exact value (for example 5√2), the rounded decimal, the full working, the area, the perimeter and both acute angles.
Change any box and everything updates instantly. The calculator always treats the two boxes you edited most recently as the known sides, so you can switch from "find c" to "find a" just by typing in a different box.
The three formulas behind it
There is one theorem but three ways to use it, depending on which side is missing. Each version is the same equation solved for a different letter:
c= √a2 + b2 (missing hypotenuse)a= √c2 − b2 (missing leg a)b= √c2 − a2 (missing leg b)The rule of thumb is simple: the hypotenuse is the longest side, so its square is the biggest number. Adding squares makes things bigger, which is what you want for c; subtracting makes them smaller, which is what you want for a leg. If you ever subtract and get zero or a negative number, the "hypotenuse" you entered is not actually the longest side — the calculator flags that instead of returning nonsense.
Worked examples
Example 1: find the hypotenuse
The legs are 6 cm and 8 cm. Enter 6 and 8 in boxes a and b.
The hypotenuse is 10 cm. (6-8-10 is the 3-4-5 triangle doubled.)
Example 2: find a missing leg
A right triangle has hypotenuse 17 and one leg 8. Enter 17 in box c and 8 in box b.
The other leg is 15. The sides 8, 15, 17 form a Pythagorean triple.
Example 3: an answer that is a radical
The legs are 2 and 3.
c2= 22 + 32 = 4 + 9 = 13c= √13 ≈ 3.6056Because 13 is not a perfect square, the exact answer is √13. Most teachers want this exact form unless the question asks you to round.
Example 4: simplifying the radical
The legs are 5 and 5 (an isosceles right triangle).
c2= 25 + 25 = 50c= √50 = √25 · 2 = 5√2 ≈ 7.0711The calculator simplifies √50 to 5√2 automatically. See square roots and radicals for the method, or the 45-45-90 triangle for the shortcut.
Example 5: decimals
The legs are 2.5 m and 6 m.
c2= 2.52 + 62 = 6.25 + 36 = 42.25c= √42.25 = 6.5The hypotenuse is exactly 6.5 m. Decimals work the same way as whole numbers — square carefully and don't round until the last step.
Want more? The worked examples page has fifteen more, and the word problems page shows how to turn ladders, ramps and TV screens into right triangles.
What you can type
| You type | The calculator reads |
|---|---|
7, 7.25, 1,250 | Ordinary numbers, with or without thousands separators |
3/4 | The fraction 3 over 4 = 0.75 |
√2 or sqrt(2) | √2 ≈ 1.4142 |
2√3 or 2 sqrt 3 | 2√3 ≈ 3.4641 |
Being able to enter roots matters more than it sounds. In multi-step problems the answer to one triangle often becomes a side of the next — for example the diagonal of a box — and typing √41 instead of 6.403 keeps the final answer exact.
Exact answers, decimals and rounding
The calculator shows up to three kinds of answer, depending on the numbers:
- A whole number or terminating decimal when c2 is a perfect square, as in √25 = 5 or √42.25 = 6.5. This is the exact answer.
- Simplest radical form plus a decimal when it isn't, as in √50 = 5√2 ≈ 7.0711. The radical is exact; the decimal is rounded.
- A rounded decimal only when the inputs are decimals that don't produce a tidy radical, such as legs of 2.3 and 4.1.
Choose the rounding with the Round to menu. In measurement problems, round to the precision of your inputs: lengths measured to the nearest tenth of a meter deserve an answer to the nearest tenth. For more on this, see simplifying square roots.
Check that the answer makes sense
A quick sanity check catches most typing mistakes:
- The hypotenuse must be longer than each leg.
- The hypotenuse must be shorter than the two legs added together (the shortcut across a corner is always shorter than walking round it).
- If the two legs are equal, c is about 1.414 times a leg; if one leg is tiny, c is only a little longer than the other leg.
These checks, and other slips such as squaring the sum instead of summing the squares, are covered on the common mistakes page.
Share or bookmark a calculation
The page address updates as you type, so you can copy it to share a problem. For example, this link opens the calculator with c = 13 and b = 5, ready to show that a = 12. Teachers can use this to send students a pre-filled example.
More right-triangle tools
This calculator solves the theorem itself. For other jobs, use a specialist tool:
- CalculatorsRight Triangle Calculator and SolverRight triangle solver: enter any two values, such as two sides or a side and an angle, to get all three sides, both angles, area, perimeter, altitude and radii.
- CalculatorsIs It a Right Triangle? Checker and Triangle ClassifierIs it a right triangle? Enter three side lengths to check the triangle inequality, classify the triangle as right, acute or obtuse, and find all three angles.
- CalculatorsDistance Formula CalculatorFree distance formula calculator for 2D and 3D points. Get the distance with steps, the exact radical answer, the midpoint, the slope and a graph.
- Calculators3D Pythagorean Theorem CalculatorFind the space diagonal of a box from its length, width and height, or a missing side from the diagonal, with steps, exact answers and face diagonals.
- CalculatorsSpecial Right Triangle CalculatorSolve any 30-60-90 or 45-45-90 triangle from one side. Get the other sides in exact radical form and as decimals, plus area, perimeter and steps.
- CalculatorsScreen Size Calculator for TVs and MonitorsTV and monitor screen size calculator. Turn a diagonal and aspect ratio into width, height and area in inches and cm, get PPI, and compare two screens.
Frequently asked questions
How do I find the hypotenuse with the Pythagorean theorem?
Square both legs, add the results and take the square root: c = √a2 + b2. For legs 9 and 12 that is √81 + 144 = √225 = 15. Enter the two legs above and leave the hypotenuse box empty.
How do I find a missing leg (a or b)?
Square the hypotenuse, subtract the square of the known leg, then take the square root: a = √c2 − b2. Enter c and the leg you know, and leave the other leg empty. The hypotenuse must be the larger number.
Can I use the calculator for a triangle without a right angle?
No. The Pythagorean theorem only holds when one angle is exactly 90°. For other triangles use the law of cosines, which adds a correction term to the theorem. To test whether three lengths form a right triangle, use the right triangle checker.
Can it find the angles?
Yes. Once all three sides are known it shows both acute angles. Angle A is opposite leg a and equals arctan(a/b); angle B is 90° − A. For solving from an angle and a side, use the right triangle solver.
Why does it say the hypotenuse must be longer than the leg?
Because c2 − b2 would be zero or negative, and no real length has a negative square. In every right triangle the hypotenuse is the longest side, so check that you put the longest length in the c box.
Do the units matter?
Both lengths must be in the same unit — convert first if one is in feet and the other in inches. The answer comes out in that same unit. The units menu only adds labels to the results.
Keep exploring
- CalculatorsHypotenuse CalculatorFree hypotenuse calculator: find the longest side of a right triangle from two legs, a leg and an angle, or the area and a leg, with steps and exact radicals.
- CalculatorsMissing Side Calculator (Find a Leg)Find the missing side of a right triangle from the hypotenuse and one leg. Enter b and c to get a, or a and c to get b, with steps, exact radicals and a check.
- CalculatorsRight Triangle Calculator and SolverRight triangle solver: enter any two values, such as two sides or a side and an angle, to get all three sides, both angles, area, perimeter, altitude and radii.
- CalculatorsIs It a Right Triangle? Checker and Triangle ClassifierIs it a right triangle? Enter three side lengths to check the triangle inequality, classify the triangle as right, acute or obtuse, and find all three angles.
- LearnHow to Do the Pythagorean Theorem, Step by StepHow to do the Pythagorean theorem in 8 steps: label the sides, add or subtract the squares, take the square root and check. Flowchart and worked examples.
- PracticePythagorean Theorem ExamplesFifteen Pythagorean theorem examples solved step by step, from finding the hypotenuse to 3D diagonals, coordinates and algebra, each with a diagram and answer.