All tools › Math Calculators › Geometry
Enter two sides, or a side and an acute angle, to solve a right triangle with its trig ratios.
Solve a right triangle from two values
A right triangle has one 90 degree angle, so two more facts are enough to fix it: two sides, or one side and one of the acute angles. This right triangle calculator takes any such pair and returns the three sides, both acute angles, the area, perimeter, the altitude to the hypotenuse, the inradius and circumradius, and the sine, cosine and tangent of angle A.
It suits trigonometry problems and everyday jobs such as finding how high a ladder reaches or how long a ramp must be.
How to use the right triangle calculator
- Fill in exactly two of the five boxes: Leg a, Leg b, Hypotenuse c, Angle A and Angle B. At least one must be a side.
- Leave the other three boxes empty. The page loads with legs 3 and 4 filled in.
- Set Angle unit to degrees or radians.
Angle A is opposite leg a and angle B is opposite leg b. The hypotenuse c is the longest side, opposite the right angle.
The formulas
a^2 + b^2 = c^2 sin A = a / c cos A = b / c tan A = a / b A + B = 90 degrees
| You enter | How the rest is found |
|---|---|
| Two legs | c = sqrt(a^2 + b^2), A = atan(a / b) |
| A leg and the hypotenuse | Other leg = sqrt(c^2 – leg^2), A = asin(a / c) or acos(b / c) |
| Leg a and an angle | b = a / tan A, c = a / sin A |
| Leg b and an angle | a = b tan A, c = b / cos A |
| Hypotenuse and an angle | a = c sin A, b = c cos A |
If you type angle B, the calculator first turns it into angle A = 90 degrees – B. The remaining results use:
Area = a x b / 2 Altitude to hypotenuse = a x b / c Inradius = (a + b – c) / 2 Circumradius = c / 2
Worked example: a 10 foot ladder at 75 degrees
A 10 foot ladder leans against a wall and makes a 75 degree angle with the ground. Clear the two leg boxes, then enter Hypotenuse c = 10 and Angle A = 75. Leg a is the height reached on the wall and leg b is the distance from the wall to the foot of the ladder.
| Result | Value |
|---|---|
| Leg a (height on the wall) | 9.65926 |
| Leg b (distance from the wall) | 2.58819 |
| Angle B | 15° (0.261799 rad) |
| Perimeter | 22.2474 |
| sin A, cos A, tan A | 0.965926, 0.258819, 3.73205 |
So the ladder reaches about 9.66 feet up the wall with its foot about 2.59 feet out.
What the extra results mean
- Altitude to the hypotenuse: the shortest distance from the right-angle corner to the longest side.
- Inradius: the radius of the largest circle that fits inside the triangle.
- Circumradius: the radius of the circle through all three corners. In a right triangle it is always half the hypotenuse.
- sin A, cos A, tan A: the three basic trig ratios of angle A, taken straight from the sides.
Limits
- The calculator needs exactly two inputs; with more it asks you to clear some.
- Two angles without a side set the shape but not the size, so they are refused.
- An acute angle must be greater than 0 and less than 90 degrees, and the hypotenuse must be longer than either leg.
- Lengths carry no unit. Results are rounded to 6 significant digits.
Frequently asked questions
What does SOH CAH TOA mean?
It is a memory aid: Sine is Opposite over Hypotenuse, Cosine is Adjacent over Hypotenuse, Tangent is Opposite over Adjacent. For angle A, the opposite side is leg a and the adjacent side is leg b.
How do I find an angle from two sides?
Use an inverse trig function. With both legs, A = atan(a / b). With a leg and the hypotenuse, A = asin(a / c).
What are the sides of a 45-45-90 and a 30-60-90 triangle?
In a 45-45-90 triangle the legs are equal and the hypotenuse is a leg times the square root of 2. In a 30-60-90 triangle the hypotenuse is twice the short leg and the long leg is the short leg times the square root of 3.
How do I turn a roof pitch or slope into an angle?
Enter the rise as leg a and the run as leg b, in the same unit. Angle A is then the slope angle. A rise of 3 over a run of 4 gives 36.8699 degrees.
Related calculators
- Pythagorean Theorem Calculator – one missing side with every step, exact radicals and a triple check.
- Triangle Calculator – any triangle from SSS, SAS, ASA, AAS or SSA.
- Slope Calculator – slope, angle and equation of a line through two points.
- Scientific Calculator – sine, cosine, tangent and their inverses for any value.
