How to use the right triangle calculator
- Enter exactly two of the five values: legs a and b, hypotenuse c, and acute angles A and B (in degrees). Leave the others blank.
- At least one value must be a side length. Angle A is opposite side a; angle B is opposite side b.
- Read the results and the to-scale diagram. Units are whatever you used for the sides.
How the calculation works
In a right triangle the two acute angles add to 90°, and the sides satisfy the Pythagorean theorem a² + b² = c². With two legs, the hypotenuse is √(a² + b²). With a leg and the hypotenuse, the other leg is √(c² − a²). With a side and an angle, the trigonometric ratios sin A = a/c, cos A = b/c and tan A = a/b give the rest.
The calculator rejects impossible inputs: a leg that is equal to or longer than the hypotenuse, angles of 90° or more, or two angles without a side.
Formula
Worked examples
Legs 3 and 4
c = √(9 + 16) = 5. A = arctan(3/4) = 36.87°, B = 53.13°. Area = 6, perimeter = 12.
Hypotenuse 10, angle A = 30°
a = 10 × sin 30° = 5; b = 10 × cos 30° = 8.660254; B = 60°.
Assumptions and limitations
- Only right triangles. For other triangles use the law of sines or cosines.
- Results are shown to six significant decimals; irrational results such as √2 are approximations.
Frequently asked questions
How do I find the hypotenuse?
Square both legs, add them, and take the square root: c = √(a² + b²).
Can I solve a right triangle with only two angles?
No. Two angles fix the shape but not the size, since infinitely many similar triangles share them. You need at least one side length.
Why does it say my triangle is impossible?
The hypotenuse is always the longest side. If a leg is equal to or longer than the hypotenuse, no right triangle exists.