About this tool
The right triangle calculator finds the missing side, both acute angles, and the area of a right triangle from two known sides. Students, carpenters, and DIYers use it to check square corners, size ramps and braces, or work through geometry homework. In a right triangle, the Pythagorean theorem states that the square of the hypotenuse equals the sum of the squares of the two legs: .
How it works
Pick a mode first. With two legs, enter the two sides that meet at the right angle; with leg and hypotenuse, enter one leg and the longest side, the one opposite the right angle. Use the same unit for both, such as centimeters or feet.
The calculator completes the triangle with the Pythagorean theorem, then finds the acute angle opposite the first leg from the arctangent of the two legs. The second angle is 90 degrees minus the first, and the area is half the product of the legs. Results are not rounded for you, so round them to the precision of your measurements.
Example
With the default legs of 3 and 4, the hypotenuse is . The angle opposite the first leg is , about 36.8698976458 degrees, and the other acute angle is 90 minus that, about 53.1301023542 degrees. The area is half the product of the legs: square units. Choosing leg and hypotenuse mode with 3 and 5 returns the same triangle, with a second leg of 4.
Assumptions and limits
The tool needs two sides; it does not solve from a side and an angle, and it only handles right triangles. Both lengths must use the same unit, and the area is in that unit squared. In leg and hypotenuse mode, the hypotenuse must be longer than the leg. Angles are in degrees. Results carry many decimal places: legs of 1 and 1 give a hypotenuse of about 1.41421356237 and two 45-degree angles.
Frequently asked questions
How do you find the hypotenuse of a right triangle?
Square each leg, add the results, and take the square root: . Legs of 3 and 4 give a hypotenuse of 5. In the calculator, choose the two-legs mode and enter both legs. Legs of 5 and 12 give a hypotenuse of exactly 13.
How do you find a missing leg if you know the hypotenuse?
Rearrange the Pythagorean theorem: . With a hypotenuse of 5 and a leg of 3, the missing leg is 4. Use the leg and hypotenuse mode for this. The hypotenuse must be longer than the known leg, otherwise no right triangle exists.
What is the 3-4-5 rule in construction?
Because a triangle with sides 3, 4, and 5 is a right triangle, builders measure 3 units along one line and 4 along the other; if the diagonal between those marks is 5 units, the corner is square. Multiples such as 6-8-10 work the same way. Larger multiples are handy on long walls, because a longer diagonal shows small errors more clearly.
How are the angles of a right triangle calculated?
The angle opposite a leg equals the arctangent of that leg divided by the other leg. The two acute angles always add up to 90 degrees. With legs of 3 and 4, the angles are about 36.87 and 53.13 degrees. To convert degrees to radians, multiply by π/180.
How long is a ramp that rises 0.5 m over a 6 m run?
Treat the rise and the horizontal run as the two legs, entering 0.5 as the first leg and 6 as the second. The ramp surface is the hypotenuse, m, and the angle opposite the rise is about 4.76 degrees. Building rules for ramp slopes vary by country, so check the local requirement.
Link with your values
Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.
| Parameter | Value | If omitted |
|---|---|---|
modeKnown sides | one of: legs, hypotenuse | default legs |
leg_aFirst leg | number; allowed > 0 | required |
leg_bSecond leg or hypotenuse | number; allowed > 0; used with mode = legs | required |
hypotenuseSecond leg or hypotenuse | number; allowed > 0; used with mode = hypotenuse | required |
Examples
?leg_a=5&leg_b=12?leg_a=8&hypotenuse=17
Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.
Result elements: [data-result-block="right_triangle_calculator"]