Right Triangle
solver.
Know two sides, or one side and an angle, and get every other side and angle.
- Area
- 6
- Perimeter
- 12
- Altitude to c
- 2.4
Pythagorean triple: 3, 4, 5 are all whole numbers. The rise over the run, a over b, is 0.75, a slope of 75%. The longer leg faces the larger angle.
Your triangle
Drag corner A or BRight angle at C. Leg a = 3 stands opposite angle A = 36.8699°, leg b = 4 lies opposite angle B = 53.1301°, and the hypotenuse c = 5 faces the right angle. The dashed line is the altitude to c, 2.4 long.
Working
- 1Hypotenuse from the Pythagorean theoremc = √(a² + b²) = √(9 + 16) = 5
- 2Angle A from the two legsA = arctan(ab) = arctan(34) = 36.8699°
- 3Angle B is the complementB = 90° − A = 90° − 36.8699° = 53.1301°
- 4Area and perimeterArea = 0.5ab = 0.5 × 3 × 4 = 6perimeter = 12
- 5Checka² + b² = 25 and c² = 25
Trig ratios at A = 36.8699°
| Ratio | Sides | Value |
|---|---|---|
| sin A | ac | 0.6 |
| cos A | bc | 0.8 |
| tan A | ab | 0.75 |
| csc A | ca | 1.6667 |
| sec A | cb | 1.25 |
| cot A | ba | 1.3333 |
At B the same side pairs swap: sin B equals cos A, and tan B equals cot A.
What if leg a changes
| Leg a | c | A | B |
|---|---|---|---|
| 2.1 | 4.5177 | 27.6995° | 62.3005° |
| 2.4 | 4.6648 | 30.9638° | 59.0362° |
| 2.7 | 4.826 | 34.0193° | 55.9807° |
| 3 (yours) | 5 | 36.8699° | 53.1301° |
| 3.3 | 5.1856 | 39.5226° | 50.4774° |
| 3.6 | 5.3814 | 41.9872° | 48.0128° |
| 3.9 | 5.5866 | 44.2748° | 45.7252° |
Steps of 0.3 around your value. From 2.1 to 3.9, c goes from 4.5177 to 5.5866.
Solve a list of triangles
Type or paste rows of leg a and leg b.
| # | Leg a | Leg b |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 |
Missing values for each row
| Given | c | A | Area |
|---|---|---|---|
| 3, 4Area 6 | 5 | 36.8699° | 6 |
| 5, 12Area 30 | 13 | 22.6199° | 30 |
| 1, 1Area 0.5 | 1.4142 | 45° | 0.5 |
| 6, 12Area 36 | 13.4164 | 26.5651° | 36 |
How it's worked out
The labels follow the usual habit. C is the right angle, and c is the hypotenuse, the longest side, across from it. Side a is across from angle A, and side b is across from angle B. So from angle A, side a is the opposite leg and side b is the adjacent leg, the one that touches it. If you know angle B instead, enter 90° minus B as angle A.
Two values fix the triangle when at least one is a length. With two sides, the Pythagorean rule finds the third, and the inverse tangent of the two legs finds angle A.
With an angle and a side, pick the ratio that holds the side you know and the side you want. These are the three that SOHCAHTOA names.
The two acute angles always share 90°, so B is 90° minus A. The rest of the figures come from the standard right triangle results. The altitude is the line from the right angle to the hypotenuse, and it cuts the hypotenuse into two parts. The inradius is the radius of the circle inside the triangle. The circumradius is half the hypotenuse, since the hypotenuse is a diameter of the circle through all three corners.
Worked examples
Nora measures a tree from 50 m away
Nora stands 50 m from a tree and measures the angle of elevation to its top, 35° above flat. The ground is the leg next to her angle, so the height is 50 times the tangent of 35°, which is 35.01 m. Her line of sight is 61.04 m long.
That height starts at her eye, so she adds the height of her eye above the ground. Her reading also has limits. At 34° the height is 33.73 m, and at 36° it is 36.33 m, so one degree either way moves the answer by more than a meter. Quoting a height to the centimeter would claim more than she measured.
Marcus sets a ladder against a wall
A 6 m ladder stands with its foot 1.5 m from the wall. The ladder is the hypotenuse and the gap is a leg, so it reaches 5.81 m up the wall and leans at 75.5° to the ground, 14.5° off the wall.
OSHA rule 1926.1053(b)(5)(i) asks for a gap of about one quarter of the working length of the ladder, and 1.5 m is one quarter of 6 m. On a real site, the working length runs to the top support, which may be lower than the ladder's tip.
Elena works out a roof rafter
A 6 in 12 roof rises 6 inches for every 12 inches of run. Those are the two legs. The roof angle is 26.57°, and each 12 inches of run needs inches of rafter, or 13.42 inches.
Elena divides that by 12 to get a slope factor of 1.118. She multiplies the plan length of any run by it to get the rafter length, before any overhang.
Reading your result
Some right triangles have side ratios worth knowing, and the answer names them when it finds one. Whole-number sets such as 3, 4 and 5 are Pythagorean triples. Any multiple of one is a triple too, so 6, 8 and 10 behave the same way.
| Triangle | Sides a, b, c | Angle A | Area |
|---|---|---|---|
| 30-60-90 | 1, 1.732, 2 | 30° | 0.866 |
| 45-45-90 | 1, 1, 1.414 | 45° | 0.5 |
| 3-4-5 | 3, 4, 5 | 36.87° | 6 |
| 5-12-13 | 5, 12, 13 | 22.62° | 30 |
| 8-15-17 | 8, 15, 17 | 28.07° | 60 |
The altitude splits the triangle. It makes two smaller triangles of the same shape as the first one. In the 3-4-5 triangle it is 2.4 long, and it cuts the hypotenuse into 1.8 and 3.2. Its square is the product of those two parts.
To check a corner is square, measure 3 units along one wall and 4 along the other. If the diagonal between the marks is 5, the corner is a right angle. Larger multiples such as 6, 8 and 10 give a more reliable check on a big floor.
Exact forms appear only when they are true. Two whole-number sides give an exact third side, such as a square root of 74. A whole-number side with an angle of 30°, 45° or 60° gives exact sides too. Decimals and other angles show decimals only.
Common mistakes
- Mixing up opposite and adjacent. Those names depend on which angle you are standing at. Swap A for B and the two legs swap names, while the hypotenuse stays put.
- Giving a leg as long as the hypotenuse. The hypotenuse is always the longest side, so a leg of 5 with a hypotenuse of 5 is rejected. The message reads: The hypotenuse must be longer than either leg.
- Giving two angles and no side. Angles fix the shape but not the size. Every enlarged copy has the same angles, so you need at least one length.
- Using this on a triangle with no right angle. These rules rely on the 90° corner. The triangle solver handles any triangle with the laws of sines and cosines.