Of the eight values of a right triangle (three sides, two angles, height to the hypotenuse, area and perimeter), fill in exactly the two you know. Using the Pythagorean theorem and trig ratios, everything else is calculated with steps.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formulas and figures
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Of the eight values of a right triangle (the three sides \(a\), \(b\), \(c\), the two angles \(\alpha\), \(\beta\), the height to the hypotenuse \(h\), the area \(S\) and the perimeter \(L\)), enter the two you know and get all the rest on the spot
- Any pair works, such as "the other sides from the hypotenuse and an angle", "a side from the area and one side" or "the three sides from the perimeter and one more value" (except two angles alone)
- Angles are shown in both degrees (°) and radians. Step-by-step work shows which formulas were used
- A plain-language explanation of the Pythagorean theorem and the trig ratios (sin, cos, tan), and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
In the US, the steepness of a roof is given as a pitch such as "4/12" (it rises 4 inches for every 12 inches across). This is exactly a right triangle, and the angle is \(\tan^{-1}(4 \div 12) \approx 18.4^\circ\). The rafter is the hypotenuse, so for a horizontal run of 15 feet (a rise of 5 feet), it needs \(\sqrt{15^2 + 5^2} \approx 15.81\) feet, longer than the run.
The carpenter's framing square even has rafter tables printed on it. Building work has always gone hand in hand with right triangle calculations.
Something too tall to measure directly can be measured from the angle you look up at it from a distance. If you stand 30 feet from a tree and the angle of elevation is 40°, the part above your eyes is \(30 \times \tan 40^\circ \approx 25.2\) feet. Add your eye height of 5 feet, and the tree is about 30 feet tall.
Surveying with a theodolite (an instrument that measures angles precisely) and measuring standing trees in forestry are this very calculation: finding the other sides from one side and one angle.
A ladder is dangerous if it is too steep or too flat. OSHA's rule for a ladder leaning on a wall is that the base should be out from the wall by one quarter of the ladder's working length (the 4-to-1 rule), which is an angle of about 75°. A 20-foot ladder set at 75° stands \(20 \times \cos 75^\circ \approx 5.2\) feet from the wall and reaches \(20 \times \sin 75^\circ \approx 19.3\) feet up.
"How high will this ladder reach?" and "How far out should the feet go?" are trig ratio calculations used on job sites every day.
A "6% grade" on a road sign means the road rises 6 feet for every 100 feet across, which is the tangent value itself. As an angle, it is \(\tan^{-1} 0.06 \approx 3.4^\circ\). That may sound gentle, but it is a steep hill for heavy trucks, and the warning signs are there for them.
Once you understand how percent grade relates to an angle, you can estimate the steepness of a hill from the elevation changes in a map app, or make sense of railroad grades, where even 2% is steep for a train.
The ADA Standards limit the slope of a wheelchair ramp to 1:12 (1 inch of rise for every 12 inches across). To climb a 30-inch rise at 1:12, the ramp needs \(30 \times 12 = 360\) inches (30 feet) of horizontal run. The actual ramp surface is the hypotenuse, \(\sqrt{360^2 + 30^2} \approx 361.2\) inches, and the angle is about 4.8°.
"Is there enough room?" and "Is a ready-made ramp long enough?" can be checked on the spot with a right triangle calculation.
Formulas and figures
Symbols and terms
Symbols
| \(a\) | a | One of the two sides that form the right angle (a leg). It is the side across from angle \(\alpha\). |
| \(b\) | b | The other side that forms the right angle (a leg). It is the side across from angle \(\beta\). |
| \(c\) | c | The hypotenuse, the longest side of a right triangle, across from the right angle. |
| \(\alpha\) | alpha | The angle across from side \(a\). It is a Greek letter often used to name angles. |
| \(\beta\) | beta | The angle across from side \(b\). \(\alpha + \beta = 90^\circ\). |
| \(h\) | h | The height with the hypotenuse as the base: the length of the perpendicular from the right-angle corner to the hypotenuse. \(h = a \times b \div c\). |
| \(S\) | S | The area. \(S = a \times b \div 2\). (US textbooks often use \(A\) for area.) |
| \(L\) | L | The perimeter (the sum of the three sides). \(L = a + b + c\). (US textbooks often use \(P\) for perimeter.) |
| \(\sin\alpha\) | sine alpha | The opposite side as a fraction of the hypotenuse. \(\sin\alpha = a \div c\). (Example - \(\sin 30^\circ = 0.5\)) |
| \(\cos\alpha\) | cosine alpha | The adjacent side as a fraction of the hypotenuse. \(\cos\alpha = b \div c\). (Example - \(\cos 60^\circ = 0.5\)) |
| \(\tan\alpha\) | tangent alpha | The opposite side as a fraction of the adjacent side. \(\tan\alpha = a \div b\). (Example - \(\tan 45^\circ = 1\)) |
| \(\tan^{-1}\) | inverse tangent (arctangent) | The calculation that works backward from a tangent value to the angle. On a scientific calculator, it is the tan⁻¹ key. It is written with "−1", but it means "the inverse calculation", not the reciprocal. |
Terms
| right triangle | A triangle with one angle of exactly 90° (a right angle). The other two angles are always acute (less than 90°) and add up to 90°. |
| hypotenuse | The side across from the right angle. It is always the longest of the three sides of a right triangle. |
| Pythagorean theorem | The relation \(a^2 + b^2 = c^2\) between the three sides of a right triangle. It is taught in Grade 8. If you know two sides, you can calculate the third. |
| trig ratio | A ratio between the sides of a right triangle (sine, cosine or tangent). The angle decides the ratio, so from an angle and one side you can calculate the other sides. It is taught in Geometry. |
| radian | Another unit of angle. The central angle whose arc is as long as the radius is 1 radian, and \(180^\circ = \pi\) radians. To convert from degrees, use degrees × π ÷ 180. |
| Pythagorean triple | A set of three whole numbers that are the sides of a right triangle. Well-known ones are 3, 4, 5 and 5, 12, 13 and 8, 15, 17. |
| isosceles right triangle | A right triangle whose two legs are equal. Both acute angles are 45°, and the side ratio is \(1 : 1 : \sqrt{2}\). It is also called the 45-45-90 triangle, one of the special right triangles. |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
| Area of a triangle (Grade 6) |
|
| Angle sum of a triangle (Grade 8) |
|
| The Pythagorean theorem and square roots (Grade 8) |
|
| Right triangle trigonometry (Geometry) |
|
How to calculate it in Excel
| Hypotenuse c | 10 |
| Angle α (degrees) | 30 |
| Side a | =B1*SIN(RADIANS(B2)) |
| Side b | =B1*COS(RADIANS(B2)) |
| Side a | 3 |
| Side b | 4 |
| Angle α (degrees) | =DEGREES(ATAN(B1/B2)) |
| Angle β (degrees) | =90-B3 |
| Side a | 3 |
| Side b | 4 |
| Area S | =B1*B2/2 |
| Side a | 3 |
| Side b | 4 |
| Hypotenuse c | 5 |
| Height h | =B1*B2/B3 |
| Side a | 3 |
| Side b | 4 |
| Hypotenuse c | 5 |
| Perimeter L | =B1+B2+B3 |
Excel's SIN and COS functions take radians, so an angle entered in degrees is converted with the RADIANS function. The other way around, ATAN returns radians, so the DEGREES function converts it back to degrees.
The first table shows 5 for side a and about 8.66 for side b. The second shows about 36.87 for angle α and about 53.13 for angle β. Just replace the inputs in column B with your own numbers.
How to calculate it in Google Sheets
| Hypotenuse c | 10 |
| Angle α (degrees) | 30 |
| Side a | =B1*SIN(RADIANS(B2)) |
| Side b | =B1*COS(RADIANS(B2)) |
| Side a | 3 |
| Side b | 4 |
| Angle α (degrees) | =DEGREES(ATAN(B1/B2)) |
| Angle β (degrees) | =90-B3 |
| Side a | 3 |
| Side b | 4 |
| Area S | =B1*B2/2 |
| Side a | 3 |
| Side b | 4 |
| Hypotenuse c | 5 |
| Height h | =B1*B2/B3 |
| Side a | 3 |
| Side b | 4 |
| Hypotenuse c | 5 |
| Perimeter L | =B1+B2+B3 |
How to calculate it in Python
import math
side_a = 3.0 # leg a
side_b = 4.0 # leg b
side_c = math.sqrt(side_a ** 2 + side_b ** 2) # hypotenuse (Pythagorean theorem)
angle_alpha = math.degrees(math.atan(side_a / side_b)) # angle α (degrees)
angle_beta = 90 - angle_alpha # angle β (degrees)
height = side_a * side_b / side_c # height to the hypotenuse
area = side_a * side_b / 2 # area
perimeter = side_a + side_b + side_c # perimeter
print(f"Hypotenuse c: {side_c}")
print(f"Angle α: {angle_alpha} degrees = {math.radians(angle_alpha)} radians")
print(f"Angle β: {angle_beta} degrees = {math.radians(angle_beta)} radians")
print(f"Height h: {height}")
print(f"Area S: {area}")
print(f"Perimeter L: {perimeter}")
How to write it in LaTeX and other math languages (copy and paste)
a = c·sin α, b = c·cos α
a = c \sin\alpha, \quad b = c \cos\alpha
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>a</mi><mo>=</mo><mi>c</mi><mo>⁢</mo><mi>sin</mi><mo>⁡</mo><mi>α</mi>
<mo>,</mo>
<mi>b</mi><mo>=</mo><mi>c</mi><mo>⁢</mo><mi>cos</mi><mo>⁡</mo><mi>α</mi>
</mrow>
</math>
a = c sin(alpha), b = c cos(alpha)
a == c Sin[α] && b == c Cos[α]
a := c*sin(alpha); b := c*cos(alpha);
a = c*sind(alpha); b = c*cosd(alpha);
a = c sin α, b = c cos α
α = tan⁻¹(a ÷ b), β = 90° − α
\alpha = \tan^{-1}\frac{a}{b}, \quad \beta = 90^\circ - \alpha
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>α</mi><mo>=</mo>
<msup><mi>tan</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup>
<mo>⁡</mo>
<mfrac><mi>a</mi><mi>b</mi></mfrac>
<mo>,</mo>
<mi>β</mi><mo>=</mo><mrow><mn>90</mn><mo>°</mo></mrow><mo>−</mo><mi>α</mi>
</mrow>
</math>
alpha = arctan(a/b), beta = 90 - alpha
α == ArcTan[a/b] && β == Pi/2 - α
alpha := arctan(a/b); beta := Pi/2 - alpha;
alpha = atand(a/b); beta = 90 - alpha;
α = tan^(-1)(a/b), β = 90° - α
S = a × b ÷ 2
S = \frac{1}{2}ab
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>S</mi><mo>=</mo>
<mfrac><mrow><mi>a</mi><mo>⁢</mo><mi>b</mi></mrow><mn>2</mn></mfrac>
</mrow>
</math>
S = (a b)/2
a b / 2
S := a*b/2;
S = a*b/2;
S = ab/2
h = a × b ÷ c
h = \frac{ab}{c}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>h</mi><mo>=</mo>
<mfrac><mrow><mi>a</mi><mo>⁢</mo><mi>b</mi></mrow><mi>c</mi></mfrac>
</mrow>
</math>
h = (a b)/c
a b / c
h := a*b/c;
h = a*b/c;
h = ab/c
L = a + b + c
L = a + b + c
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>L</mi><mo>=</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>+</mo><mi>c</mi>
</mrow>
</math>
L = a + b + c
a + b + c
L := a + b + c;
L = a + b + c;
L = a + b + c
How to have ChatGPT do the calculation
You are a math calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). In a right triangle, leg a is 3 and the hypotenuse c is 5. Find each of the following: 1. The other leg b (Pythagorean theorem) 2. Angles α and β (in both degrees and radians) 3. The height h with the hypotenuse as the base 4. The area S and the perimeter L Show the formulas you used and the numbers from the execution result.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
