Right Triangle Calculator
Choose which two sides you know, enter them, and get the missing side, area, perimeter and angles.
Side a
3
Side b
4
Hypotenuse c
5
Area
6
Perimeter
12
Angle A
36.87°
Angle B
53.13°
How it works
In a right triangle the two shorter sides, the legs a and b, meet at the right angle, and the longest side c, the hypotenuse, is opposite it. The Pythagorean theorem ties the three together: the square of the hypotenuse equals the sum of the squares of the legs.
Knowing any two sides therefore fixes the third. From two legs, the hypotenuse is the square root of their squares added together. From a leg and the hypotenuse, the other leg is the square root of the hypotenuse squared minus the leg squared, which is why the hypotenuse must be the longer of the two.
The area is half the product of the legs, because the legs are the base and height. The acute angle A sits opposite side a, so its tangent is a divided by b; the inverse tangent gives the angle, and B is the same calculation the other way round. The two always add up to 90 degrees.
Formula
c = √(a² + b²) b = √(c² − a²) a = √(c² − b²) area = a × b ÷ 2 perimeter = a + b + c A = atan(a ÷ b) B = atan(b ÷ a) (in degrees; A + B = 90°)
Example
With legs a = 3 and b = 4, the hypotenuse is √(9 + 16) = √25 = 5. The area is 3 × 4 ÷ 2 = 6, the perimeter is 3 + 4 + 5 = 12, angle A is atan(3 ÷ 4) ≈ 36.87°, and angle B is 90° − 36.87° ≈ 53.13°.
Given leg a = 5 and hypotenuse c = 13 instead, the other leg is √(169 − 25) = √144 = 12, the area is 30, the perimeter is 30, and the angles are about 22.62° and 67.38°.
Assumptions and limitations
- The angle between sides a and b is exactly 90°. For any other triangle use the law of cosines instead.
- All sides are in the same unit, whatever it is; the area is in that unit squared.
- Angles are given in degrees.
- Results are rounded for display only.
Frequently asked questions
How do I check that a corner is square?
Use the 3-4-5 rule. Measure 3 units along one edge and 4 units along the other; if the corner is a true right angle the diagonal between those marks will be exactly 5 units. Any multiple works, so 6-8-10 or 9-12-15 is easier on a larger layout.
More in Math & Geometry calculators.