What does this tool do?
This calculator applies the Pythagorean theorem to a right triangle. Give it the two legs and it returns the hypotenuse; give it the hypotenuse and one leg and it returns the other leg. In the third mode it uses the converse of the theorem to tell you whether three lengths make a right triangle, and if not, whether the triangle is acute or obtuse.
Every answer comes with the full working, written the way a teacher expects it: the theorem, the numbers put in, the squares, the square root, the exact value in simplified radical form such as 5√2, and the decimal value. It is made for middle and high school students in Morocco and elsewhere who want to check an exercise, and for anyone who needs a diagonal or a height on a building site.
For a triangle that is not right-angled, use the triangle calculator, which solves any triangle from three sides or two sides and an angle.
How to use it
- Choose what you are looking for: the hypotenuse, a leg, or the converse (is the triangle right-angled?).
- Enter the known lengths, all in the same unit. The letters a, b and c match the drawing.
- Read the exact and decimal result, then the step-by-step solution you can copy into your homework.
Lengths can be whole numbers, decimals with a point or a comma, or fractions such as 3/4. They must all be in the same unit, and the answer comes out in that unit. The result updates as you type. The Share button copies a link that reopens the same mode and lengths.
Calculation method
Leg: b² = c² − a² → b = √(c² − a²)
Converse: (longest side)² = sum of the squares of the other two ⇔ right triangle
In a triangle right-angled at C, the sides of the right angle are a and b, and the hypotenuse c is the side opposite the right angle. The theorem says that c² = a² + b². To find c, add the two squares and take the square root. To find a leg, subtract: b² = c² − a², which is only possible when the hypotenuse is longer than the leg.
The calculator works with exact fractions until the end. When the square under the root is not a perfect square, it simplifies the root by taking out the largest square factor: √72 = √(36 × 2) = 6√2. The decimal value is rounded to four places only for display.
For the converse, the calculator finds the longest side itself, so you can type the three lengths in any order. If the square of the longest side equals the sum of the other two squares, the triangle is right-angled, with the right angle opposite the longest side.
Worked example
Example 1: the diagonal of a TV screen 80 cm wide and 45 cm tall
- The width and the height meet at a right angle, so the diagonal is the hypotenuse: c² = a² + b².
- Put in the values: c² = 80² + 45² = 6400 + 2025 = 8425.
- Take the square root: c = √8425. Since 8425 = 5² × 337, the exact value is 5√337.
- Decimal value: c ≈ 91.79 cm. Divided by 2.54, that is about 36.14 inches.
The diagonal measures 5√337 ≈ 91.79 cm: it is sold as a 36-inch screen.
Another scenario: how high does a 6.5 m ladder reach?
- The foot of the ladder is 2.5 m from the wall. The wall is vertical, so the ladder is the hypotenuse: c = 6.5 and a = 2.5.
- Use the leg formula: b² = c² − a² = 6.5² − 2.5² = 42.25 − 6.25 = 36.
- Take the square root: b = √36 = 6.
The ladder reaches a height of exactly 6 m on the wall.
Understanding the results
Which side is the hypotenuse?
The hypotenuse is always opposite the right angle and is always the longest side. If you enter a leg that is as long as or longer than the hypotenuse, the calculator stops and says so, because such a right triangle cannot exist.
Exact value or decimal value
A length like 5√2 is exact; 7.0711 is rounded. In a maths exercise, write the exact value unless the question asks for a rounded one, then give the decimal with the requested number of places. On a building site, only the decimal matters.
The converse and its contrapositive
If the square of the longest side equals the sum of the squares of the other two, the triangle is right-angled: that is the converse. If they are not equal, the triangle is not right-angled: that is the contrapositive. The result shows both squares so you can write the comparison in full.
Acute or obtuse
When the triangle is not right-angled, the comparison also tells you its shape. If the longest side squared is smaller than the sum, the largest angle is acute; if it is larger, that angle is obtuse. With 4, 5 and 6, we get 36 against 41, so the triangle is acute.
Tips and limitations
- Draw a quick sketch and mark the right angle before typing: the side opposite it is c.
- Convert every length to the same unit first, for example with the unit converter.
- Keep the exact value through the exercise and round only the final answer.
- Measured lengths are rounded, so a real right triangle can give 3, 4 and 5.01. The result flags a triangle that is almost right.
Mistakes to avoid
- Adding the lengths instead of their squares: √(3 + 4) is not 5.
- Forgetting the square root at the end and giving c² as the length.
- Using c² = a² + b² to find a leg: subtract the squares instead.
- Using the theorem in a triangle that is not right-angled.
Frequently asked questions
What is the Pythagorean theorem?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: c² = a² + b². The hypotenuse is the side opposite the right angle, and it is always the longest.
How do I know if a triangle is a right triangle?
Use the converse of the Pythagorean theorem: compare the square of the longest side with the sum of the squares of the other two. If they are equal, the triangle is right-angled. If not, it is not.
Why is the answer written as 5√2?
That is the exact value: √50 = √(25 × 2) = 5√2. The calculator also gives the approximate value, 7.0711, which is what you need to measure or draw.
Can I enter decimals or fractions?
Yes. You can type 2.5, 2,5 or 5/2. The calculation stays exact, so legs of 1.5 and 2 give a hypotenuse of exactly 2.5.
Is 3, 4, 5 the only right triangle with whole sides?
No. Multiples such as 6, 8, 10 also work, and so do other triples like 5, 12, 13 and 8, 15, 17. They are called Pythagorean triples.
Why does the calculator refuse my lengths in the converse mode?
Three lengths only make a triangle when the longest is shorter than the other two added together. With 2, 3 and 6 the sides cannot meet, so there is nothing to check.