Right Triangle Solver
Find every side, angle, the area, and the perimeter of a right triangle from any two known values.
°
Longest side, opposite the right angle
- 1
Square leg a
3² = 3 × 3 = 9 - 2
Square leg b
4² = 4 × 4 = 16 - 3
Hypotenuse c
√(9 + 16) = 5Pythagorean theorem: c = √(a² + b²).
How does this calculator work?
Enter any two known values of a right triangle — two legs, a leg and the hypotenuse, or a side and the acute angle. The solver applies the Pythagorean theorem and trig ratios to return all three sides, both acute angles, the area (a·b/2), and the perimeter (a+b+c) instantly.
Formula
How this is calculated
Enter any two of the four values: the two legs a and b, the hypotenuse c, or the acute angle A (the angle opposite leg a, between 0° and 90°). The solver detects which pair you supplied and reconstructs the rest. Leave the boxes you do not know blank.
With two legs it uses the Pythagorean theorem, c = √(a² + b²), and A = atan2(a, b). With a leg and the hypotenuse it inverts the theorem, e.g. b = √(c² − a²), with the angle from the sine ratio. With a side and angle A it uses the right-triangle ratios sin A = a/c, cos A = b/c, and tan A = a/b. The second acute angle is B = 90° − A because the angles of any triangle sum to 180° and one is the 90° right angle.
The area is a·b / 2 (the two legs are the base and height), and the perimeter is a + b + c. Lengths must be positive, the hypotenuse must exceed either leg, and the supplied angle must be strictly between 0° and 90°; otherwise no valid triangle exists and the result is hidden.
Frequently asked questions
Any two: two legs, a leg plus the hypotenuse, or any side plus the acute angle A. The other side or angle is computed from that pair.
A is the acute angle opposite leg a. Angle B is opposite leg b and equals 90° − A, and angle C is the 90° right angle.
A right triangle is impossible for those inputs — for example the hypotenuse is not the longest side, a length is zero or negative, or angle A is not between 0° and 90°.
Also known as
TG we-Calculate Editorial Team. (2026). Right Triangle Solver [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/right-triangle-calculator
TG we-Calculate Editorial Team. "Right Triangle Solver." TG we-Calculate. 2026. https://we-calculate.com/calculator/right-triangle-calculator.
TG we-Calculate Editorial Team, "Right Triangle Solver," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/right-triangle-calculator
@misc{wecalculate_right_triangle_calculator, title = {Right Triangle Solver}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/right-triangle-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
