Right Triangle Calculator
Calculate missing sides, angles, area, perimeter, altitude, and trigonometric values for right triangles using the Pythagorean theorem and trigonometric functions.
Enter any 2 values
Give any 2 of the 5 values — two legs, a leg + hypotenuse, a leg + angle, or hypotenuse + angle. Angle C is always 90°.
Right triangle calculator
A right triangle has exactly one 90° angle. The two sides flanking the right angle are the legs (often labelled a and b), and the side opposite is the hypotenuse c — always the longest side. Because the angle at the right vertex is fixed, only two more independent measurements are needed to pin down the entire triangle.
This tab gives you any two values — two legs, a leg + the hypotenuse, a leg + an acute angle, or the hypotenuse + an acute angle — and returns the missing side, the missing angle, the area, the perimeter, the altitude to the hypotenuse, and the six trigonometric ratios (sin, cos, tan, csc, sec, cot) for the named acute angle.
How the right triangle solver works
Pythagorean theorem
When you give two legs, the hypotenuse is the square root of the sum of their squares: c = √(a² + b²). When you give a leg and the hypotenuse, the other leg is √(c² − leg²).
Trigonometric ratios
When you give a side and an acute angle, the other sides follow from sin θ = opposite / hypotenuse, cos θ = adjacent / hypotenuse, and tan θ = opposite / adjacent.
Angle relations
The two acute angles always sum to 90°, so giving one immediately gives the other: B = 90° − A. No need to solve for both.
Altitude to the hypotenuse
Drop a perpendicular from the right-angle vertex onto the hypotenuse and you split the triangle into two smaller similar triangles. The altitude is h = a·b / c.
Ways to use the right triangle solver
Building a roof or staircase
Given the run (horizontal) and rise (vertical), find the rafter length and pitch angle.
Sailing or aviation
Convert a heading and distance into north–south and east–west components.
Surveying
Find an inaccessible distance by sighting an angle from a known baseline.
Trigonometry homework
Generate the six trig ratios for any acute angle to validate textbook problems.
Pythagorean triples
Quickly verify whether (3, 4, 5), (5, 12, 13), (7, 24, 25), or any candidate triple forms a right triangle.
30-60-90 and 45-45-90 checks
Plug in the angle and the calculator returns the exact decimal expansions of √2/2, √3/2, and 1/2.
Best practices
Leg must be shorter than the hypotenuse
If you enter a leg larger than the hypotenuse, no right triangle exists. The solver returns a clear error.
Each acute angle is strictly < 90°
If you typed 90° as a non-right angle, the triangle would be degenerate. The solver enforces 0° < angle < 90°.
Watch units
Mixing inches and centimeters gives nonsense. Pick one unit for all three sides.
Tricky cases
When only two angles are given
Two angles alone determine the shape but not the size. The solver requires at least one side.
Floating-point noise near 0° or 90°
Trig values like tan(89.99°) become huge; treat extreme angles as approximations and double-check against the Pythagorean form.
Negative trig values
In a right triangle the acute angles are between 0° and 90°, so all six trig ratios are positive. Negative values indicate an angle outside the right-triangle range.
Right triangle formulas
Pythagorean theorem
a² + b² = c²
Sine
sin θ = opposite / hypotenuse
Cosine
cos θ = adjacent / hypotenuse
Tangent
tan θ = opposite / adjacent
Acute-angle sum
A + B = 90°
Area
Area = ½ · a · b
Perimeter
P = a + b + c
Altitude to hypotenuse
h = a · b / c
Common right-triangle mistakes
Mixing up opposite and adjacent
Opposite always means "across from the angle"; adjacent means "next to the angle and not the hypotenuse". Drawing the triangle and labelling first prevents the swap.
Square-rooting the wrong difference
If you know the hypotenuse and one leg, subtract squared values first, then square-root:
√(c² − a²), not√(c − a)·√(c + a)(which is the same value but easy to compute wrong).
Frequently asked questions
Related Calculators
Pair the right-triangle solver with these geometry and math tools.
- Pythagorean Theorem CalculatorSolve any side of a right triangle, plus area, perimeter, and angles.
- Circle CalculatorFind area, circumference, diameter, and radius from any one known value.
- Slope CalculatorSlope, angle, distance, midpoint, intercepts, and the line equation with an interactive coordinate-plane graph.
- Scientific CalculatorAdvanced trig, log, exponent, root, factorial, and memory functions.
- Percentage CalculatorCalculate % of a number, percentage change, and reverse percentages.