Right Triangle Calculator: Solve Legs, Hypotenuse, and Angles
A student can solve sides 3, 4 and 5, then pair angle A with 53.13 deg, but that pairing is wrong. A right triangle calculator checks which leg each angle faces before it accepts the angles.
The right triangle calculator on this page solves two-leg, hypotenuse-and-leg, leg-and-angle and hypotenuse-and-angle data, returns area and perimeter, and names the mistake behind a claimed solution.
Right Triangle Solver
Legs a and b meet at the right angle. Side c is the hypotenuse. Angle A faces side a, angle B faces side b. Angles use degrees.
Using the Right Triangle Calculator
The right triangle calculator on this page starts from the given pattern, then shows each solved value.
Two Legs
Type legs a and b. Default: a = 3 and b = 4 give c = 5, A = 36.87 deg and B = 53.13 deg.
Hypotenuse and Leg
Type hypotenuse c and leg a. Default: c = 13 and a = 5 give b = 12.
Leg and Angle
Type leg a and angle A facing it. Default: a = 10 and A = 30 deg give c = 20.
Hypotenuse and Angle
Type hypotenuse c and angle A. Default: c = 10 and A = 30 deg give a = 5 and b = 8.6603.
Check My Answer
Type claimed sides and angles. Default: a = 3, b = 4, c = 5, A = 53.13 deg and B = 36.87 deg have swapped angles.
Worked Examples
The worked rows below repeat the tool defaults.
| Mode | Default | Answer |
|---|---|---|
| Two Legs | a = 3, b = 4 | c = 5, A = 36.87 deg, B = 53.13 deg |
| Hypotenuse and Leg | c = 13, a = 5 | b = 12 |
| Leg and Angle | a = 10, A = 30 deg | c = 20 |
| Hypotenuse and Angle | c = 10, A = 30 deg | a = 5, b = 8.6603 |
| Claimed answer | a = 3, b = 4, c = 5 | Angles swapped |
Reading the Result
The solved sides and angles come first, followed by area and perimeter. A verdict line names the failed check when a claimed solution does not fit.
What It Solves
The right triangle calculator on this page uses standard notation: legs a and b meet at the right angle, and c faces the right angle.
Angle A faces side a, and angle B faces side b. The two acute angles add to 90 deg. With two known values and at least one side, the tool can return a missing side, a missing angle, area and perimeter. Drop the fixed right angle, and case rules for a general triangle take over.
How to Calculate
The right triangle calculator on this page chooses the starting rule from the given pattern.
The square relationship is a squared + b squared = c squared. Side a is the opposite side for angle A, and side b is the adjacent side for angle A. For angle A, the trigonometric ratios are sin A = a/c, cos A = b/c and tan A = a/b. With c = 10 and A = 30 deg, the facing leg is 5, while 8.66 is the leg next to the angle.
Choose the Starting Rule
| Given | First step | Reason |
|---|---|---|
| Two legs | Square relationship | Both legs are known |
| Hypotenuse and leg | Subtract the squares | One leg is unknown |
| Leg and angle | Sine or tangent | The leg label fixes the ratio |
| Hypotenuse and angle | Sine and cosine | Both legs scale from c |
Two Legs and Hypotenuse With a Leg
The right triangle calculator on this page tests the hypotenuse before it solves side-only data.
For legs 3 and 4, 9 + 16 = 25, so c = 5. The hypotenuse length is 5, longer than either leg. Angle A comes from inverse tangent: arctan(3/4) = 36.87 deg, so B = 53.13 deg. For c = 13 and a = 5, 169 - 25 = 144, so b = 12, with A = 22.62 deg and B = 67.38 deg. A claimed a = 5 with c = 5 leaves b = 0, so no triangle exists.
Check the Hypotenuse
A leg can never reach c. If a leg equals c, the other leg is 0, and if a leg passes c, the square difference is negative.
| Case | Given | Result |
|---|---|---|
| Two legs | a = 3, b = 4 | c = 5, A = 36.87 deg, B = 53.13 deg |
| Hypotenuse and leg | c = 13, a = 5 | b = 12, A = 22.62 deg, B = 67.38 deg |
| Leg equals c | a = 5, c = 5 | No triangle |
Leg With an Angle and Hypotenuse With an Angle
The right triangle calculator on this page names the leg before it picks a ratio.
With a = 10 and A = 30 deg, c = 10 / sin 30 deg = 20 and b = 17.3205. Angles A and B are complementary angles, so B = 60 deg. With c = 10 and A = 30 deg, a = 10 sin 30 deg = 5 and b = 10 cos 30 deg = 8.6603. Using cosine for the facing leg would give 8.66, which belongs to the leg next to the angle.
Name the Leg First
If leg 10 were b next to A = 30 deg, then a = 5.7735 and c = 11.547. The label changes the triangle.
| Given | First value | Result |
|---|---|---|
| a = 10, A = 30 deg | c = 20 | b = 17.3205, B = 60 deg |
| c = 10, A = 30 deg | a = 5 | b = 8.6603, B = 60 deg |
| b = 10, A = 30 deg | a = 5.7735 | c = 11.547 |
Special Cases
The right triangle calculator on this page checks the fixed ratios before it uses a shortcut.
The special right triangles use fixed side ratios. An isosceles right triangle with leg 5 has hypotenuse 5 sqrt(2), about 7.07, not 10. In a 30-60-90 case, shorter leg 5 gives longer leg 8.66 and hypotenuse 10. The square root step is sqrt(25) = 5 in the 3-4-5 case. Doubling the longer leg 8.66 gives 17.32, which is wrong.
| Case | Given | Result |
|---|---|---|
| 45-45-90 | Leg 5 | Hypotenuse 7.07 |
| 30-60-90 | Shorter leg 5 | Longer leg 8.66, hypotenuse 10 |
| Wrong claim | Double 8.66 | 17.32 is wrong |
Area and Perimeter
The right triangle calculator on this page returns area and perimeter after the sides are solved.
The area formula is ab/2. Legs 3 and 4 give area 6, not 12, and perimeter 12. The c = 13 and a = 5 case gives area 30 and perimeter 30. The a = 10 and A = 30 deg case gives area 86.6 and perimeter 47.32. The c = 10 and A = 30 deg case gives area 21.65 and perimeter 23.66.
Check a Claimed Answer
The right triangle calculator on this page checks a claimed solution before it accepts it.
The default claim has sides 3, 4 and 5, but A = 53.13 deg and B = 36.87 deg are swapped. A claimed leg 6 with hypotenuse 5 is impossible. Claimed acute angles 40 deg and 60 deg add to 100 deg, so they fail. For the side next to a 73 deg angle with hypotenuse 9, sine gives 8.61, but cosine gives 2.6313.
| Claim | Verdict |
|---|---|
| A = 53.13 deg for a = 3, b = 4 | Wrong, angles swapped |
| Leg 6 with hypotenuse 5 | Wrong, no triangle |
| Angles 40 deg and 60 deg | Wrong, total 100 deg |
| Side next to 73 deg claimed 8.61 | Wrong, correct value 2.6313 |
Angle Units and Final Values
The right triangle calculator on this page reads angle inputs in deg values.
Set degree mode before typing a deg value. A radian mode value must be converted before it is typed. The checks are sin 60 deg = 0.8660, sin 60 rad = -0.3048, and pi/2 rad = 90 deg. Since pi/6 rad = 30 deg, entering 0.5236 as deg gives 10 sin(0.5236 deg) = 0.0914 instead of 5. Keep full values until the final step: legs 2 and 3 give c = 3.6056 and A = 33.69 deg, while c rounded to 3.61 shifts the angle by more than 0.01 deg.
Use It in Real Problems
The right triangle calculator on this page fits the same checks to ladders, braces and ramps.
A ladder 40 feet long reaches a building 32 feet high. The angle of elevation is arcsin(32/40) = 53.13 deg. A brace with legs 3 and 4 needs a diagonal of 5. A ramp with hypotenuse 10 and angle 30 deg rises 5 and runs 8.6603.
A Ladder Problem
The ground distance is sqrt(1600 - 1024) = 24 feet. The ladder, wall and ground form sides 40, 32 and 24.
Why Answers Can Differ
Answers differ when a leg is allowed to reach the hypotenuse, when the acute angles do not add to 90 deg, or when sine and cosine are swapped. They also differ when a rad value is typed as a deg value, when a special-case ratio is applied to the wrong leg, or when early rounded values are reused. The tool on this page checks those cases before it returns a value.
Questions Students Ask
These questions cover the ratio choices students meet most often, with checked numbers.
Is the hypotenuse always the longest side?
Yes. Legs 3 and 4 give hypotenuse 5, longer than either leg, so a leg can never reach the hypotenuse.
Which ratio fits the side next to a 73 deg angle?
Cosine fits the side next to the angle, so m = 9 cos 73 deg = 2.6313. Sine would give 8.61, the side facing the angle.
Which 30-60-90 statements are true?
The longer leg is sqrt(3) times the shorter leg, and the hypotenuse is twice the shorter leg. Shorter leg 5 gives longer leg 8.66 and hypotenuse 10.
What angle does a 40-foot ladder make with the ground if the building is 32 feet high?
arcsin(32/40) = 53.13 deg, with ground distance 24 feet.
How do I solve a 45-45-90 or 30-60-90 case?
For 45-45-90, the hypotenuse is leg times sqrt(2), so leg 4 gives 5.66. For 30-60-90, the hypotenuse is twice the shorter leg, so shorter leg 3 gives hypotenuse 6 and longer leg 5.2.
Which angle unit should I use?
Match the unit in the problem. The checks are sin 60 deg = 0.8660, sin 60 rad = -0.3048, and pi/2 rad = 90 deg.
Frequently Asked Questions
Final Thought
The right triangle calculator on this page keeps the leg labels, the ratios, and the verdict visible, so each answer can be audited instead of guessed. Match each angle to the leg it faces before you trust any side, because a correct side paired with the wrong angle is still a wrong answer. Check the hypotenuse against the fixed ratios for special triangles, and confirm that the sides and angles agree with each other. When a claimed solution fails, the verdict names the check that failed, so fix that pairing first and then solve again.
