Two legs known
Given
Solved
α = arctan(3 ÷ 4) = 36.870°
β = 90° − 36.870° = 53.130°
✦ Pythagorean triple (3, 4, 5)

Find hypotenuse, angles, area, and altitude - with steps
A right triangle has one 90° angle. The side opposite that angle is the hypotenuse (always the longest side). The other two sides are called legs. On this page we label the legs a and b, the hypotenuse c, and the acute angles α and β (they add to 90°). The Pythagorean theorem a² + b² = c² ties the three sides together.
How to Calculate Manually
Given
Solved
✦ Pythagorean triple (3, 4, 5)
Given
Solved
✦ Pythagorean triple (5, 12, 13)
Given
Solved
✦ 30-60-90 special triangle
Given
Solved
✦ 45-45-90 special triangle
Given
Solved
✦ a = b → isosceles right triangle
Given
Solved
✦ Pythagorean triple (6, 8, 10)
Given
Solved
✦ Pythagorean triple (8, 15, 17)
Given
Solved
Construction & accessibility engineering
The problem
A doorway sits 1 foot above street level. ADA regulations require a ramp with no more than a 1:12 slope ratio (1 inch of rise per 12 inches of run). What is the minimum ramp length, and does the slope angle comply?
Known values
Results
Step-by-step
Find ramp length using Pythagorean theorem
Find slope angle α using arctan
Check ADA compliance (max 1:12 slope)
Real-world note: For a 2 ft rise you'd need a 24 ft ramp - the 1:12 ratio scales linearly. Most building codes also require a level 5 ft landing at the top and bottom.
Try this in the calculatorCarpentry & construction
The problem
A gable roof has a 5/12 pitch (5 inches of rise for every 12 inches of horizontal run). The building is 24 ft wide, so the horizontal run from wall to ridge is 12 ft. How long does each rafter need to be?
Known values
Results
Step-by-step
Identify the right triangle (rise, run, rafter)
Find rafter length (hypotenuse)
Find the roof angle
Builder's tip: The 5-12-13 triangle is a Pythagorean triple - rafter length works out to a clean integer. Add 12–18 inches to account for the roof overhang (eave). For a 24 ft wide building you'll need two 13 ft rafters per truss pair.
Try this in the calculatorConsumer electronics & display technology
The problem
TV screen sizes are measured diagonally, not by width or height. A widescreen 16:9 TV is 48 inches wide and 27 inches tall. What is its advertised screen size, and what angle does the diagonal make?
Known values
Results
Step-by-step
Width and height form two legs
Diagonal = hypotenuse
Find the diagonal angle
Interesting aside: A 16:9 screen always has its diagonal at ≈29.36° because the ratio is fixed. You can work backwards too: given a "65-inch TV" in 16:9, width = 65 × 16/√337 ≈ 56.6 in and height ≈ 31.8 in.
Try this in the calculatorSafety & construction
The problem
OSHA's "4-to-1 rule" states a ladder should make a 75° angle with the ground (1 ft out for every 4 ft up). You need to reach a gutter 10 ft above the ground. How far from the wall should the ladder base sit, and how long a ladder do you need?
Known values
Results
Step-by-step
Find base distance using tan
Find ladder length (hypotenuse)
Verify: ladder should extend 3 ft past contact point
Safety rule of thumb: Place the base 1 ft out for every 4 ft of working height. At 75° the tangent is ≈3.73, confirming the 4:1 ratio. An angle steeper than 75° risks the ladder tipping backwards; shallower than 75° risks the base sliding out.
Try this in the calculatorMaritime, aviation & hiking
The problem
A sailboat travels 30 miles due east, then 40 miles due north to reach port. What is the straight-line distance from start to port, and on what compass bearing should the captain have sailed directly?
Known values
Results
Step-by-step
East and north legs form a right angle
Find direct distance (hypotenuse)
Find the compass bearing (angle from north)
Pythagorean triple bonus: 30-40-50 is a 3-4-5 triple scaled by 10. The direct route saves 20 miles - a 28.6% reduction. This is the same triangle Egyptian builders used to lay out right angles, scaled up to ocean distances.
Try this in the calculatorOnce you know any single side, multiply or divide by the ratio constants to find the rest. The short leg (opposite 30°) is always the base unit.
Because both legs are equal, you only need one value to resolve the whole triangle. The hypotenuse is always √2 times the leg.
The 10 triples below are the first 10 primitive Pythagorean triples ordered by hypotenuse. Every triple in the table has GCD(a, b, c) = 1.
Non-primitive triples (like 6-8-10 or 9-12-15) are simply integer multiples of these - multiply any row by any positive integer and you get another valid right triangle with integer sides.
The proportional bars show the relative lengths of each side within the triple, making it easy to see how the shapes become more elongated as the hypotenuse grows.
How to verify any triple
| # | Triple (a, b, c) | Side proportions | Verification | Notes |
|---|---|---|---|---|
| 01 | Most famous 3, 4, 5 | a 3 b 4 c 5 | 9 + 16 = 25 ✓ | Used by Egyptian builders; angles ≈ 36.87° and 53.13° |
| 02 | 5, 12, 13 | a 5 b 12 c 13 | 25 + 144 = 169 ✓ | Roof pitch example above; angles ≈ 22.62° and 67.38° |
| 03 | 8, 15, 17 | a 8 b 15 c 17 | 64 + 225 = 289 ✓ | Perimeter example (P=40); angles ≈ 28.07° and 61.93° |
| 04 | 7, 24, 25 | a 7 b 24 c 25 | 49 + 576 = 625 ✓ | Very flat triangle; angles ≈ 16.26° and 73.74° |
| 05 | 20, 21, 29 | a 20 b 21 c 29 | 400 + 441 = 841 ✓ | Nearly isosceles legs (20 ≈ 21); angles ≈ 43.60° and 46.40° |
| 06 | 9, 40, 41 | a 9 b 40 c 41 | 81 + 1600 = 1681 ✓ | b and c differ by 1 - a pattern: (n, (n²−1)/2, (n²+1)/2) |
| 07 | 12, 35, 37 | a 12 b 35 c 37 | 144 + 1225 = 1369 ✓ | Elongated; angles ≈ 18.92° and 71.08° |
| 08 | 11, 60, 61 | a 11 b 60 c 61 | 121 + 3600 = 3721 ✓ | Another b+1=c triple; angles ≈ 10.39° and 79.61° |
| 09 | 13, 84, 85 | a 13 b 84 c 85 | 169 + 7056 = 7225 ✓ | Extremely flat; angle α ≈ 8.77° |
| 10 | 28, 45, 53 | a 28 b 45 c 53 | 784 + 2025 = 2809 ✓ | More balanced shape; angles ≈ 31.89° and 58.11° |
Every primitive Pythagorean triple can be generated by choosing two positive integers m > n where m and n are coprime and not both odd. The formula is:
Example: m=2, n=1 → a=3, b=4, c=5. Try m=3, n=2 → a=5, b=12, c=13. Try m=4, n=1 → a=15, b=8, c=17. Since there are infinitely many valid (m, n) pairs, there are infinitely many Pythagorean triples.
Use the Pythagorean theorem: c = √(a² + b²), where a and b are the two legs and c is the hypotenuse. For example, if a = 3 and b = 4, then c = √(9 + 16) = 5.
In a right triangle, the square of the hypotenuse equals the sum of the squares of the legs: a² + b² = c². It only applies when one angle is exactly 90°.
Yes. Pick the mode that matches what you know - for example “Leg + opposite angle” if you have a leg and the acute angle opposite it - then enter the values. The calculator uses sine, cosine, or tangent as needed.
A right triangle with acute angles 30° and 60°. Its sides are in the ratio 1 : √3 : 2 (short leg : long leg : hypotenuse). It appears often in geometry and construction.
An isosceles right triangle: both acute angles are 45°, and the legs are equal. Side ratios are 1 : 1 : √2 (leg : leg : hypotenuse).
Area equals half the product of the legs: A = ½ × a × b. You can also use A = ½ × hypotenuse × altitude to the hypotenuse.
The altitude h from the right-angle vertex to the hypotenuse has length h = (a × b) / c. It splits the triangle into two smaller right triangles similar to the original.
Three whole numbers (a, b, c) that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13. They represent side lengths of a right triangle with integer sides.
Multiply degrees by π/180. For example, 45° = π/4 radians. In radian mode you can also type expressions like pi/4 or pi/3.
That exact relationship is equivalent to the angle opposite c being 90°. For other triangles you need the law of cosines: c² = a² + b² − 2ab cos(C).
The hypotenuse must be the longest side. The right angle sits between the two legs; the hypotenuse is opposite the 90° corner. If a leg you typed is larger than the side you labeled as the hypotenuse, fix the labels or your chosen mode before trusting the rest of the solution.
Match your angle unit to how you are thinking. Degrees and radians both work, but switching mental math (for example picturing 45°) while the tool is in radians quietly breaks checks. Align the calculator’s angle mode with your inputs, and use expressions like pi/4 when you mean 45° in radians.
Let α + β = 90° double-check your work. The two acute angles must sum to exactly a right angle (90° or π/2 rad). After a solve, verify that relationship and that each angle still fits the sides you entered.
Area uses both legs, not the hypotenuse. For a right triangle, area is one-half the product of the legs. If you start from hypotenuse plus one leg, solve for the missing leg first, then plug into ½ab.
Redraw when numbers feel impossible. Sketch the triangle with the same labels as the diagram, mark which angle is opposite each side, and compare simple ratios such as leg over hypotenuse to sine or cosine. A quick picture catches swapped legs or wrong mode faster than debating decimals.