Right Triangle Calculator
Solve from two sides, side and angle, area and one side, or a square-corner check. Live diagram, step-by-step working, and trade contexts.
Solve any right triangle from two known values. Square-corner check, draggable diagram, trade contexts, and copyable working.
A right triangle calculator solves a triangle with one 90° corner when you supply any two independent facts, such as two sides, one side and an acute angle, or area plus one side. It returns all three sides, both acute angles, area, perimeter, altitude to the hypotenuse, slope, and roof pitch, with step-by-step formulas using your numbers.
Core formula: a² + b² = c² (c is the hypotenuse). Worked example: rise 6 and run 12 give c = √(36 + 144) = √180 ≈ 13.42 in the same length units. Roof pitch: treat rise and run as legs to get rafter length. Stair stringers: total rise and total run form the legs; the cut length is the hypotenuse. Squaring a layout: compare a taped diagonal to √(length² + width²), or use a 3-4-5 check on the corner.
Students use it for homework; builders use it to check rafters, stringers, ladders, and ramps before cut lists go to the saw. You get a live diagram, unit switching, radian expressions like pi/4, and a square-corner mode made for slabs and deck frames. Once your measurements check out, Invoice Mama makes it simple to turn them into a professional quote or invoice.
How to Use the Right Triangle Calculator
Four solve modes, one results panel
- 1
Pick a solve mode
Two sides, side plus angle, area plus one side, or square-corner check. The mode cards use plain English so you are not guessing math jargon on a jobsite.
- 2
Enter values and units
Choose length units and decimal places. Angles accept degrees or radians. Marked fields show whether you typed a value or the tool calculated it.
- 3
Read, copy, or share
Every output has a copy button. Step-by-step working is collapsible. Bookmark the URL to send the same triangle to a crew member.
Right Triangle Formulas
Quick reference for legs, hypotenuse, and area
Quantity | Formula |
|---|---|
| Hypotenuse c | √(a² + b²) |
| Leg a | √(c² − b²) |
| Leg b | √(c² − a²) |
| Angle α (from sides) | atan(a ÷ b) |
| Angle β | 90° − α |
| Area | (a × b) ÷ 2 |
| Perimeter | a + b + c |
| Altitude h to c | (a × b) ÷ c |
| Segments p, q on c | p = a² ÷ c, q = b² ÷ c |
| Inradius | (a + b − c) ÷ 2 |
| Circumradius | c ÷ 2 |
How to Find the Missing Side of a Right Triangle
Legs, hypotenuse, and when c must be longest
If you know both legs, the hypotenuse is always √(a² + b²). If you know one leg and the hypotenuse, subtract the square of the leg from the square of c and take the square root for the other leg. The hypotenuse must be longer than either leg; if your tape says otherwise, remeasure or check which side is actually c.
How to Find the Angles of a Right Triangle
SOH CAH TOA and arctangent
Ratio | Definition | With our labels (α at bottom-left) | Use when |
|---|---|---|---|
| sin(α) | opposite ÷ hypotenuse | a ÷ c | Find a from c and α |
| cos(α) | adjacent ÷ hypotenuse | b ÷ c | Find b from c and α |
| tan(α) | opposite ÷ adjacent | a ÷ b | Find a from b and α |
From two sides alone, α = atan(a ÷ b). That is the same as sin⁻¹(a ÷ c) or cos⁻¹(b ÷ c) when all three sides are known. On paper, label rise (vertical) and run (horizontal) on separate axes so you do not swap legs when you type values. Results show both acute angles and keep the right angle fixed at 90°.
Pythagorean Triples and Special Right Triangles
3-4-5 squaring, 30-60-90, and 45-45-90
Triple | ×2 | ×3 | Notes |
|---|---|---|---|
| 3 - 4 - 5 | 6 - 8 - 10 | 9 - 12 - 15 | Classic framing square |
| 5 - 12 - 13 | 10 - 24 - 26 | 15 - 36 - 39 | Larger decks and layouts |
| 8 - 15 - 17 | 16 - 30 - 34 | 24 - 45 - 51 | Longer diagonals |
| 7 - 24 - 25 | 14 - 48 - 50 | 21 - 72 - 75 | Wide slabs |
| 20 - 21 - 29 | 40 - 42 - 58 | 60 - 63 - 87 | Near-square rectangles |
Triangle | Side ratios | Angle tie-in | Example |
|---|---|---|---|
| 30° – 60° – 90° | 1 : √3 : 2 | a : b : c if α = 30° | 5 – 8.66 – 10 (scaled) |
| 45° – 45° – 90° | 1 : 1 : √2 | Isosceles right triangle | 7 – 7 – 9.90 (scaled) |
Right Triangles on the Job Site
Worked examples with real numbers
Squaring a 12 ft × 16 ft slab frame: expect diagonal √(12² + 16²) = √(144 + 256) = 20 ft. Measure the diagonal; if you are within your tolerance, the corner is square. A 3-4-5 check at 9 ft, 12 ft, and 15 ft on the same layout tells the same story on a smaller triangle.
Roof rafter: 14 ft horizontal run and 7 ft rise give c = √(14² + 7²) = √245 ≈ 15.65 ft rafter length (before overhang). Pitch is 6:12. Stair stringer: 9 ft total rise and 11 ft total run → c ≈ 14.21 ft along the stringer board. Pair with our decking calculator when you move from layout to material takeoff.
Ladder safety: wall height 20 ft and base 5 ft from the wall → ladder length √(20² + 5²) ≈ 20.62 ft. The 4:1 rule wants at least 5 ft base for 20 ft climb; you are right on the line. Ramp: 24 in rise and 20 ft run → slope about 10%, steeper than typical 1:12 accessible ramps; ramp length √(2² + 20²) ≈ 20.10 ft along the surface.
A 55 in 16:9 TV is a relatable check: screen width ≈ 47.9 in and height ≈ 27.0 in, so diagonal √(47.9² + 27.0²) ≈ 55 in, matching the size on the box. School classic: legs 5 and 12 → c = 13, α ≈ 22.62°, area = 30 square units. Area 50 with leg 10 → other leg 10, a 45-45-90 triangle.
Right Triangle Reference Tables
Slope, pitch, and unit conversions
Angle | Slope % | Ratio 1:X | Roof pitch | Notes |
|---|---|---|---|---|
| 5° | 8.75% | 1:11.4 | 1.05:12 | Very low roof |
| 9.5° | 16.7% | 1:6 | 2:12 | Minimum shingles (check manufacturer) |
| 18.4° | 33.3% | 1:3 | 4:12 | Moderate pitch |
| 26.6° | 50% | 1:2 | 6:12 | Common residential |
| 45° | 100% | 1:1 | 12:12 | Steep / 45-45-90 |
| 60° | 173% | 1:0.58 | 20.8:12 | Very steep (rare roofs) |
Unit | To meters | Example |
|---|---|---|
| Millimeters | ÷ 1,000 | 1,000 mm = 1 m |
| Centimeters | ÷ 100 | 250 cm = 2.5 m |
| Meters | × 1 | 10 m = 10 m |
| Inches | ÷ 39.3701 | 39.37 in ≈ 1 m |
| Feet | ÷ 3.28084 | 10 ft ≈ 3.05 m |
| Yards | ÷ 1.09361 | 1 yd ≈ 0.91 m |
Frequently Asked Questions
Clear answers on sides, angles, area, and job-site layout
How do I find the missing side of a right triangle?
With legs 3 and 4, the missing hypotenuse is 5 because √(3² + 4²) = √25 = 5. In general, c = √(a² + b²) for the hypotenuse, or a = √(c² − b²) for a leg. Enter any two sides in two-sides mode and the calculator returns the third with unit conversion and a draggable diagram.
How do I find the angles of a right triangle with two sides?
With legs 3 and 4, α ≈ 36.87° (atan(3 ÷ 4)) and β = 53.13° (90° − α). In general, α = atan(a ÷ b) and β = 90° − α. Enter both legs here for α, β, slope percent, and roof pitch without a separate arctangent key.
Can you solve a right triangle with only one side?
No: one side alone cannot fix the triangle. You need a second fact such as another side, an acute angle, the area, or a measured diagonal for a square-corner check. The tool flags incomplete input in plain English.
What is the formula for the area of a right triangle?
With legs 6 and 8, area = 24 because (6 × 8) ÷ 2 = 24. In general, area = (leg a × leg b) ÷ 2. If you only know area and one leg, the other leg is 2 × area ÷ that leg. Area plus hypotenuse mode solves both legs when area is not larger than c² ÷ 4.
How do I find the hypotenuse of a right triangle?
Legs 3 and 4 give c = 5 because √(9 + 16) = 5. In general, c = √(a² + b²). Enter any two sides and the calculator shows c with step-by-step substitution using your numbers.
What is a 3-4-5 triangle and how is it used to square a corner?
A 3-4-5 triangle has a 90° corner: measure 3 ft, 4 ft, and 5 ft on the diagonal; if the diagonal matches 5 ft, the corner is square. Use 6-8-10 or other whole-number multiples on larger slabs. Square-corner mode compares your taped diagonal to √(a² + b²).
What are the side ratios of a 30-60-90 triangle?
With short leg 5, the long leg is about 8.66 and the hypotenuse is 10 (ratio 1 : √3 : 2). Scale those three numbers for any size. The calculator notes 30-60-90 and 45-45-90 shapes when angles and sides match within tolerance.
What is the altitude of a right triangle and how do I calculate it?
With legs 3 and 4 and hypotenuse 5, altitude h = 2.4 because (3 × 4) ÷ 5 = 2.4. In general, h = (a × b) ÷ c, with segments p = a² ÷ c and q = b² ÷ c on the hypotenuse. Toggle h on the live diagram to see it drawn.
How do I find the length of a roof rafter or stair stringer?
Rise 6 and run 12 give rafter or stringer length ≈ 13.42 because √(6² + 12²) = √180 ≈ 13.42. In general, c = √(rise² + run²). Switch roof or stair context in the tool for labeled rise and run fields.
Can a right triangle have two equal sides?
Yes: equal legs 7 give hypotenuse 7√2 ≈ 9.90 (45-45-90 triangle). That is the only right triangle with two equal sides because the other acute angle must be 45°. Enter equal legs and results flag 45-45-90.
How do I use sine, cosine, and tangent to solve a right triangle?
With hypotenuse 10 and α = 30°, leg a opposite α is 5 because sin(30°) = 0.5 and 10 × 0.5 = 5. In general, sin(α) = opposite ÷ hypotenuse, cos(α) = adjacent ÷ hypotenuse, and tan(α) = opposite ÷ adjacent. Side-plus-angle mode applies these automatically.
Related Calculators & Tools
More free measurement and quoting tools
- Cubic Feet CalculatorBox and room volume after you square the layout.
- Slope CalculatorPercent grade and rise over run when you already know the triangle legs.
- Roof Pitch Calculatorx:12 pitch presets and degree conversions for rafter layout.
- Square Footage CalculatorArea of rooms and slabs before you check diagonals.
- Concrete CalculatorCubic yards for slabs once layout is square.
- Decking CalculatorBoard counts after stringer and frame math checks out.
- Free Estimate MakerSend a construction or landscaping quote from your phone.
- Invoice GeneratorBill the job when the work is done.
Invoice Mama helps contractors and trades turn layout math into professional estimates and invoices without rebuilding the numbers in a spreadsheet.