Formula and Method for the Right Triangle Calculator
A right triangle has one 90° interior angle formed by two perpendicular sides called legs (a and b). The side opposite the right angle, always the longest side, is the hypotenuse (c). Given the two leg lengths, this calculator finds the hypotenuse with the Pythagorean theorem, then derives the area, perimeter, and both acute angles from the same three sides.
How the calculation works
Enter the two legs and choose the unit they are measured in. The calculator squares each leg, adds the squares, and takes the square root to get the hypotenuse: c = √(a² + b²). Because the legs are perpendicular, the area is half their product: Area = ½ × a × b. The perimeter is simply the sum of all three sides: P = a + b + c. For the angles, the calculator uses inverse tangent: the angle opposite leg a is A = arctan(a / b), and the angle opposite leg b is B = 90° − A, since the two acute angles of any right triangle always sum to 90°.
Common mistakes
- Mixing up legs and hypotenuse: the two inputs here are the legs (the sides that meet at the right angle), not the hypotenuse. If you only know one leg and the hypotenuse, solve for the missing leg first with b = √(c² − a²) before using this tool.
- Units: area is reported in square units (ft², m²) while the hypotenuse and perimeter stay in linear units (ft, m). A 3 ft × 4 ft leg pair gives a 6 ft² area, not 6 ft.
- Degrees vs. radians: the angle results are given in degrees. If you are plugging arctan into your own spreadsheet or code, remember many programming languages return radians by default and need conversion (multiply by 180/π).
Real-world applications
- Construction and framing use the 3-4-5 right-triangle rule (a scaled version of this calculator) to square corners of walls, decks, and foundations.
- Roofing and ramp design use the leg lengths and angles to determine pitch, slope, and the length of rafters or ramps.
- Surveying and navigation use right-triangle relationships to find distances that cannot be measured directly, such as the height of a building from its shadow.
- Physics and engineering decompose forces, velocities, and vectors into perpendicular components using the same Pythagorean and trigonometric relationships.