Right Triangle Solver

Enter any two known values (two sides, or one side + one angle) and the solver will compute all unknown sides, angles, area, perimeter and the altitude. Visualizer Mode shows a labeled triangle (A,B,C) with sides a,b,c and angles α, β, γ (γ = 90°).

Enter any two known values. Examples: a=3, b=4 ; c=5, α=36.87° ; a=7, α=30°

Right Triangle Solver — how to solve right triangles: methods, formulas and examples

Right triangles are among the simplest geometric figures but the most useful. A right triangle has one angle equal to 90° (a right angle); the side opposite that angle is the hypotenuse (conventionally labeled c), and the other two sides are called legs (commonly a and b). Solving a right triangle means determining the unknown sides and angles from a set of known values. Typically two independent pieces of information are sufficient (two sides, or one side and one acute angle). In this article we cover reliable methods—Pythagorean theorem, trigonometric ratios, area formulas—and provide examples that the interactive solver can compute instantly.

Pythagorean theorem

The Pythagorean theorem is fundamental: for a right triangle with legs a and b and hypotenuse c,

c² = a² + b²

This allows computing the hypotenuse given two legs, or one leg given the other leg and the hypotenuse (rearranged as a = √(c² − b²)). Validation is important: if you enter values inconsistent with c ≥ a and c ≥ b, the solver will flag the input as invalid.

Trigonometric ratios

Trigonometry provides a set of ratios that relate acute angles to side lengths. Choose angle α opposite side b and adjacent to side a (so tan α = b/a). The primary ratios are:

  • sin α = opposite / hypotenuse = b / c
  • cos α = adjacent / hypotenuse = a / c
  • tan α = opposite / adjacent = b / a

Given a side and an acute angle, these identities let you compute the others. For example, if you know a and α, then b = a · tan α and c = a / cos α. If you know c and α, then a = c · cos α and b = c · sin α.

Solving strategies

Which formula to use depends on known data:

  • Two legs (a and b): compute hypotenuse c via Pythagoras; compute α = arctan(b/a) and β = 90° − α.
  • Leg and hypotenuse (a and c): compute b = √(c² − a²); compute angles using cos α = a/c or sin α = b/c.
  • One side and one acute angle (a and α): use trig ratios: b = a·tan α, c = a / cos α.

Area, perimeter and altitude

Additional useful quantities:

  • Area = (1/2) · a · b
  • Perimeter = a + b + c
  • Altitude to hypotenuse (height) from the right angle: h = (a·b)/c

Numerical precision and edge cases

The solver uses double-precision arithmetic. Round-off can appear when inputs are nearly degenerate (very small or very large values). The system validates that computed squared values inside square roots are non-negative within a small tolerance; if negative due to rounding but close to zero, we clamp to zero. If the value is significantly negative, the input is inconsistent and we report an error.

Worked examples (and how the solver automates them)

  1. Case: a = 3, b = 4 — Pythagoras gives c = 5. Angles: α = arctan(4/3) ≈ 53.130°, β = 36.870°.
  2. Case: c = 10, α = 30° — a = c·cos30° ≈ 8.660, b = c·sin30° = 5.
  3. Case: a = 7, α = 20° — b = 7·tan20°, c = 7 / cos20°; the solver computes these and also the area and altitude.

Using the visualizer

The Visualizer mode displays a labeled SVG triangle: vertices A, B, C, where C is the right angle by our layout. Side a is adjacent to angle α at A, side b is opposite α, and side c is the hypotenuse opposite angle γ (90°). Dragging vertex A (or entering its coordinates) instantly recomputes side lengths and angles. Visual learners benefit from seeing how α grows/shrinks as the vertex moves.

Practical notes

Always confirm units: if you measure sides in different units, convert them first. The solver provides a length-unit toggle for convenience. Angles are by default in degrees; switch to radians if you prefer radian outputs for programming or calculus contexts.

Conclusion

Right triangle problems reduce to repeated use of the Pythagorean theorem and the three primary trigonometric ratios. The Right Triangle Solver automates these steps, provides clear derivations in Advanced Mode, and a live visual interface for exploration. Try entering two values now and watch the solution appear instantly — copy or export the steps for your notes.

Frequently Asked Questions

1. Which two inputs are required?
Any two independent values: two sides, or one side plus one acute angle. Enter them and press Solve.
2. How are angles labeled?
We use α at A (adjacent to side a), β at B (adjacent to side b), and γ at C which is the right angle (90°).
3. Can I use radians?
Yes — change Angle units to Radians to input or display angles in radian measure.
4. What does the visualizer do?
It lets you drag vertex A (or set coordinates) and instantly updates sides and angles. The updates are instant (no animation).
5. Is there a way to see algebraic steps?
Yes — Advanced Mode shows step-by-step derivations (Pythagoras and trig identities) with your inputs substituted.
6. What if inputs are inconsistent?
The solver will detect impossible inputs (e.g., c smaller than a) and display an error; check your values and units.
7. Can I export results?
Yes — copy to clipboard or download a CSV with values and steps.
8. Does the solver compute area and height?
Yes — Area = ½ab and altitude to hypotenuse h = (a·b)/c are computed and shown.
9. What precision is used?
JavaScript double precision is used; choose display precision in the UI.
10. Is this suitable for homework checks?
Yes — it is a learning tool to check work. Follow your exam rules about using calculators for graded work.