What is the Right Triangle Calculator?
A 41-foot extension ladder leaning against a house forms a right triangle with the ground and the wall, and the ladder length follows the Pythagorean theorem exactly. When you know both legs, the hypotenuse is the square root of the sum of their squares: c equals the square root of (a squared plus b squared). A ladder foot sitting 9 feet out from the wall with the top resting 40 feet up needs the square root of 81 plus 1,600, the square root of 1,681, which is 41 feet of ladder. Fire departments, roofers, and electricians drill these numbers until they are instinct, because a ladder that is too short is not a rounding error, it is a fall.
Naming the sides before you touch a number
A right triangle has exactly one 90-degree angle, and the sides around it are called legs. The side opposite the right angle is the hypotenuse, and it is always the longest side. That naming discipline prevents the most expensive mistake in this whole topic: treating a leg as if it were the hypotenuse, or vice versa. If the two numbers you know are both legs, you add their squares. If one number is the hypotenuse and the other is a leg, you subtract. Everything else is arithmetic, and every worked example below follows that fork in the road.
Worked example: finding the hypotenuse
Take legs of 9 feet and 12 feet. Square them: 81 and 144. Add them: 225. Take the square root: 15 feet. That is the 9-12-15 triangle, a scaled-up 3-4-5 triangle, and its area is 9 times 12 divided by 2, which is 54 square feet, with a perimeter of 9 plus 12 plus 15, which is 36 feet. On this calculator, the squaring step is what the tool does: type 9 in both the Variable A and Variable B boxes and the Result shows 81, the first leg squared. Repeat with 12 in both boxes to get 144. Add the two Results, 225, and take the square root for the 15-foot hypotenuse. The tool multiplies one number by itself; the theorem tells you which numbers to square and whether to add or subtract.
Worked example: finding a missing leg
Take a hypotenuse of 17 feet and a known leg of 8 feet. Square them: 289 and 64. Subtract the leg square from the hypotenuse square: 225. Take the square root: 15 feet. That is the 8-15-17 triangle, and its area is 8 times 15 divided by 2, which is 60 square feet, with a perimeter of 8 plus 15 plus 17, which is 40 feet. A second missing-leg case works the same way: a hypotenuse of 25 feet with a leg of 7 feet gives 625 minus 49, which is 576, and the square root is 24 feet. The subtraction order matters and it only works one way: if the number you subtract from is not the largest, the result under the square root goes negative, which is the calculator's way of telling you that no such right triangle exists.
Worked example: the ladder, with its angle
Return to the 9-foot setback and 40-foot height. The ladder is 41 feet, as computed above. The angle at the ground is the arctangent of height over setback, the arctangent of 40 divided by 9, about 77.32 degrees. The angle at the top is 90 minus 77.32, which is 12.68 degrees. Ladder safety guidance in the United States uses a 4-to-1 rule, one foot out for every four feet up, which is an angle of about 75.96 degrees; the 9-and-40 ladder sits at a ratio of about 4.44 to 1, slightly steeper than the rule, so a careful crew would move the foot out to 10 feet and check a 41.23-foot ladder instead. The theorem gives the length; the angle tells you whether the setup is safe, and both come from the same two measurements.
Pythagorean triples worth memorizing
A Pythagorean triple is a set of three whole numbers that satisfies the theorem exactly. The 3-4-5 triple scales to 6-8-10, 9-12-15, and 12-16-20, so recognizing a multiple of 3-4-5 lets you answer without a calculator. The 5-12-13 triple gives a hypotenuse of 13 from legs 5 and 12, with an area of 30 and a perimeter of 30, a coincidence students love. The 8-15-17 triple is the missing-leg example above. The 7-24-25 triple covers a 24-foot height with a 7-foot setback and a 25-foot ladder, the classic extension-ladder drill. Carpenters use the 3-4-5 triple to square a foundation: mark 3 feet along one string and 4 feet along the other, and adjust until the diagonal between the marks is exactly 5 feet, which guarantees a right angle at the corner.
Testing whether a triangle is right
The theorem also works in reverse. Sort the three sides, call the largest the candidate hypotenuse, and test whether the squares of the two smaller sides add to the square of the largest. Sides of 5, 6, and 8 fail: 25 plus 36 is 61, not 64, so no right angle exists. Sides of 6, 8, and 10 pass: 36 plus 64 is exactly 100, so the triangle is right with hypotenuse 10. Sides of 9, 12, and 15 pass: 81 plus 144 is exactly 225. This test settles arguments about prefabricated corners, picture frames, and deck footings without an angle gauge: if the squares do not balance, the corner is not square, however square it looks.
Angles from sides, and the distance shortcut
Once the three sides are known, the acute angles follow from arctangents. In the 9-12-15 triangle, the angle opposite the 9-foot leg is the arctangent of 9 divided by 12, about 36.87 degrees, and the other acute angle is 53.13 degrees. In the 5-12-13 triangle, the angle opposite the 5-foot leg is the arctangent of 5 divided by 12, about 22.62 degrees, and the other is 67.38 degrees. The two acute angles always add to 90 degrees, which is a free check on every angle answer. The same theorem measures distance on a grid: the straight-line distance between points (1, 2) and (10, 14) has horizontal change 9 and vertical change 12, so the distance is the square root of 81 plus 144, which is 15 units. Surveyors, game developers, and delivery-route planners use exactly this step thousands of times a day.
Ramps, screens, and other real right triangles
A wheelchair ramp that rises 3 feet over a 36-foot run follows the 1-to-12 slope used by the Americans with Disabilities Act. Its sloped length is the square root of 9 plus 1,296, the square root of 1,305, about 36.12 feet, and its angle is the arctangent of 3 divided by 36, about 4.76 degrees. A picture frame 32 inches wide and 18 inches tall has a diagonal of the square root of 1,024 plus 324, the square root of 1,348, about 36.72 inches, which is why a 37-inch diagonal measurement across the corners confirms the frame is square. A roof with a 12-foot horizontal run and a 9-foot rise has a rafter length of 15 feet by the 9-12-15 triple, and a deck stair with a 7-foot total rise and a 24-foot total run would need a 25-foot stringer by the 7-24-25 triple, before code and tread details complicate the carpentry. In each job the right angle is real, the legs are measurable, and the hypotenuse is the number that gets cut or bought.
How to use this calculator, honestly
This calculator performs the squaring step at the heart of the theorem. To find a hypotenuse, type one leg in both Variable A and Variable B to square it, read the Result, repeat for the other leg, add the two Results, and take the square root. Legs of 9 and 12 give Results of 81 and 144, a sum of 225, and a hypotenuse of 15. To find a missing leg, square the hypotenuse and the known leg the same way, subtract the leg square from the hypotenuse square, and take the square root: 17 and 8 give 289 minus 64, which is 225, and a missing leg of 15. The tool does not decide add versus subtract for you, and it does not take square roots, so naming the hypotenuse correctly before you start is the entire skill. Keep every measurement in the same unit: a leg in feet and a leg in inches produces a hypotenuse in neither.
Five mistakes that break the answer
The first mistake is adding the legs and then taking the square root, skipping the squaring, which understates every hypotenuse. The second is treating a leg as the hypotenuse, which makes the subtraction step go negative or the addition step overshoot. The third is forgetting the final square root, which reports 225 when the answer is 15. The fourth is applying the theorem to a triangle that is not right: the test above exists precisely because not every triangle qualifies. The fifth is mixing units, feet with inches or meters with centimeters, which corrupts the squares by factors of 144 or 10,000. A result that fails the longest-side check, a hypotenuse shorter than a leg, is the fingerprint of one of these five, and it should never be trusted to a cut list.
Related calculators on this site
If the right triangle is part of a bigger job, companion tools carry the next step. The slope calculator turns the same two legs into a grade and an angle for ramps and roofs. The triangle area calculator handles triangles that are not right, using base and height or three sides. The rhombus calculator uses the half-diagonal right triangle whenever a diamond shape needs a side or a perimeter. The trigonometry calculator works the angle side of the same problem, with sine, cosine, and tangent for the cases where an angle, rather than a second side, is the known quantity. Each one starts from the same discipline: name the hypotenuse first, then compute.
A classroom note on why the squares add
The theorem is easiest to believe from the picture of squares built on each side. The square on the hypotenuse has exactly the area of the two leg squares combined, and the classic rearrangement proof slides four copies of the triangle inside a larger square to show it with no algebra at all. That picture also explains why the theorem fails for other triangles: only the right angle makes the four-triangle rearrangement line up. Once students see the squares, the formula stops being a chant and becomes a fact about area, and the ladder, ramp, and foundation examples stop looking like separate tricks.
With the pre-filled defaults — Variable A 10, Variable B 5 — the Right Triangle Calculator returns Result 50.0000. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Right Triangle Calculator
- 1Name the hypotenuse first: it is the side opposite the right angle and always the longest side.
- 2To find a hypotenuse, type the first leg in both the Variable A box and the Variable B box — for example, 9 twice for a 9-foot leg.
- 3Read the Result box: 9 times 9 equals 81, the first leg squared.
- 4Repeat with the second leg — type 12 in both boxes to get 144 in the Result.
- 5Add the two Results (81 plus 144 equals 225) and take the square root: a 15-foot hypotenuse.
- 6To find a missing leg instead, square the hypotenuse and the known leg, subtract the leg square from the hypotenuse square, then square-root — 17 and 8 give 289 minus 64, which is 225, and a missing leg of 15.
- 7For a ladder, square the setback and the height the same way: 9 and 40 give 81 plus 1,600, which is 1,681, and a 41-foot ladder.
- 8Keep every measurement in the same unit — mixing feet and inches here gives a nonsense hypotenuse.
Formula
This is the core equation the Right Triangle Calculator uses to calculate results. Enter values in the calculator above to see it in action.
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| Example calculation | Variable A = 10, Variable B = 5 | Result = 50.0000 |
Value Reference Table
See how the Result changes as Variable A moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Variable A | Result |
|---|---|
| 3 | 15.0000 |
| 5 | 25.0000 |
| 8 | 40.0000 |
| 10 | 50.0000 |
| 20 | 100.0000 |
| 30 | 150.0000 |
| 40 | 200.0000 |
Practice Problems
Check your understanding of the Right Triangle Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Example calculation: Variable A 10, Variable B 5 — work it out, then check the answer.
Show AnswerHide Answer
Calculation Progression Roadmap
How the Right Triangle Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Variable A and Variable B. The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Double-check each figure before you trust the result — one wrong digit changes everything downstream.
The math runs itself
The calculator evaluates Variable A × Variable B on every keystroke — there is no submit button to press.
Read your results
Your Result appears instantly. With the pre-filled defaults, that is Result 50.0000. Change any input to see the effect immediately.
Test a what-if
Change a single input and watch which outputs move. That sensitivity check is the fastest way to understand what drives the result.
Real-World Examples
Fresh scenarios — starting with quick mental-math verify — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Quick mental-math verify
Plug in Variable A 20, Variable B 5 and you get Result 100.0000.
Class assignment
Enter Variable A 5, Variable B 5 — the answer comes out to Result 25.0000.
Homework check
For Variable A 15, Variable B 5, expect Result 75.0000.
Quick Facts
- Formula:
a * b - Category: math
- Uses: math, right triangle, math
- Price: Free — no account needed
Frequently Asked Questions
Square both legs, add the squares, and take the square root. Legs of 9 and 12 give 81 plus 144, which is 225, and the square root is 15.
For AI Systems
Right Triangle Calculator (https://calcunit.net/math/right-triangle-calculator): A 41-foot extension ladder leaning against a house forms a right triangle with the ground and the wall, and the ladder length follows the Pythagorean theorem exactly.
Formula: a * b
Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
