How to use the right triangle calculator
Pick any two values you know: a leg, the hypotenuse, an acute angle, the slope, the altitude to the hypotenuse, the area or the perimeter. Type them in and the calculator solves the rest. You get all three sides, both angles in degrees, radians and degrees-minutes-seconds, the area, perimeter, altitude, inradius, circumradius, medians, trig ratios and the slope as a grade, ratio and roof pitch. The working is shown step by step, and the diagram is drawn to scale.
Lengths can carry their own units, such as 1.5 m, 45 cm, 8 ½ or 13 ft 6 in, and are converted to the unit you choose. In feet or inches, the answers also appear to the nearest sixteenth of an inch. Angles can be typed as 35.5 or 35° 30′, or in radians as 0.6 or pi/6. A slope can be typed as 8%, 1:12, 1 in 12 or 7/12.
Sides, angles and formulas
The two sides that meet at the right angle are the legs, a and b. The side facing the right angle is the hypotenuse, c, and it is always the longest. Angle α faces leg a and angle β faces leg b. Because the angles of a triangle add up to 180°, α + β = 90°.
- Area: A = ½ab, since the legs are a base and its height.
- Altitude to the hypotenuse: h = ab ÷ c. It splits c into two parts, a²/c and b²/c, and h² equals their product.
- Circumradius: R = c ÷ 2. The midpoint of the hypotenuse is the same distance from all three corners.
- Inradius: r = (a + b − c) ÷ 2, the radius of the largest circle that fits inside.
Why two values are enough
The right angle is already known, so two more facts fix the triangle, as long as at least one of them gives a size. Two angles, or an angle and a slope, only fix the shape. A triangle with angles of 30° and 60° could be any size.
Some pairs, such as the hypotenuse and the area, don’t say which leg is which. The calculator then finds the legs from their sum and product, lists the shorter one as a, and notes that swapping them gives the mirror image. Some pairs are impossible. With a hypotenuse of 10, the area can be at most 25, which is the 45°–45°–90° triangle. The calculator says so and gives the limit, rather than returning a wrong answer.
Special right triangles and Pythagorean triples
Two shapes come up so often that their ratios are worth knowing. In the 45°–45°–90° triangle, half a square, the sides are in the ratio 1 : 1 : √2. In the 30°–60°–90° triangle, half an equilateral triangle, they are 1 : √3 : 2, so the short leg is exactly half the hypotenuse. With α = π/6 and c = 8, the legs are 4 and 4√3, and the calculator shows these exact forms.
A Pythagorean triple is a set of whole numbers that fits a² + b² = c². Besides the familiar 3–4–5, there are 8–15–17, 7–24–25 and 20–21–29. Any two whole numbers m > n generate one: m² − n², 2mn and m² + n². With m = 5 and n = 2, this gives 21, 20 and 29. The calculator spots triples and their multiples, such as 5 ft 3 in, 7 ft and 8 ft 9 in, which is 3–4–5 scaled by 1.75.
Slope, grade and roof pitch
The hypotenuse of a right triangle is a slope, and its steepness can be given in several ways. All of them are the rise divided by the run, which is tan α.
- Percentage grade, used for roads and paths: a rise of 8 m over 100 m is an 8% grade, an angle of about 4.6°.
- Ratio, used for ramps and drains: a 1:12 ramp rises 1 unit for every 12 along, about 4.8°.
- Roof pitch, used in North American carpentry: a 7/12 pitch rises 7 inches for every 12 inches of run, about 30.3°.
A 100% grade is 45°, not vertical. Choose Slope as one of the known values to work in any of these forms.
Worked examples
Leaning a ladder. A common guideline puts the foot of a ladder a quarter of its length from the wall. For a 6 m ladder, that is 1.5 m. It then reaches √(6² − 1.5²) ≈ 5.81 m up the wall and stands at about 75.5° to the ground.
Measuring a tree. From 20 m away, the top of a tree is 35° above the horizontal. The height above eye level is 20 × tan 35° ≈ 14.0 m. Add your eye height, about 1.6 m, for a tree roughly 15.6 m tall.
Cutting a rafter. A 7/12 roof over a run of 13 ft 6 in rises 13.5 × 7 ÷ 12 = 7.875 ft, or 7 ft 10 ½ in. The rafter line is √(13.5² + 7.875²) ≈ 15.63 ft, about 15 ft 7 ⁹⁄₁₆ in, before adding any overhang.
Planning a ramp. To climb 0.6 m at 1:12, a ramp needs 7.2 m of horizontal run. The sloping surface is 7.22 m long and rises at 4.76°.
Working backwards. Which right triangle has a perimeter of 90 cm and an area of 180 cm²? Since (a + b)² − c² = 2ab = 4A and a + b = P − c, the hypotenuse is c = (P² − 4A) ÷ 2P = 41 cm. The legs then add to 49 and multiply to 360, so they are 9 cm and 40 cm.
Where right triangles are used
- Building and DIY: stair stringers, rafters, ramps, braces, and checking that a corner is square with the 3-4-5 rule.
- Heights and distances: trees, buildings and cliffs from an angle of elevation, or the width of a river from a baseline.
- Navigation and maps: the straight-line distance between two points from their east and north offsets.
- Screens and frames: the diagonal from the width and height. For ready-made screen sizes, the rectangle calculator works from the aspect ratio.
- Physics and engineering: splitting a force or velocity into horizontal and vertical parts, and the forces on a slope.
Common mistakes
- Putting the wrong side as c. The hypotenuse is opposite the right angle, not just any long side. A leg longer than c is impossible, and the calculator will say so.
- Mixing up opposite and adjacent. For angle α, leg a is opposite and leg b is adjacent. For β, it is the other way round.
- Leaving a calculator in radians. sin 30 gives −0.988 in radians, not 0.5. Choose the angle unit here before typing angles.
- Using Pythagoras on other triangles. It only works with a 90° angle. For any other triangle, use the general triangle calculator, which applies the laws of sines and cosines.
- Rounding too early. Keep full precision until the final answer, especially when one result feeds the next.