Triangle Calculator
Find the hypotenuse, area, perimeter, and angles of a right triangle from its two legs.
Inputs
Hypotenuse (c)
5.0000
Area
6.0000
Perimeter
12.0000
Angle opposite a (°)
36.87
Angle opposite b (°)
53.13
Step by step
Apply the Pythagorean theorem to find the hypotenuse
c = √(3.0000² + 4.0000²) = √(9.0000 + 16.0000)
= 5.0000
Find angle A using the Law of Sines: sin(A) = a / c
A = arctan(3.0000 / 4.0000)
= 36.87°
For a right triangle sin(A) = a/c = tan(A)·cos(A); arctan(a/b) is equivalent and numerically stable.
Angle B = 90° − A (angles in a triangle sum to 180°)
90° − 36.87°
= 53.13°
Calculate the area
(3.0000 × 4.0000) ÷ 2
= 6.0000
Calculate the perimeter
3.0000 + 4.0000 + 5.0000
= 12.0000
How it works
For a right triangle, the Pythagorean theorem gives the hypotenuse c = √(a² + b²). The area is half the product of the two legs, and the two non-right angles are found with the arctangent of the leg ratio.
Formulas
Hypotenuse — Pythagorean theorem
c = √(a² + b²)
- a
- First leg (perpendicular side)
- b
- Second leg (perpendicular side)
- c
- Hypotenuse (side opposite the right angle)
Angles — Law of Sines (right triangle)
a / sin(A) = b / sin(B) = c / sin(90°) = c → A = arctan(a / b), B = 90° − A
- A
- Angle opposite leg a
- B
- Angle opposite leg b
- C
- Right angle (90°)
Area
Area = (a × b) ÷ 2
Perimeter
Perimeter = a + b + c
Frequently Asked Questions
Does this work for non-right triangles?
This calculator assumes a right triangle (one 90° angle) defined by its two perpendicular legs. Other triangles need side-angle-side or law-of-cosines methods.
What units does it use?
It's unit-agnostic — enter both legs in the same unit and all outputs use that unit (area is in that unit squared).