Right Triangle Calculator
Solve a right triangle completely from its two legs. Computes the hypotenuse and both acute angles in degrees. Enter leg a and leg b to get all three sides and angles instantly.
How to use this tool
- Enter leg a and leg b in the fields above.
- Results update instantly as you type โ or click Calculate.
- Read your hypotenuse c and the full breakdown beneath it.
Formula
c = sqrt(a^2+b^2), A = atan(a/b) in degrees, B = 90 - A
How it works
Hypotenuse: c = โ(aยฒ + bยฒ). Angle A: A = arctan(a/b). Angle B: B = 90ยฐ โ A.
Worked example
3-4-5 right triangle
- a
- =
- 3
- ,
- b
- =
- 4
- .
- c
- =
- 5
- .
- A
- =
- a
- r
- c
- t
- a
- n
- (
- 3
- /
- 4
- )
- =
- 3
- 6
- .
- 8
- 7
- d
- e
- g
- .
- B
- =
- 9
- 0
- -
- 3
- 6
- .
- 8
- 7
- =
- 5
- 3
- .
- 1
- 3
- d
- e
- g
- .
Common mistakes to avoid
- Swapping a and b when labelling sides โ the angles A and B are computed relative to the legs, so swapping inputs swaps the angle assignments even though hypotenuse and area remain the same.
- Entering the hypotenuse as one of the legs โ this formula assumes a and b are the two legs; if you already know the hypotenuse, rearrange to find a missing leg instead.
- Reporting angles from atan in radians when degrees are expected โ always check whether the output is in degrees or radians.
Key terms
Frequently asked questions
- How are the two acute angles related in a right triangle?
- They are complementary: A + B = 90 degrees. If you know one, subtract from 90 to find the other. This calculator computes both: A = atan(a/b) and B = 90 - A.
- Can I use this to find the area of the triangle?
- Yes. Area = (1/2) * a * b, where a and b are the two legs. Once you have all sides, the area follows directly.
- What is the relationship between the sides and angles once all are known?
- sin(A) = a/c, cos(A) = b/c, tan(A) = a/b. These ratios hold for any right triangle and are the foundation of trigonometry.