How to use the right triangle calculator
- Enter Side A and Side B, the two legs that meet at the right angle.
- Alternatively, enter one leg and the Hypotenuse C to solve for the missing side.
- Read the calculated hypotenuse or missing leg, both acute angles and the triangle area.
- Check the squaring row to see if your dimensions form a 3-4-5 multiple.
- On site, measure the actual diagonal and compare it against the result using your chosen tolerance.
How the Pythagorean theorem is applied
This right triangle calculator uses the Pythagorean theorem: c = sqrt(a² + b²). When you provide both legs, it squares each, adds them and takes the square root to return the hypotenuse. If you supply one leg and the hypotenuse instead, it rearranges the formula to b = sqrt(c² - a²).
For example, with legs of 3 feet and 4 feet: 3² + 4² = 9 + 16 = 25, and sqrt(25) = 5. The hypotenuse is exactly 5 feet. The acute angles come from the inverse tangent function: angle A = atan(a / b) × 180 / pi. With those same numbers, atan(3/4) gives about 36.87 degrees, and the remaining angle is 90 minus that value.
Using this tool as a diagonal calculator
Carpenters and framers often call this a diagonal calculator because it answers a practical question: what should the corner-to-corner measurement be if my layout is perfectly square? You measure along two perpendicular walls, enter those lengths and read the expected diagonal.
Then stretch a tape measure across the actual corners. If the measured diagonal matches the calculated one within your tolerance, the frame is square. If it is longer, the corner is obtuse and needs adjustment. If it is shorter, the corner is acute. Setting the out-of-square tolerance field lets you decide how much deviation is acceptable before shimming or re-cutting.
Common right triangle ratios
The 3-4-5 ratio is the most famous Pythagorean triple, but any multiple works just as well. Multiply every side by the same number and the triangle stays a perfect right triangle. Here are common multiples used in framing:
| Multiplier | Side A | Side B | Hypotenuse C |
|---|---|---|---|
| 1 | 3 | 4 | 5 |
| 2 | 6 | 8 | 10 |
| 3 | 9 | 12 | 15 |
| 4 | 12 | 16 | 20 |
| 5 | 15 | 20 | 25 |
Other useful integer triples include 5-12-13, 8-15-17 and 7-24-25. The calculator automatically detects when your inputs form a 3-4-5 multiple and reports the scale factor, which is why many tradespeople treat it as a quick 3 4 5 calculator on the job.
Practical squaring techniques on site
A squaring calculator approach is standard practice when laying out foundations, decks and wall frames. The method is straightforward: mark one wall length, mark the perpendicular wall length, then measure the diagonal. Adjust until the diagonal equals the value this pythagorean calculator returns.
For large layouts where a single tape cannot span the diagonal, use the 3-4-5 method at a smaller scale. Measure 3 feet along one line, 4 feet along the other and check that the distance between those marks is exactly 5 feet. Scale up to 6-8-10 or 9-12-15 for greater accuracy over longer distances. Always measure from the same face of the lumber to avoid offset errors.
Common mistakes to avoid
Mixing units is the most frequent error. If side A is in feet and side B is in inches, the result will be meaningless. Convert everything to the same unit first. Another mistake is measuring to the outside edge of one wall and the inside edge of the other, which introduces a systematic offset equal to the material thickness.
When entering a known hypotenuse, make sure it is actually the longest side. If you accidentally type a value shorter than one of the legs, the formula produces an imaginary number and the calculator will flag an error. Finally, remember that the area returned is for the triangle only. If you need the full rectangle area for materials, double it or use the square footage calculator instead.
Worked examples
| Example | Input | Result |
|---|---|---|
| Classic 3-4-5 triangle | Side A (leg): 3; Side B (leg): 4; Out-of-square tolerance: 0.25 | Hypotenuse (C): 5; Angle A (opposite side A): 36.87°; Angle B (opposite side B): 53.13°; Area: 6; Ratio: 3-4-5 multiple (x1); Squaring check: Expected diagonal: 5 |
| Diagonal of a 12 x 16 room | Side A (leg): 12; Side B (leg): 16; Out-of-square tolerance: 0.25 | Hypotenuse (C): 20; Angle A (opposite side A): 36.87°; Angle B (opposite side B): 53.13°; Area: 96; Ratio: 3-4-5 multiple (x4); Squaring check: Expected diagonal: 20 |
| Find missing leg (C=13, A=5) | Side A (leg): 5; Hypotenuse C (optional): 13; Out-of-square tolerance: 0.125 | Side B (calculated): 12; Hypotenuse (C): 13; Angle A (opposite side A): 22.62°; Angle B (opposite side B): 67.38°; Area: 30; Ratio: 5-12-13; Squaring check: Expected diagonal: 13 |
| Isosceles right triangle | Side A (leg): 10; Side B (leg): 10; Out-of-square tolerance: 0.5 | Hypotenuse (C): 14.1421356237; Angle A (opposite side A): 45°; Angle B (opposite side B): 45°; Area: 50; Squaring check: Expected diagonal: 14.1421356237 |
FAQ
What is a right triangle calculator used for?
It solves for unknown sides and angles of a triangle that has one 90-degree angle. Builders use it to verify that corners are square by comparing the expected diagonal to the measured one.
How do I find the hypotenuse if I know both legs?
Square each leg, add the results together and take the square root. For legs of 6 and 8: 36 plus 64 equals 100, and the square root of 100 is 10.
Why is the 3-4-5 triangle so popular in construction?
Because all three sides are whole numbers, making it easy to measure with a tape. Any multiple such as 6-8-10 or 9-12-15 preserves the exact right angle.
Can I use this as a diagonal calculator for a room?
Yes. Enter the room length and width as the two legs. The hypotenuse result is the exact corner-to-corner diagonal you should measure if the walls are perfectly square.
What tolerance should I set for squaring a frame?
For residential wood framing, 1/8 inch to 1/4 inch over 10 feet is typical. Larger concrete forms may allow up to 1/2 inch. Set the tolerance field to match your project specifications.
Does this replace a general triangle calculator?
No. This tool only handles triangles with a 90-degree angle. For oblique triangles without a right angle, use a dedicated triangle calculator that supports law-of-cosines methods.
How is the area calculated?
The area of a right triangle is half the product of its two legs: area = (a × b) / 2. No height calculation is needed because the legs themselves serve as base and height.