Right triangle calculator
Hypotenuse, diagonal and square-check calculator in feet and inches. Every measurement goes in and comes out in feet, inches and fractions.
Your right triangle
20' 0"
In the app, any two of rise, run and diagonal solve the third, straight from the keypad.
diagonal = √(length² + width²)
3-4-5 triangle multiples
| Side | Side | Diagonal |
|---|---|---|
| 3 ft | 4 ft | 5 ft |
| 6 ft | 8 ft | 10 ft |
| 9 ft | 12 ft | 15 ft |
| 12 ft | 16 ft | 20 ft |
| 15 ft | 20 ft | 25 ft |
| 18 ft | 24 ft | 30 ft |
Every row is exact, so any of them squares a corner with no fractions to read. The same ratio works in millimetres: 600, 800 and 1000.
This right triangle calculator finds the hypotenuse, a missing side and both angles of a right-angled triangle in feet, inches and fractions — and, for layout work, the diagonal of a rectangle and how far a corner is out of square. A rectangle's diagonal is the long side of a right triangle, so the diagonal of a room, slab or deck is the square root of length squared plus width squared. This diagonal calculator does that in feet and inches, finds a missing side when you have the diagonal, and takes all three measurements from a corner you have already built to tell you how far it is out of square. Adding or dividing lengths instead? Use the Feet and Inches Calculator.
Right triangle basics: legs, hypotenuse and angles
A right triangle, also called a right-angled triangle or a right angle triangle, has one 90° corner. The two sides that meet at that corner are perpendicular to each other, and they are the legs, a and b. The side opposite the 90° corner is the hypotenuse, c, and it is always the longest side. The other two angles, A and B, always add up to 90°, so knowing one gives you the other.
a, b LEGS c HYPOTENUSE A, B ANGLES, A + B = 90°
On the calculator, the length and width are the two legs and the diagonal is c. Enter b as the length and a as the width, and the angle at the length is angle A.
How to find the hypotenuse
Use the Pythagorean theorem: c = √(a² + b²). Square each leg, add the squares, and take the square root. In a rectangle, the diagonal is the same line, so this is the sum the calculator runs in THE DIAGONAL mode.
With feet and inches, convert both legs to inches first, calculate, then convert back. For legs of 9' 6" and 12' 4":
- 9' 6" is 114 in and 12' 4" is 148 in.
- 114² + 148² = 12,996 + 21,904 = 34,900.
- √34,900 = 186.82 in.
- 186.82 ÷ 12 is 15 ft with 6.82 in left over, which is 15' 6-13/16" to the nearest 1/16.
Type 9' 6" and 12' 4" into the right triangle calculator above and it shows the same 15' 6-13/16", with the working underneath. To read any other decimal answer on a tape, the inches to fraction calculator gives the nearest mark.
How to find a missing side of a right triangle
If you know the diagonal and one side, choose A SIDE. The other side is the square root of the diagonal squared minus the known side squared. A 20 ft diagonal with a 12 ft side leaves 16 ft, because 400 − 144 = 256. As a formula, a = √(c² − b²): always subtract from the long side.
Missing side from one side and an angle
If you know one leg and one of the two acute angles, trigonometry gives the rest. Call the leg next to the angle the adjacent leg:
- opposite = adjacent × tan(angle)
- c = adjacent ÷ cos(angle)
With a 10 ft adjacent leg and a 30° angle, the opposite leg is 10 × tan 30° = 5.7735 ft, which is 5' 9-5/16", and the long side is 10 ÷ cos 30° = 11.5470 ft, which is 11' 6-9/16". The calculator works from two sides; for a side and an angle, use these formulas.
How to find the angles of a right triangle
Every angle comes from the ratio of two of the sides. The memory aid is SOH-CAH-TOA:
- Sine: sin = opposite ÷ hypotenuse (SOH)
- Cosine: cos = adjacent ÷ hypotenuse (CAH)
- Tangent: tan = opposite ÷ adjacent (TOA)
To calculate an angle from two sides, use the inverse function, written tan⁻¹ or arctan on a calculator: A = tan⁻¹(a ÷ b), then B = 90° − A. When you know both legs, tangent is the one to use, because it does not need the long side at all.
Take the calculator's own example, 16 ft by 12 ft. The angle at the 16 ft side is tan⁻¹(12 ÷ 16) = 36.87°, and the other angle is 90° − 36.87° = 53.13°. Those are the ANGLE AT THE LENGTH and ANGLE AT THE WIDTH rows in the result above. For legs of 9' 6" and 12' 4", the two angles are 37.61° and 52.39°.
In THE DIAGONAL and A SIDE modes the calculator shows both angles with every answer, so you only need the formulas when you are working on paper or starting from an angle you already know.
Solving a right triangle from any two values
To solve a right triangle means to find all three sides and both acute angles. Any two values fix the whole triangle, as long as one of them is a side: two sides, or one side and one acute angle. Two angles alone are not enough, because they fix the shape but not the size; a 3-4-5 triangle and a 30-40-50 triangle have the same angles.
Which formula to use
| You know | Find the rest with |
|---|---|
| Both legs a, b | c = √(a² + b²); A = tan⁻¹(a ÷ b) |
| Leg + hypotenuse | other leg = √(c² − a²); A = sin⁻¹(a ÷ c) |
| Leg + angle | other leg = leg × tan; c = adjacent ÷ cos |
| Hypotenuse + angle | opposite = c × sin; adjacent = c × cos |
For the last row, a 20 ft c at 40° gives an opposite leg of 20 × sin 40° = 12.8558 ft, or 12' 10-1/4", and an adjacent leg of 20 × cos 40° = 15.3209 ft, or 15' 3-7/8".
The calculator above is a right triangle solver for the first two rows: enter both legs in THE DIAGONAL mode, or a leg and the diagonal in A SIDE mode, and it returns the missing side and both angles. For the last two rows, use the formulas.
Area and perimeter of a right triangle
The legs are the base and the height, so the area is half their product: area = a × b ÷ 2. The perimeter is the three sides added together: perimeter = a + b + c.
For the 16 ft by 12 ft example, the area is 16 × 12 ÷ 2 = 96 sq ft and the perimeter is 16 + 12 + 20 = 48 ft. In feet and inches, legs of 9' 6" and 12' 4" give 114 × 148 ÷ 2 = 8,436 sq in, which is 58.58 sq ft, and a perimeter of 9' 6" + 12' 4" + 15' 6-13/16" = 37' 4-13/16".
This right triangle calculator does not add up area or perimeter for you, but it gives the third side you need for the perimeter. For triangular floors, gables and other odd shapes, the square footage calculator has a TRIANGLE shape.
Special right triangles: 3-4-5, 45-45-90 and 30-60-90
A few shapes come up so often that they have names. Their sides keep a fixed ratio, so one measurement gives the other two.
| Triangle | Side ratio | Angles | Example |
|---|---|---|---|
| 3-4-5 | 3 : 4 : 5 | 36.87°, 53.13°, 90° | 12 / 16 / 20 ft |
| 45-45-90 (isosceles right) | 1 : 1 : √2 (≈ 1.4142) | 45°, 45°, 90° | legs 10 ft → c = 14' 1-11/16" |
| 30-60-90 | 1 : √3 (≈ 1.7321) : 2 | 30°, 60°, 90° | short leg 5 ft → long leg 8' 7-15/16", c = 10 ft |
The 45-45-90 is the isosceles right triangle: its two legs are equal, so the long side is the leg × √2. Legs of 10 ft give 14.1421 ft, which is 14' 1-11/16". It is also the diagonal of any square.
The 30-60-90 is half of an equilateral triangle. Its sides run 1 : √3 : 2, so the long side is twice the short leg. A 5 ft short leg gives a long leg of 8.6603 ft, which is 8' 7-15/16", and a 10 ft long side.
Triangles with the same angles are similar right triangles: their sides keep the same proportion at any size. That is why every row of the 3-4-5 triangle multiples table squares a corner the same way: 6-8-10 and 12-16-20 have the same 36.87° and 53.13° angles as 3-4-5.
Squaring a corner with the 3-4-5 rule
Mark 3 ft along one line and 4 ft along the other. The distance between the two marks is exactly 5 ft only when the corner between them is 90°. On a larger layout, use a multiple, because a longer triangle shows a small error more clearly: 12-16-20 turns a 1/16 in misreading into a smaller angle than 3-4-5 does. The table on this page lists the multiples that come out in whole feet.
Checking a slab, deck or foundation
For a whole rectangle, measure both diagonals. If they are equal, the rectangle is square. If they differ, the corners are not 90°. For a single corner, choose CHECK SQUARE and enter the length, the width and the diagonal you measured. The calculator gives the diagonal a square corner would have, the difference, and the actual corner angle.
Diagonals of common rooms and slabs
The diagonal each layout should measure when every corner is square, to the nearest sixteenth.
| Size | Square diagonal |
|---|---|
| 4 × 8 ft | 8' 11-5/16" |
| 8 × 10 ft | 12' 9-11/16" |
| 10 × 12 ft | 15' 7-7/16" |
| 12 × 16 ft | 20' 0" |
| 20 × 30 ft | 36' 11/16" |
| 24 × 36 ft | 43' 3-3/16" |
Which way to move a corner
A diagonal that measures long means the corner is open, wider than 90°. One that measures short means it is closed. With form boards or batter boards, move the far end of one side toward the other to close the corner, or away to open it, then measure again. On a 12 by 16 layout, moving the end of the 12 ft side 1/2 in changes the diagonal by about 0.4 in, so move in small steps and check each one.
Right triangles on the job
Most layout and framing maths is a right triangle with different names on the sides.
- Rafters. The run and the rise are the legs and the rafter is the hypotenuse. The roof pitch and rafter calculator starts from the pitch and gives the rafter length for a run.
- Stairs. The total run and the total rise are the legs and the stringer is the long side. The stair stringer calculator works it out from the rise. Each step is a small right triangle too: a 7-1/2" rise and a 10" run is a 3-4-5 triangle 2.5 times over, with a 12-1/2" diagonal and a 36.87° angle.
- Braces and squaring. A diagonal brace across a frame is the long side of the frame's width and height. Square the frame first with the 3-4-5 rule and the diagonal check above.
For a triangle without a 90° angle, you need the law of sines or cosines — this calculator covers right triangles only.
In millimetres
Choose MM and type plain numbers, or type 600mm with any setting. The 3-4-5 ratio holds in any unit, so 600, 800 and 1000 mm square a corner exactly, and 1.2 m, 1.6 m and 2 m do the same over a longer run.
Questions about right triangles and squaring
What is the 3-4-5 rule?
A triangle with sides of 3, 4 and 5 always has a 90° corner between the 3 and the 4. Measure 3 ft along one line and 4 ft along the other, and if the distance between those two marks is exactly 5 ft, the corner is square. Any multiple works the same way: 6-8-10, 9-12-15 or 12-16-20.
How do you square a foundation?
Measure both diagonals. A rectangle is square only when its two diagonals are equal. For a single corner, use this calculator's CHECK SQUARE mode: enter the length, the width and the diagonal you measured, and it says whether the corner is open or closed and by how much.
What is the diagonal of a 12 by 16 room?
Exactly 20 ft. It is the 3-4-5 triangle four times over, which is why 12 by 16 is a common layout for checking a corner.
What is the diagonal of a 4 by 8 sheet of plywood?
8 ft 11-5/16 in to the nearest sixteenth, or 107.33 in. Measuring both diagonals of a sheet is also the quick way to check that it was cut square: on a square sheet they are equal.
What is the diagonal of a 10 by 12 room?
15 ft 7-7/16 in to the nearest sixteenth. 10 squared plus 12 squared is 244, and the square root of 244 is 15.62 ft.
What does it mean if the diagonal is too long?
The corner is open, wider than 90°. If the diagonal is too short, the corner is closed, tighter than 90°. Move the far end of one side toward the other to close an open corner, or away from it to open a closed one, then measure again.
How do you find a missing side of a right triangle?
Square the diagonal, subtract the square of the side you know, and take the square root. With a 20 ft diagonal and a 12 ft side, 400 − 144 = 256, and the square root of 256 is 16 ft. Use A SIDE mode to do it in feet and inches. For a side and an angle, see how to find a missing side above.
How do you find the hypotenuse of a right triangle?
Use the Pythagorean theorem: c = √(a² + b²). Square both legs, add them and take the square root. In feet and inches, convert to inches first: legs of 9' 6" and 12' 4" are 114 in and 148 in, 12,996 + 21,904 = 34,900, and √34,900 = 186.82 in, which is 15' 6-13/16".
How do you find an angle in a right triangle?
Divide the opposite leg by the adjacent leg and take the inverse tangent: A = tan⁻¹(opposite ÷ adjacent). The other acute angle is 90° minus the first. For legs of 16 ft and 12 ft, tan⁻¹(12 ÷ 16) = 36.87°, and the other angle is 53.13°. The calculator above shows both angles when you give it two sides.
How do you find the area of a right triangle?
Multiply the two legs and divide by 2, because the legs are the base and the height. Legs of 16 ft and 12 ft give an area of 16 × 12 ÷ 2 = 96 sq ft. If the legs are in feet and inches, convert both to inches, multiply, halve, and divide by 144 for square feet.
What are the special right triangles?
The 45-45-90, with sides in the ratio 1 : 1 : √2, and the 30-60-90, with sides in the ratio 1 : √3 : 2. One measurement gives the other two sides, with no square root sum. The 3-4-5 triangle is the common whole-number one, and it is the one builders use to square a corner.
What is the hypotenuse of a 45-45-90 triangle?
The leg times √2, which is about the leg × 1.4142. Both legs of a 45-45-90 triangle are equal, so one measurement is enough. Legs of 10 ft give 14.1421 ft, which is 14' 1-11/16" to the nearest sixteenth. It is also the diagonal of a square with 10 ft sides.
Can you solve a right triangle with one side and one angle?
Yes. With one side and one acute angle, sine, cosine and tangent give the other two sides, and the second angle is 90° minus the first. A 20 ft diagonal at 40° has legs of 12' 10-1/4" and 15' 3-7/8". The formulas table above shows which to use. The calculator itself works from two sides.
