Right Triangle Solver
Solve a right triangle using the Pythagorean theorem
Select what you know about your right triangle, enter the values, and click Solve right triangle to find all sides, angles, perimeter, and area.
Using the Pythagorean theorem and trigonometry to solve right triangles
A right triangle is a triangle that contains one angle of exactly 90 degrees. The side opposite the right angle is called the hypotenuse, and it is always the longest side. The other two sides are called legs. Knowing two pieces of information about a right triangle (either two sides, or one side and one acute angle) is always enough to determine the entire triangle. This solver handles three common input combinations: two legs, hypotenuse and one leg, and one leg and one acute angle.
To use the calculator, select the known values combination from the dropdown. Enter the values in the relevant fields and click Solve right triangle. The result will display both legs, the hypotenuse, both acute angles (in degrees), the perimeter, and the area. The right angle (90 degrees) is always angle C, opposite the hypotenuse.
When both legs are known, the hypotenuse is found using the Pythagorean theorem: c = the square root of (a squared plus b squared). This is the original form of the theorem, familiar from primary and secondary school geometry. For example, a triangle with legs 3 and 4 has hypotenuse the square root of (9 + 16) = the square root of 25 = 5. This 3-4-5 triangle is the most famous Pythagorean triple.
When the hypotenuse and one leg are known, the other leg is found by rearranging the theorem: b = the square root of (c squared minus a squared). This is useful when you know the length of a diagonal and one dimension and need the other. For example, in a room where you know the floor diagonal and the room width, you can calculate the room length.
When one leg and one acute angle are known, trigonometry completes the triangle. If leg a is opposite to angle A, then: b = a divided by tan(A), and c = a divided by sin(A). These follow from the definitions of sine (opposite over hypotenuse) and tangent (opposite over adjacent).
The Pythagorean theorem and its history
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a squared + b squared = c squared. It is named after the ancient Greek mathematician Pythagoras, though it was known to Babylonian and Indian mathematicians centuries before him. It is one of the most proved theorems in mathematics, with hundreds of distinct proofs recorded across the centuries.
Pythagorean triples are sets of three positive integers that satisfy the theorem exactly. The most common example is 3-4-5. Others include 5-12-13, 8-15-17, and 7-24-25. These triples are useful in construction and carpentry because a triangle built with these proportions is guaranteed to have a perfect right angle, allowing builders to square up rooms, frames, and foundations without needing a protractor or angle gauge.
The theorem also generalises to higher dimensions. In three-dimensional space, the diagonal of a rectangular box with dimensions a, b, and c has length equal to the square root of (a squared + b squared + c squared). This is the three-dimensional version of the Pythagorean theorem and is used in engineering, architecture, and physics whenever three-dimensional distances need to be calculated.
Right triangles in trigonometry
Right triangles are the foundation of trigonometry. The three primary trigonometric ratios — sine, cosine, and tangent — are defined in terms of the sides of a right triangle relative to one of its acute angles. Sine of angle A is the ratio of the opposite side to the hypotenuse. Cosine of angle A is the ratio of the adjacent side to the hypotenuse. Tangent of angle A is the ratio of the opposite side to the adjacent side. The mnemonic SOH-CAH-TOA summarises these three definitions.
These ratios allow engineers and surveyors to calculate distances and heights from angle measurements. If you measure the angle of elevation to the top of a building and know how far you are from the base, you can calculate the height using the tangent ratio. This application of right triangle trigonometry underpins navigation, land surveying, astronomy, architecture, and many branches of physics and engineering.
The inverse trigonometric functions (arcsine, arccosine, arctangent) convert a ratio back into an angle, which is how this calculator derives the angle results from the known side lengths. All angle results are displayed in degrees. The sum of both acute angles in a right triangle always equals exactly 90 degrees, so once one acute angle is known, the other is simply 90 minus the first.