Right Triangle Calculator
A right triangle with legs of 3 and 4 has a hypotenuse of 5, area of 6, and acute angles of 36.87 and 53.13 degrees. This right triangle calculator solves one specific case: a triangle whose two perpendicular legs are known. Enter both legs in the same unit to find the hypotenuse, area, perimeter, and two acute angles. The calculation assumes the entered sides meet at exactly 90 degrees.
Quick answer
A right triangle has one 90-degree angle, and the side opposite it is the hypotenuse.
What this tells you
- •A right triangle has one 90-degree angle, and the side opposite it is the hypotenuse.
- •The two legs are the sides that form the right angle.
- •The hypotenuse comes from the Pythagorean theorem, a squared plus b squared equals c squared.
- •The two acute angles always add up to 90 degrees.
- •Area uses square units, while all three side lengths and the perimeter use the original linear unit.
- •Swapping the two legs leaves the sides, area, and perimeter unchanged but swaps the angle labels.
- •Sides and area are rounded to 4 decimal places, while angles are rounded to 2 decimal places.
How to Use
- 1Enter the positive length of leg a, one of the two sides that form the right angle.
- 2Enter leg b in the same unit. Convert mixed feet, inches, meters, or other units before calculating.
- 3Calculate to get the hypotenuse, area, perimeter, angle A, and angle B.
- 4Interpret angle A as arctangent of leg a divided by leg b. Angle B is the remaining acute angle.
- 5Check that the two displayed acute angles add to about 90 degrees and that the hypotenuse is longer than either leg.
- 6Label area in square units and the side or perimeter results in the original linear unit.
How It Works
Formula
c = sqrt(a^2 + b^2), area = (a x b) / 2, perimeter = a + b + cThe hypotenuse uses the Pythagorean theorem: square both legs, add them, and take the square root. Area is half the product of the perpendicular legs. Perimeter adds both legs and the hypotenuse. The code defines angle A as arctangent of a / b, converted from radians to degrees, then sets angle B to 90 minus angle A. For legs 3 and 4, c = sqrt(9 + 16) = 5, area = 3 x 4 / 2 = 6, perimeter = 12, angle A = 36.87 degrees, and angle B = 53.13 degrees.
Calculation note: values are processed in the order shown above, using the current input units.
Worked Examples
The 3-4-5 right triangle
Square the legs (9 and 16), add to get 25, and take the square root for a hypotenuse of 5. The area is 3 x 4 / 2 = 6, and the angles are about 36.87 and 53.13 degrees.
Equal legs of 1 (a 45-45-90 triangle)
When both legs are equal, the hypotenuse is the square root of 2, about 1.4142, and the two acute angles are each 45 degrees.
A 5-12-13 right triangle
The squared legs add to 25 + 144 = 169, whose square root is 13. Area is 5 x 12 / 2 = 30, perimeter is 5 + 12 + 13 = 30, and angle A is about 22.62 degrees.
Scaled 6-8-10 triangle
This triangle is twice the size of a 3-4-5 triangle. The side lengths and perimeter double, while area becomes 4 times larger. The angles stay the same because the triangles are similar.
Decimal legs of 2.5 and 7
The hypotenuse is sqrt(6.25 + 49) = sqrt(55.25) = 7.433 after rounding. Area is 8.75, perimeter is 16.933, and arctangent of 2.5 / 7 gives angle A of 19.65 degrees.
Common Right Triangles
Leg pairs and the resulting hypotenuse, area, and angles.
| Legs (a, b) | Hypotenuse | Area | Acute Angles |
|---|---|---|---|
| 3, 4 | 5 | 6 | 36.87 and 53.13 |
| 6, 8 | 10 | 24 | 36.87 and 53.13 |
| 5, 12 | 13 | 30 | 22.62 and 67.38 |
| 1, 1 | 1.4142 | 0.5 | 45 and 45 |
Angle order follows leg a and leg b. Swapping the legs swaps the two acute angle labels.
How side labels affect the angle results
The hypotenuse, area, and perimeter do not depend on which perpendicular side is called a or b. The angle labels do. This implementation calculates angle A from a divided by b, so a shorter leg a produces the smaller displayed angle A.
A right triangle's two acute angles are complementary, meaning they add to 90 degrees. The calculator finds one with inverse tangent and obtains the other by subtraction. Small differences from exactly 90 in separately rounded values can come from display precision.
Similar right triangles have the same angles even when their sides differ in scale. The 3-4-5 and 6-8-10 examples share the same acute angles because every side in the second triangle is twice the matching side in the first.
Common mistakes
- Using the hypotenuse as one of the legs. Enter the two shorter sides that form the right angle, not the long side opposite it.
- Forgetting to square the legs before adding. The Pythagorean theorem adds the squares of the legs, not the legs themselves.
- Mixing units. Both legs must be in the same unit, so convert before calculating if one is in feet and one is in inches.
- Assuming angle A is opposite leg a under every diagram convention. Check the implementation's stated a-to-b ratio and match labels carefully.
- Reporting area in linear units. Multiplying two leg lengths produces square units.
- Using the formula on a triangle that is not known to contain a 90 degree angle.
Embed this calculator on your site
Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.
<script src="https://calctide.com/embed.js" data-tool="right-triangle-calculator" async></script>Preview the embed at /embed/right-triangle-calculator/.