Right Triangle Calculator
Use this right triangle calculator to find missing sides, missing angles, hypotenuse, area, perimeter, height to the hypotenuse, and trigonometric ratios. A right triangle has one angle equal to \(90^\circ\). If the legs are \(a\) and \(b\), and the hypotenuse is \(c\), the main formula is the Pythagorean theorem: \[a^2+b^2=c^2\] Enter two known measurements below and the calculator will solve the full triangle with step-by-step formulas.
Calculate a Right Triangle
Select what you know about the triangle. The calculator can solve from two legs, one leg and hypotenuse, one leg and one acute angle, or hypotenuse and one acute angle.
Result
In this calculator, angle \(A\) is opposite leg \(a\), and angle \(B\) is opposite leg \(b\).
Right Triangle Formulas
A right triangle has two legs and one hypotenuse. The hypotenuse is always the longest side and is opposite the right angle.
The missing hypotenuse is found by:
If you know the hypotenuse and one leg, the other leg is found by rearranging the Pythagorean theorem:
The area and perimeter are:
Pythagorean theorem
Use \(a^2+b^2=c^2\) when you know two sides and need the third side.
Trigonometry
Use sine, cosine, or tangent when you know one side and one acute angle.
How to Use the Right Triangle Calculator
- Choose which values you know from the dropdown menu.
- Enter the known side lengths or angle measurement.
- Use positive side lengths only. A triangle side cannot be zero or negative.
- If you enter an angle, use degrees. Angle \(A\) must be between \(0^\circ\) and \(90^\circ\).
- Click Calculate Right Triangle to find all missing values.
- Read the step-by-step formulas for sides, angles, area, perimeter, and trigonometric ratios.
Right Triangle Formula Table
| Measurement | Formula | When to use it |
|---|---|---|
| Hypotenuse | \[c=\sqrt{a^2+b^2}\] | Use when both legs are known. |
| Leg a | \[a=\sqrt{c^2-b^2}\] | Use when the hypotenuse and leg \(b\) are known. |
| Leg b | \[b=\sqrt{c^2-a^2}\] | Use when the hypotenuse and leg \(a\) are known. |
| Area | \[\text{Area}=\frac{ab}{2}\] | Use when both perpendicular legs are known. |
| Perimeter | \[P=a+b+c\] | Add all three side lengths. |
| Angle A | \[A=\tan^{-1}\left(\frac{a}{b}\right)\] | Use when both legs are known and \(A\) is opposite \(a\). |
| Angle B | \[B=90^\circ-A\] | The two acute angles of a right triangle add to \(90^\circ\). |
| Height to hypotenuse | \[h=\frac{ab}{c}\] | Use to find the altitude from the right angle to the hypotenuse. |
| Sine | \[\sin(A)=\frac{a}{c}\] | Opposite side divided by hypotenuse. |
| Cosine | \[\cos(A)=\frac{b}{c}\] | Adjacent side divided by hypotenuse. |
| Tangent | \[\tan(A)=\frac{a}{b}\] | Opposite side divided by adjacent side. |
Worked Examples
Example 1: Find the hypotenuse
A right triangle has legs \(a=3\) and \(b=4\). Find the hypotenuse.
The hypotenuse is \(5\). This is the famous \(3\text{-}4\text{-}5\) right triangle.
Example 2: Find a missing leg
A right triangle has hypotenuse \(c=13\) and leg \(a=5\). Find leg \(b\).
The missing leg is \(12\).
Example 3: Find angles from two legs
A right triangle has legs \(a=6\) and \(b=8\). Find angle \(A\), where \(A\) is opposite side \(a\).
The acute angles are approximately \(36.87^\circ\) and \(53.13^\circ\).
Example 4: Find sides from hypotenuse and angle
A right triangle has hypotenuse \(c=10\) and angle \(A=30^\circ\). Find both legs.
The leg opposite angle \(A\) is \(5\), and the adjacent leg is approximately \(8.66\).
Example 5: Find area and perimeter
A right triangle has legs \(9\) and \(12\). Find area and perimeter.
The area is \(54\) square units, and the perimeter is \(36\) units.
Complete Guide to Right Triangles
A right triangle is a triangle with one angle measuring exactly \(90^\circ\). This angle is called the right angle. The two sides that form the right angle are called the legs, and the side opposite the right angle is called the hypotenuse. The hypotenuse is always the longest side of a right triangle. Right triangles are one of the most important shapes in mathematics because they connect geometry, algebra, trigonometry, measurement, navigation, construction, physics, and engineering.
The most famous formula for right triangles is the Pythagorean theorem. It states that if the legs of a right triangle are \(a\) and \(b\), and the hypotenuse is \(c\), then \(a^2+b^2=c^2\). This formula allows you to find a missing side when you know the other two sides. It is especially useful because it works for every right triangle, no matter the size or angle measurements.
Parts of a right triangle
A right triangle has three sides and three angles. One angle is \(90^\circ\), and the other two angles are acute angles, meaning each is less than \(90^\circ\). Since all angles in a triangle add to \(180^\circ\), the two acute angles in a right triangle must add to \(90^\circ\). This means if one acute angle is known, the other is easy to find by subtracting from \(90^\circ\).
The side labels depend on the angle being considered. The hypotenuse never changes: it is always opposite the right angle. The opposite side is the side across from the chosen acute angle. The adjacent side is the leg next to the chosen angle. In this calculator, angle \(A\) is opposite leg \(a\), and angle \(B\) is opposite leg \(b\). For angle \(A\), side \(a\) is opposite and side \(b\) is adjacent.
Pythagorean theorem
The Pythagorean theorem is the foundation of right triangle side calculations. It says:
This formula means that the square of the hypotenuse equals the sum of the squares of the legs. If you know the two legs, you can calculate the hypotenuse using \(c=\sqrt{a^2+b^2}\). If you know the hypotenuse and one leg, you can calculate the missing leg by subtracting squares and taking a square root.
For example, if the legs are \(5\) and \(12\), then the hypotenuse is \(\sqrt{5^2+12^2}=\sqrt{25+144}=\sqrt{169}=13\). This gives the well-known \(5\text{-}12\text{-}13\) right triangle.
Why the hypotenuse is longest
The hypotenuse is always the longest side because it is opposite the largest angle. In any triangle, the largest side is opposite the largest angle. Since a right angle is \(90^\circ\) and the other two angles are less than \(90^\circ\), the side opposite the right angle must be the longest. The Pythagorean theorem also confirms this: because \(c^2=a^2+b^2\), the value of \(c^2\) is greater than either \(a^2\) or \(b^2\) alone, so \(c\) is greater than either leg.
Finding a missing side
To find a missing side, first identify whether the missing side is the hypotenuse or a leg. If the missing side is the hypotenuse, add the squares of the two legs and take the square root. If the missing side is a leg, subtract the square of the known leg from the square of the hypotenuse and take the square root.
A common mistake is adding squares when solving for a missing leg. If the hypotenuse is known, you must subtract, not add. For example, if \(c=10\) and \(a=6\), then \(b=\sqrt{10^2-6^2}=\sqrt{64}=8\). Adding would give the wrong result.
Trigonometric ratios
Right triangles are also the foundation of trigonometry. The three basic trigonometric ratios are sine, cosine, and tangent. For angle \(A\), with opposite side \(a\), adjacent side \(b\), and hypotenuse \(c\), the ratios are:
Many students remember these ratios using SOH CAH TOA. SOH means sine is opposite over hypotenuse. CAH means cosine is adjacent over hypotenuse. TOA means tangent is opposite over adjacent.
Finding angles
If you know two sides of a right triangle, you can find the acute angles using inverse trigonometric functions. For example, if you know the opposite and adjacent sides for angle \(A\), use:
If you know the opposite side and hypotenuse, use:
If you know the adjacent side and hypotenuse, use:
Once one acute angle is known, the other acute angle is \(90^\circ-A\).
Finding sides from an angle
If you know one side and one acute angle, you can solve the triangle using trigonometric ratios. If the hypotenuse \(c\) and angle \(A\) are known, then:
If leg \(a\) and angle \(A\) are known, then:
If leg \(b\) and angle \(A\) are known, then:
Area of a right triangle
The area of any triangle is one half times base times height. In a right triangle, the two legs are perpendicular, so one leg can be the base and the other can be the height. This makes the area formula very simple:
If the legs are \(7\) and \(10\), then the area is \(\frac{1}{2}(7)(10)=35\) square units. Always remember that area uses square units because it measures two-dimensional space.
Perimeter of a right triangle
The perimeter is the total distance around the triangle. It is found by adding all three side lengths:
For a \(3\text{-}4\text{-}5\) triangle, the perimeter is \(3+4+5=12\). Perimeter uses linear units, such as centimeters, meters, inches, or feet.
Height to the hypotenuse
A right triangle has a special altitude from the right angle to the hypotenuse. If that height is called \(h\), then:
This formula comes from comparing two ways to calculate the area. The area can be written as \(\frac{1}{2}ab\) using the legs, or as \(\frac{1}{2}ch\) using the hypotenuse as the base. Setting them equal gives \(\frac{1}{2}ab=\frac{1}{2}ch\), so \(h=\frac{ab}{c}\).
Special right triangles
Some right triangles have side ratios that appear frequently. A \(45^\circ\text{-}45^\circ\text{-}90^\circ\) triangle has equal legs. If each leg is \(x\), the hypotenuse is \(x\sqrt{2}\). The side ratio is:
A \(30^\circ\text{-}60^\circ\text{-}90^\circ\) triangle has side ratio:
In this triangle, the shortest side is opposite \(30^\circ\), the longer leg is opposite \(60^\circ\), and the hypotenuse is opposite \(90^\circ\).
Pythagorean triples
A Pythagorean triple is a set of three positive integers that satisfies \(a^2+b^2=c^2\). Common triples include \(3,4,5\), \(5,12,13\), \(8,15,17\), \(7,24,25\), and \(9,40,41\). Multiples of these triples also work. For example, multiplying \(3,4,5\) by \(2\) gives \(6,8,10\), which is also a right triangle.
Recognizing Pythagorean triples can save time in exams and mental calculations. If you see legs \(6\) and \(8\), you can quickly identify the hypotenuse as \(10\) because it is a scaled \(3\text{-}4\text{-}5\) triangle.
Right triangles in real life
Right triangles appear in construction, architecture, surveying, navigation, physics, design, computer graphics, and everyday measurement. Builders use right triangles to check whether corners are square. Surveyors use right triangle relationships to measure distances and heights. Engineers use trigonometry to resolve forces into horizontal and vertical components. Computer graphics uses right triangles to calculate distances, rotations, and slopes.
If you know the distance from a building and the angle of elevation to the top, you can estimate the height using tangent. If you know the horizontal and vertical distances between two points, you can find the direct distance using the Pythagorean theorem. These applications make right triangle formulas some of the most practical formulas in mathematics.
Angle of elevation and angle of depression
Right triangles are often used in angle of elevation and angle of depression problems. The angle of elevation is measured upward from a horizontal line. The angle of depression is measured downward from a horizontal line. These angles often create right triangles with a horizontal distance, vertical height, and line of sight. Tangent is especially useful in these problems:
If the horizontal distance is known and the angle of elevation is known, the height can be found by multiplying the distance by \(\tan(\theta)\).
Common mistakes with right triangles
A common mistake is treating the hypotenuse like an ordinary leg. The hypotenuse must always be opposite the right angle and must be the longest side. Another common mistake is using the wrong trigonometric ratio. To avoid this, identify the angle first, then label the opposite, adjacent, and hypotenuse sides relative to that angle.
Students also sometimes forget that calculators must be in degree mode when using degree measurements. If your calculator is in radian mode, angle results will not match degree-based problems. This online calculator uses degrees for angle inputs and outputs.
How to check your answer
To check side lengths, substitute them into the Pythagorean theorem. If \(a^2+b^2=c^2\), the side lengths are consistent with a right triangle. To check angles, confirm that \(A+B+90^\circ=180^\circ\). To check trigonometric ratios, verify that \(\sin(A)=a/c\), \(\cos(A)=b/c\), and \(\tan(A)=a/b\).
Summary
A right triangle has one \(90^\circ\) angle, two legs, and one hypotenuse. The Pythagorean theorem \(a^2+b^2=c^2\) is used to find missing sides when two sides are known. Trigonometric ratios are used when one side and one acute angle are known. The area is \(\frac{1}{2}ab\), the perimeter is \(a+b+c\), and the height to the hypotenuse is \(\frac{ab}{c}\). Mastering right triangles gives a strong foundation for geometry, trigonometry, physics, engineering, and many real-world measurement problems.
Common Mistakes with Right Triangles
Using the wrong side as hypotenuse
The hypotenuse is always opposite the right angle and is always the longest side.
Adding instead of subtracting
When finding a missing leg from the hypotenuse, use subtraction: \(a=\sqrt{c^2-b^2}\).
Mixing up opposite and adjacent
Opposite and adjacent depend on which acute angle you are using. Label the angle before choosing sine, cosine, or tangent.
Using radians instead of degrees
If an angle is given in degrees, make sure calculations use degree mode. This calculator uses degrees.
Related Calculators and Study Tools
These related tools can help with geometry, trigonometry, and triangle calculations:
Right Triangle Calculator FAQs
What is a right triangle?
A right triangle is a triangle with one angle equal to \(90^\circ\).
What is the Pythagorean theorem?
The Pythagorean theorem is \[a^2+b^2=c^2\] where \(a\) and \(b\) are the legs and \(c\) is the hypotenuse.
How do I find the hypotenuse?
Use \[c=\sqrt{a^2+b^2}\] when both legs are known.
How do I find a missing leg?
If the hypotenuse and one leg are known, use \[a=\sqrt{c^2-b^2}\] or \[b=\sqrt{c^2-a^2}\].
How do I find the area of a right triangle?
The area is \[\text{Area}=\frac{1}{2}ab\] where \(a\) and \(b\) are the perpendicular legs.
How do I find the perimeter of a right triangle?
Add all three side lengths: \[P=a+b+c\]
What does SOH CAH TOA mean?
SOH means sine is opposite over hypotenuse. CAH means cosine is adjacent over hypotenuse. TOA means tangent is opposite over adjacent.
Can a right triangle have two right angles?
No. A triangle’s angles add to \(180^\circ\). If a triangle had two right angles, there would be no angle measure left for the third angle.
What is the longest side of a right triangle?
The hypotenuse is always the longest side because it is opposite the \(90^\circ\) angle.
What is the height to the hypotenuse?
The height from the right angle to the hypotenuse is \[h=\frac{ab}{c}\]






