Fundamentals
What Is a Right Triangle?
A right triangle is a triangle with one interior angle of exactly 90°. The 90° angle is the right angle, and the side facing it is the hypotenuse — the longest of the three sides.
A right triangle has 3 sides and 3 angles, named by a convention that this calculator and most textbooks share:
- Side a and side b are the legs, the two non-hypotenuse sides that meet at the right angle.
- Side c is the hypotenuse, the side opposite angle C.
- Angle A faces side a, angle B faces side b, and angle C measures 90°.
Many sources write the two acute angles as α (alpha) and β (beta), and use θ (theta) for whichever angle is under discussion. Angle A and α name the same measurement, so a formula written with α works unchanged with angle A.
Figure 1 — Anatomy of a right triangle
Two rules hold in every right triangle:
- The two acute angles are complementary, so angle A + angle B = 90°. The three angles sum to 180° and angle C already takes 90° of that total.
- The three sides satisfy the Pythagorean theorem, a² + b² = c². The relationship holds in reverse too: a triangle whose longest side squared equals the sum of the other two squares is right-angled.
A right triangle is scalene when all three sides differ in length, and isosceles when the two legs match, which forces both acute angles to 45°. No right triangle is equilateral, because equal sides require three 60° angles.
A right triangle whose three sides are all integers is a Pythagorean triangle, and the three lengths form a Pythagorean triple such as 3, 4, 5 or 5, 12, 13.
The altitude h runs from the right-angle vertex perpendicular to the hypotenuse. The altitude cuts the original triangle into 2 smaller triangles, each similar to the other and to the triangle they came from.
Right triangles are the foundation of trigonometry. Sine, cosine, tangent and cotangent are defined as ratios of right triangle side lengths, which is why a right triangle side and angle calculator doubles as a tool for evaluating trigonometric functions.
Using the tool
How to Use the Right Triangle Calculator
- Choose a tab. Solve triangle handles every input combination, Pythagorean theorem narrows the fields to the three sides, and Special triangles scales a 30-60-90 or 45-45-90 triangle from one measurement.
- Type the first known value into its field — side a, side b, side c, angle A, angle B or the area.
- Type the second known value. The diagram redraws to scale and every remaining field fills in at once.
- Read the results: the missing side lengths, both acute angles, the area, the perimeter, the altitude, the inradius and the circumradius.
- Drag either violet handle on the diagram to reshape the triangle, or press the arrow keys for single-step changes. Set the decimals control to 0, 2, 4 or 6 places.
There are 6 input combinations the calculator accepts:
- two legs — side a and side b
- one leg and the hypotenuse — side a and side c, or side b and side c
- one leg and an acute angle — side a and angle A, or side b and angle B
- the hypotenuse and an acute angle — side c and angle A, or side c and angle B
- one leg and the area
- the hypotenuse and the area
Two angles are the one pair the calculator rejects. Angle A and angle B fix the shape of the triangle and say nothing about its size, so infinitely many triangles satisfy them.
Side lengths
How to Find the Missing Side of a Right Triangle
To find the missing side of a right triangle, apply the Pythagorean theorem when two sides are known, or a trigonometric ratio when one side and one acute angle are known. There are 3 starting points, and each has its own formula.
Find the Hypotenuse Using Two Sides
To find the hypotenuse from the two legs, add the squares of the legs and take the square root.
c = √(a² + b²) The formula is the Pythagorean theorem rearranged for c. Squaring a leg produces the area of a square built on that leg, and the two smaller squares together equal the square built on the hypotenuse.
Figure 2 — The Pythagorean theorem as areas
Worked example
A leg of 3 in (7.62 cm) and a leg of 4 in (10.16 cm) give a hypotenuse of 5 in (12.7 cm).
c = √(3² + 4²) c = √(9 + 16) c = √25 = 5 in Find a Leg Using the Hypotenuse and One Side
To find a leg from the hypotenuse and the other leg, subtract the known leg's square from the hypotenuse's square and take the square root.
a = √(c² - b²) b = √(c² - a²) Worked example
A hypotenuse of 13 cm (5.12 in) and a leg of 5 cm (1.97 in) give a second leg of 12 cm (4.72 in).
b = √(13² - 5²) b = √(169 - 25) b = √144 = 12 cm The hypotenuse has to be longer than either leg. A value of c smaller than or equal to a known leg produces a negative number under the square root, and the calculator reports the conflict rather than returning a figure.
Find a Side Using an Angle
To find a side from an angle and one known side, pick the trigonometric ratio that connects the two. There are 6 formulas, and the right one depends on which side you hold.
a = c à - sin(α) · b = c à - cos(α) a = b à - tan(α) · b = a à - tan(β) c = a / sin(α) · c = b / cos(α) Worked example
A hypotenuse of 10 m (32.81 ft) with α = 30° gives both legs directly.
a = 10 à - sin(30°) = 10 à - 0.5 = 5 m b = 10 à - cos(30°) = 10 à - 0.8660 = 8.66 m The law of sines reaches the same answers. In any triangle a / sin(A) = b / sin(B) = c / sin(C), and a right triangle sets sin(C) = sin(90°) = 1, which collapses the law of sines to c = a / sin(A). Right triangle trigonometry is the shortcut, not a separate system.
Given the area and one leg instead of an angle, divide twice the area by the known leg. A right triangle is a scalene triangle whose one leg acts as the base while the other acts as the height, so the triangle area formula simplifies to area = a à - b / 2, and b = 2 à - area / a.
Angles
How to Find the Angles of a Right Triangle
To find the angles of a right triangle, apply an inverse trigonometric function to the ratio of two known sides. Angle C is fixed at 90°, so one calculation settles the triangle: the second acute angle is the complement of the first.
Given β: α = 90° - β Given α: β = 90° - α Which function to use depends on which two sides you know. The three primary ratios are named relative to the angle you are solving for, which is the meaning behind SOHCAHTOA — sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, tangent is opposite over adjacent.
Figure 3 — Naming sides relative to an angle
Find an Angle Using Sine
To find an angle from the opposite side and the hypotenuse, divide the opposite side by the hypotenuse and take the inverse sine (arcsin).
sin(α) = a / c → α = arcsin(a / c) sin(β) = b / c → β = arcsin(b / c) Worked example
A side a of 5 and a hypotenuse c of 13 give an angle α of 22.62°.
sin(α) = 5 / 13 = 0.3846 α = arcsin(0.3846) = 22.62° β = 90° - 22.62° = 67.38° Find an Angle Using Cosine
To find an angle from the adjacent side and the hypotenuse, divide the adjacent side by the hypotenuse and take the inverse cosine (arccos).
cos(α) = b / c → α = arccos(b / c) cos(β) = a / c → β = arccos(a / c) Worked example
A side b of 12 and a hypotenuse c of 13 give the same angle α of 22.62°.
cos(α) = 12 / 13 = 0.9231 α = arccos(0.9231) = 22.62° Find an Angle Using Tangent
To find an angle from the two legs, divide the opposite leg by the adjacent leg and take the inverse tangent (arctan). Tangent is the ratio to reach for when the hypotenuse is unknown, because it uses the two non-hypotenuse sides.
tan(α) = a / b → α = arctan(a / b) tan(β) = b / a → β = arctan(b / a) cot(α) = b / a → α = arccot(b / a) cot(β) = a / b → β = arccot(a / b) Worked example
Legs of 5 and 12 give an angle α of 22.62° and an angle β of 67.38°.
tan(α) = 5 / 12 = 0.4167 α = arctan(0.4167) = 22.62° β = arctan(12 / 5) = arctan(2.4) = 67.38° Inverse sine, inverse cosine, inverse tangent and inverse cotangent all return the same angle for the same triangle. Pick the one whose two sides you already hold, and the calculator will confirm the value against the other ratios. For the choosing rule in depth see SOHCAHTOA explained, and for the angle-finding method itself see finding an angle with inverse trig.
| Triangle | Leg a | Leg b | Hypotenuse | Angle A | Angle B | Area | Relative area |
|---|---|---|---|---|---|---|---|
| 3 – 4 – 5 | 3 | 4 | 5 | 36.87° | 53.13° | 6 | 3% |
| 5 – 12 – 13 | 5 | 12 | 13 | 22.62° | 67.38° | 30 | 14% |
| 8 – 15 – 17 | 8 | 15 | 17 | 28.07° | 61.93° | 60 | 29% |
| 7 – 24 – 25 | 7 | 24 | 25 | 16.26° | 73.74° | 84 | 40% |
| 20 – 21 – 29 | 20 | 21 | 29 | 43.6° | 46.4° | 210 | 100% |
| 9 – 40 – 41 | 9 | 40 | 41 | 12.68° | 77.32° | 180 | 86% |
| 45° – 45° – 90° ★ | 10 | 10 | 14.14 | 45° | 45° | 50 | 24% |
| 30° – 60° – 90° ★ | 10 | 17.32 | 20 | 30° | 60° | 86.6 | 41% |
Any multiple of a Pythagorean triple is itself a triple - scale 3-4-5 by ten and 30-40-50 is still a perfect right triangle.
Trigonometric ratios for the standard angles
Sine, cosine and tangent values for the angles you are most likely to meet.
| Angle | sin | cos | tan |
|---|---|---|---|
| 0° | 0 | 1 | 0 |
| 30° | 1/2 = 0.5 | √3/2 ≈ 0.8660 | √3/3 ≈ 0.5774 |
| 45° | √2/2 ≈ 0.7071 | √2/2 ≈ 0.7071 | 1 |
| 60° | √3/2 ≈ 0.8660 | 1/2 = 0.5 | √3 ≈ 1.7321 |
| 90° | 1 | 0 | ∞ |
Full solutions
How to Solve a Right Triangle
To solve a right triangle, work out all 6 measurements — 3 sides and 3 angles — from 2 known values. Angle C is already known at 90°, which leaves 5 unknowns and 2 clues.
Solving a Right Triangle With Two Sides
To solve a right triangle from two sides, run three steps in order.
- Find the third side with the Pythagorean theorem.
- Find angle A with an inverse trigonometric function of two known sides.
- Find angle B as 90° minus angle A.
Worked example
A hypotenuse of 13 in (33.02 cm) and a leg a of 5 in (12.7 cm) solve completely:
b = √(13² - 5²) = √144 = 12 in α = arcsin(5 / 13) = 22.62° β = 90° - 22.62° = 67.38° The triangle is 5, 12, 13 with angles of 22.62°, 67.38° and 90°.
Solving a Right Triangle With One Side and One Angle
To solve a right triangle from one side and one acute angle, find the second angle first, then use a trigonometric ratio for each missing side.
- Subtract the known acute angle from 90° to get the other acute angle.
- Multiply or divide the known side by sine, cosine or tangent to reach each missing side.
- Check the result against the Pythagorean theorem.
Worked example
A hypotenuse of 10 m (32.81 ft) and an angle α of 30° solve completely:
β = 90° - 30° = 60° a = 10 à - sin(30°) = 5 m b = 10 à - cos(30°) = 8.66 m check: 5² + 8.66² = 25 + 75 = 100 = 10² Can You Solve a Right Triangle With Only One Side?
No, one side alone cannot solve a right triangle. A single length fixes the scale of the triangle and leaves the shape open, so infinitely many right triangles share that side. Pair the side with one of the non-right angles, and the triangle becomes solvable through 6 routes:
- Multiply the hypotenuse by sin(θ) to get the length of the side opposite the angle.
- Multiply the hypotenuse by cos(θ) to get the side adjacent to the angle.
- Divide the adjacent non-hypotenuse side by cos(θ) to get the hypotenuse.
- Multiply the adjacent side by tan(θ) to get the side opposite the angle.
- Divide the opposite side by sin(θ) to get the hypotenuse.
- Divide the opposite side by tan(θ) to get the side adjacent to the angle.
One side and the area work as a pair too. Feed both to the calculator and the second leg falls out of area = a à - b / 2, with the hypotenuse following from the Pythagorean theorem.
Derived values
Right Triangle Measurements
A solved right triangle yields 5 derived measurements beyond its sides and angles: area, perimeter, altitude, inradius and circumradius. The calculator reports all 5 alongside the side lengths.
Area of a Right Triangle
To find the area of a right triangle, multiply the two legs and divide by 2. The legs are perpendicular, so one serves as the base and the other as the height.
area = (a à - b) / 2 area = (c à - h) / 2 A triangle with legs of 6 cm (2.36 in) and 8 cm (3.15 in) covers 24 cm² (3.72 in²). The second form uses the hypotenuse as the base and the altitude as the height, and returns the identical figure.
Perimeter of a Right Triangle
To find the perimeter of a right triangle, add the three side lengths.
P = a + b + c A 3-4-5 triangle measured in feet has a perimeter of 12 ft (3.66 m). Given only the two legs, calculate the hypotenuse first, since the perimeter needs all three sides.
Altitude of a Right Triangle
The altitude of a right triangle is the perpendicular distance from the right-angle vertex to the hypotenuse. Multiply the legs and divide by the hypotenuse.
h = (a à - b) / c The altitude splits the hypotenuse into two segments, p and q, and creates two smaller triangles similar to the original. Three geometric mean relationships follow from that similarity, set out in full in the guide to the right triangle altitude theorem.
h² = p à - q a² = p à - c b² = q à - c Figure 4 — The altitude and its two segments
Inradius and Circumradius
The inradius r is the radius of the largest circle that fits inside the triangle, and the circumradius R is the radius of the circle through all three vertices.
r = (a + b - c) / 2 R = c / 2 The circumradius of a right triangle is always half the hypotenuse, because the hypotenuse is a diameter of the circumscribed circle. A 3-4-5 triangle has an inradius of 1 and a circumradius of 2.5.
- Area
- 6
- Perimeter
- 12
- Altitude
- 2.4
- Inradius
- 1
- Circumradius
- 2.5
The five derived measurements of a 3-4-5 right triangle.
Reference
Special Right Triangles
There are 4 right triangles worth memorising: the 30-60-90 triangle, the 45-45-90 triangle, the 3-4-5 triangle and the 5-12-13 triangle. The first two have fixed angle sets and fixed side ratios, and the last two are Pythagorean triples with whole-number sides. The special right triangles guide compares the first two side by side.
30-60-90 Triangle
The 30-60-90 triangle has sides in a ratio of 1 : √3 : 2. The shortest side faces the 30° angle, the middle side faces the 60° angle, and the hypotenuse faces the right angle at exactly twice the shortest side.
Figure 5 — 30-60-90 triangle
Knowing one side of a 30-60-90 triangle determines the other two. A short leg of 5 cm (1.97 in) gives a long leg of 5√3 = 8.66 cm (3.41 in) and a hypotenuse of 10 cm (3.94 in). The triangle is used to evaluate trigonometric functions for multiples of π/6, which is where the exact values sin(30°) = 1/2 and cos(30°) = √3/2 come from.
45-45-90 Triangle
The 45-45-90 triangle has sides in a ratio of 1 : 1 : √2. Both legs match in length, which makes it the isosceles right triangle and gives it 1 line of symmetry.
Figure 6 — 45-45-90 triangle
In a 45-45-90 triangle, a leg of 5 in (12.7 cm) gives a hypotenuse of 5√2 = 7.07 in (17.96 cm). A hypotenuse of 5 works the other way: divide by √2 for legs of 3.54 each. The 45-45-90 triangle evaluates trigonometric functions for multiples of π/4, where sin(45°) and cos(45°) both equal √2/2.
3-4-5 Right Triangle
The 3-4-5 triangle is the smallest Pythagorean triple, with acute angles of 36.87° and 53.13°. Whole-number sides make it the standard check for a square corner on a building site, a method covered in the 3-4-5 triangle rule.
Figure 7 — 3-4-5 triangle on a unit grid
5-12-13 Right Triangle
The 5-12-13 triangle is the second-smallest Pythagorean triple, with acute angles of 22.62° and 67.38°. Its sides satisfy 25 + 144 = 169, and its narrow shape suits layout work where a 3-4-5 triangle is too wide for the space.
Figure 8 — 5-12-13 triangle
Scaling a triple keeps the right angle intact. Multiply 3-4-5 by 10 for 30-40-50, or 5-12-13 by 2 for 10-24-26, and both remain right triangles with the same acute angles. A fuller reference list lives in the guide to Pythagorean triples.
| Triangle | Leg a | Leg b | Hypotenuse | Angle A | Angle B | Area | Relative area |
|---|---|---|---|---|---|---|---|
| 3 – 4 – 5 | 3 | 4 | 5 | 36.87° | 53.13° | 6 | 3% |
| 5 – 12 – 13 | 5 | 12 | 13 | 22.62° | 67.38° | 30 | 14% |
| 8 – 15 – 17 | 8 | 15 | 17 | 28.07° | 61.93° | 60 | 29% |
| 7 – 24 – 25 | 7 | 24 | 25 | 16.26° | 73.74° | 84 | 40% |
| 20 – 21 – 29 | 20 | 21 | 29 | 43.6° | 46.4° | 210 | 100% |
| 9 – 40 – 41 | 9 | 40 | 41 | 12.68° | 77.32° | 180 | 86% |
| 45° – 45° – 90° ★ | 10 | 10 | 14.14 | 45° | 45° | 50 | 24% |
| 30° – 60° – 90° ★ | 10 | 17.32 | 20 | 30° | 60° | 86.6 | 41% |
Any multiple of a Pythagorean triple is itself a triple - scale 3-4-5 by ten and 30-40-50 is still a perfect right triangle.
Trigonometric ratios for the standard angles
Sine, cosine and tangent values for the angles you are most likely to meet.
| Angle | sin | cos | tan |
|---|---|---|---|
| 0° | 0 | 1 | 0 |
| 30° | 1/2 = 0.5 | √3/2 ≈ 0.8660 | √3/3 ≈ 0.5774 |
| 45° | √2/2 ≈ 0.7071 | √2/2 ≈ 0.7071 | 1 |
| 60° | √3/2 ≈ 0.8660 | 1/2 = 0.5 | √3 ≈ 1.7321 |
| 90° | 1 | 0 | ∞ |
Applications
Real-World Uses of Right Triangles
Right triangle geometry appears wherever a height, a distance or an angle has to be worked out without measuring it directly. There are 4 fields that lean on it daily: construction, engineering, navigation and home improvement. Worked cases are collected in right triangle word problems.
Figure 9 — Three everyday right triangles
Construction and Architecture
Builders use right triangles to square corners, set roof pitch and cut stair stringers. The 3-4-5 method squares a frame without a set square: measure 3 ft (0.91 m) along one edge, 4 ft (1.22 m) along the other, and adjust until the diagonal reads exactly 5 ft (1.52 m).
Roof pitch is the rise over the run of a roof, and the rafter length is the hypotenuse of that triangle. A rise of 6 in per 12 in of run (152 mm per 305 mm) gives a rafter of √(6² + 12²) = 13.42 in per foot of run and a pitch angle of arctan(6 / 12) = 26.57°.
Engineering and Physics
Engineers split forces and velocities into perpendicular components using right triangles. A force of 200 N applied at 35° above the horizontal resolves into a horizontal component of 200 à - cos(35°) = 163.8 N and a vertical component of 200 à - sin(35°) = 114.7 N.
Slope calculations follow the same pattern. A wheelchair ramp built to a 1:12 gradient rises 1 in for every 12 in of run (25.4 mm per 305 mm), which is an angle of arctan(1 / 12) = 4.76°.
Navigation and Surveying
Surveyors measure an angle of elevation or depression and convert it into a height or a distance. Standing 50 m (164 ft) from a tower with an angle of elevation of 32° puts the tower at 50 à - tan(32°) = 31.24 m (102.5 ft) above eye level.
Traverse reduction breaks each survey leg into north-south and east-west components with sine and cosine, then sums them. Pilots and sailors use the identical method to resolve a heading and a distance into a change in latitude and longitude.
DIY and Home Improvement
Home projects reach for right triangles when a diagonal matters. The diagonal of a rectangle is the hypotenuse of two right triangles, so a 40 in by 30 in (101.6 cm by 76.2 cm) opening has a diagonal of √(1600 + 900) = 50 in (127 cm).
Checking that diagonal against its partner is the fastest way to confirm a frame, a deck or a tiled floor is square. Equal diagonals mean square corners. Right triangles also size a TV wall mount, a garden bed brace and the cut angle on a mitred trim piece.
Questions