Right triangle calculator
Enter any two values, get the whole right triangle.
Fill in exactly two boxes; leave the others empty.
How do I solve a right triangle?
You need two values besides the right angle, at least one of them a side. With legs 3 and 4 the hypotenuse is 5 and the angles are 36.87° and 53.13°.
How do I find a side from an angle?
With SOH-CAH-TOA: sin A = opposite ÷ hypotenuse, cos A = adjacent ÷ hypotenuse, tan A = opposite ÷ adjacent. A 10-foot hypotenuse at 30° has an opposite side of 10 × sin 30° = 5 ft and an adjacent side of 8.66 ft.
How do I find an angle from two sides?
Use the inverse functions: A = tan⁻¹(opposite ÷ adjacent). For 3 and 4, tan⁻¹(0.75) = 36.87°.
What is the height to the hypotenuse?
The perpendicular from the right angle to the hypotenuse: leg × leg ÷ hypotenuse. For 3-4-5 it is 12 ÷ 5 = 2.4.
Where is this used?
Roof pitches, ramps, stair stringers, ladders against a wall — the roof pitch and stair calculators apply the same math to building.
What are the special right triangles?
A 45-45-90 triangle has sides in the ratio 1 : 1 : √2, so a leg of 5 gives a hypotenuse of 7.07. A 30-60-90 triangle has sides 1 : √3 : 2, so the side opposite 30° is half the hypotenuse. A 3-4-5 triangle and its multiples are right triangles whose sides are whole numbers.
What can be solved
A right triangle has five unknowns besides the 90° angle: two legs, the hypotenuse and two acute angles, and the two acute angles add up to 90°. Knowing any two of the five, with at least one a side, fixes the rest. Two sides give the third by the Pythagorean theorem and the angles by the inverse trigonometric functions; one side and one acute angle give the others by sine, cosine or tangent. Two angles alone are not enough, because they fix only the shape, not the size.
Worked examples
Given the leg a = 5 and the hypotenuse c = 13, the other leg is √(169 − 25) = 12, the angles are 22.62° and 67.38°, and the area is 30. Given the angle A = 30° and the hypotenuse c = 10, the opposite leg is 10 × sin 30° = 5 and the adjacent leg is 10 × cos 30° = 8.66. Given the angle B = 40° and the leg b = 8 opposite it, the other leg is 8 ÷ tan 40° = 9.53 and the hypotenuse is 8 ÷ sin 40° = 12.45. The altitude to the hypotenuse of the 5-12-13 triangle is 5 × 12 ÷ 13 = 4.62.
Common mistakes
Mixing up opposite and adjacent is the main one: both are named relative to the angle you are using, so the same leg is opposite to one acute angle and adjacent to the other. A calculator left in radian mode instead of degree mode is the second, and it makes sin 30° come out as −0.99. Third, using the wrong inverse function: when you know the two legs, use the inverse tangent. And an angle of 90° or more cannot be one of the acute angles.
Sources: OpenStax Algebra and Trigonometry (right triangle trigonometry, special right triangles) and OpenStax Precalculus 2e. Related: Pythagorean theorem calculator, triangle calculator, trigonometry calculator and roof pitch calculator.