Right Triangle Calculator, Explained
After reading this you can solve any right triangle from two known values, find every side and angle, and check the area and trig ratios by hand.
A right triangle has one 90^\circ angle. That single fact locks the three sides and two acute angles into a rigid relationship. Give the calculator any two values and it recovers everything else: the sides a, b, c, the acute angles A and B, the area, and the six trigonometric ratios.
Here is the classic hook. A ladder rests against a wall. Its foot is 3 metres from the wall and it reaches 4 metres up. How long is the ladder? Treat the wall and the ground as the two legs. The ladder is the hypotenuse. Pythagoras gives \sqrt{3^2 + 4^2} = \sqrt{25} = 5. The ladder is exactly 5 metres.
What the calculator solves
Label the triangle so the names stay fixed. The right angle sits at C. The side opposite C is the hypotenuse c, always the longest side. The two legs are a and b. Angle A sits opposite leg a, and angle B sits opposite leg b.
- Legs
- The two shorter sides that form the right angle, here
aandb. - Hypotenuse
- The side opposite the right angle,
c. It is always the longest side. - Acute angles
- The two angles smaller than 90^\circ. They add to 90^\circ, so A + B = 90^\circ.
You can start from any two of these facts. The calculator offers four entry modes: two legs, a leg with the hypotenuse, a leg with an acute angle, or the hypotenuse with an acute angle. Two independent pieces of information always fix the shape, because the right angle counts as the third.
When to use it, and when not
Use this page whenever you know a triangle contains a 90^\circ angle. Roof pitches, ramps, screen diagonals, surveying offsets, and vector components all reduce to right triangles.
Do not force a general triangle into these modes. If none of your angles is exactly 90^\circ, use the Triangle solver instead, which handles SSS, SAS, ASA and SSA cases. If you only need a trig value such as \sin 37^\circ, the Trigonometry calculator is quicker.
Two acute angles are not two independent values. Since A + B = 90^\circ, knowing A already gives B. To fix the size of the triangle you need at least one side length.
The formulas and why they work
The Pythagorean theorem links the three sides.
Here a and b are the legs and c is the hypotenuse. Rearranged, a missing leg is a = \sqrt{c^2 - b^2} and a missing hypotenuse is c = \sqrt{a^2 + b^2}.
The angles come from the ratios of sides. For the acute angle A opposite leg a:
Each ratio compares two sides. The sine of A is the opposite leg over the hypotenuse. The cosine is the adjacent leg over the hypotenuse. The tangent is opposite over adjacent. To get the angle itself, apply the inverse function, for example A = \arctan(a/b).
The area uses the two legs as base and height, because they meet at a right angle.
No separate height is needed. In a right triangle each leg is the height relative to the other leg.
The mnemonic SOH-CAH-TOA records these three ratios: Sine = Opposite/Hypotenuse, Cosine = Adjacent/Hypotenuse, Tangent = Opposite/Adjacent.
Worked example: the 3-4-5 triangle
Two legs, a = 3 and b = 4
This reproduces the demo button: mode Two legs a, b, with a = 3 and b = 4.
- Hypotenuse: c = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5.
- Angle A: \tan A = 3/4 = 0.75, so A = \arctan(0.75) \approx 36.87^\circ.
- Angle B: B = 90^\circ - 36.87^\circ = 53.13^\circ.
- Area: \tfrac{1}{2} \cdot 3 \cdot 4 = 6 square units.
- Check the ratios: \sin A = 3/5 = 0.6, \cos A = 4/5 = 0.8. And 0.6^2 + 0.8^2 = 0.36 + 0.64 = 1, exactly as \sin^2 A + \cos^2 A = 1 requires.
The 3-4-5 triangle is the smallest right triangle with whole-number sides. Scale every side by the same factor and it stays a right triangle: 6-8-10, 9-12-15, and so on.
Watch one leg and see the shape change
Fix the hypotenuse and vary an acute angle. As A grows from 0^\circ to 90^\circ, the opposite leg a stretches from 0 to the full hypotenuse while the adjacent leg b shrinks from the full hypotenuse to 0. The widget below lets you drag that angle.
Reading and interpreting the results
Every solved triangle should pass three quick checks.
First, the hypotenuse is the longest side. If your reported c is shorter than a leg, you have mislabelled a side or picked the wrong mode. In the 3-4-5 case, c = 5 beats both 3 and 4.
Second, the two acute angles add to 90^\circ. In the example 36.87 + 53.13 = 90. If they do not, an angle was entered in radians or a side was swapped.
Third, the larger side faces the larger angle. Leg b = 4 is longer than leg a = 3, and indeed B = 53.13^\circ exceeds A = 36.87^\circ. The trig ratios reported (sine, cosine, tangent for each acute angle) let you feed the result into further calculations without re-deriving them.
| Angle | Degrees | Sine | Cosine | Tangent |
|---|---|---|---|---|
| A | 36.87 | 0.6000 | 0.8000 | 0.7500 |
| B | 53.13 | 0.8000 | 0.6000 | 1.333 |
Notice how the sine of one acute angle equals the cosine of the other. That is the cofunction identity, a direct result of A + B = 90^\circ.
Common mistakes
The errors below account for most wrong answers.
- Adding instead of subtracting under the root. To find a leg from the hypotenuse, subtract: a = \sqrt{c^2 - b^2}. Using \sqrt{c^2 + b^2} gives a value larger than the hypotenuse, which is impossible.
- Degrees versus radians. Angle A here is in degrees. If \sin 30 returns -0.988 somewhere, that tool is reading 30 as radians.
- Confusing opposite and adjacent. For angle A the opposite leg is
aand the adjacent leg isb. Swap them and you compute the complement angle instead. - Assuming a leg-hypotenuse pair with the leg longer than the hypotenuse. That has no solution. A leg is always shorter than
c.
An acute angle entry must stay strictly between 0^\circ and 90^\circ. At exactly 0^\circ or 90^\circ the triangle collapses to a line and the area drops to zero.
Related tools
For shapes without a right angle, use the Triangle solver. When you have corner coordinates instead of side lengths, the Polygon area calculator and the Coordinate geometry toolkit compute distances and areas directly. For circular parts such as arcs and chords, see the Circle calculator, and for regular figures the Regular polygon calculator. Extending to three dimensions, the 3D solid geometry calculator covers volume and surface area.
Frequently asked questions
How many values do I need to solve a right triangle?
Exactly two, as long as one of them is a side. The right angle counts as a third known fact, so two sides, or one side and an acute angle, fully determine the triangle. Two angles alone leave the size undetermined.
Which side is the hypotenuse?
The one opposite the right angle. It is always the longest side. In a 3-4-5 triangle the hypotenuse is 5.
Do the two acute angles always add to 90 degrees?
Yes. The three angles of any triangle sum to 180^\circ, and the right angle takes 90^\circ, leaving 90^\circ for the other two. So 36.87^\circ + 53.13^\circ = 90^\circ.
What is a Pythagorean triple?
A set of three whole numbers that satisfy a^2 + b^2 = c^2. Common ones are 3-4-5, 5-12-13, and 8-15-17. Any multiple of a triple is also a triple, so 6-8-10 works too.
Can I enter the angle in radians?
The angle field expects degrees. To convert, multiply radians by 180/\pi \approx 57.30. For example 0.5 radians is about 28.65^\circ.