Right Triangle Calculator

Calculate a right triangle’s hypotenuse, area, perimeter and acute angles from its two perpendicular legs.

Enter the two perpendicular legs, not the hypotenuse. Both lengths must use the same unit. Each dimension must be positive, from 0.000000001 to 1,000,000,000. Results use 12 significant digits.

Calculations run in this browser; your measurements are not uploaded.

Right Triangle Calculator: measurements and units

Calculate a right triangle’s hypotenuse, area, perimeter and acute angles from its two perpendicular legs. Enter the two perpendicular legs, not the hypotenuse. Both lengths must use the same unit.

Enter your measurements

Enter both perpendicular legs in Leg a and Leg b, then choose Calculate. The example button replaces these inputs with the case below. Use a decimal point or exponent notation such as 1e3, without unit suffixes or thousands separators.

Each dimension must be positive, from 0.000000001 to 1,000,000,000. For legs measured in metres, hypotenuse and perimeter are in metres and area is in square metres. Acute angles are labeled in degrees. No automatic unit conversion is performed.

Worked example

With legs a = 3 and b = 4, the hypotenuse is 5, area is 6 square units, and perimeter is 12. Angle opposite a is approximately 36.8698976458°; angle opposite b is approximately 53.1301023542°.

Formula and interpretation

The Pythagorean formula gives c = √(a² + b²). Area is ab/2. The acute angles use atan2(a, b) and atan2(b, a), converted to degrees. The third angle is assumed to be exactly 90°.

Limits and common mistakes

This workflow accepts two legs only. Entering a leg and a hypotenuse as the two inputs describes a different triangle. It does not solve a general triangle or infer which side you meant.

Answers use 12 significant digits of floating-point precision; this does not improve measurement accuracy. Copy results copies the displayed measurements. Recalculate after edits.

For a related calculation, open Triangle Area Calculator.