Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Perimeter
12
units
Hypotenuse (c) 5

What This Calculator Does

This tool calculates the perimeter of a right triangle when you know the lengths of its two legs — the two sides that meet at the 90° angle. It first computes the hypotenuse using the Pythagorean theorem, then adds all three sides together to give you the total perimeter.

How to Use It

Enter the length of leg a and leg b in any consistent unit (cm, m, inches, etc.). The calculator returns the hypotenuse and the perimeter in the same unit. Because a right triangle only requires the two legs to be fully defined, no other inputs are needed.

The Formula Explained

The perimeter P is the sum of all three sides: \(P = a + b + c\), where c is the hypotenuse. The hypotenuse comes from the Pythagorean theorem, \(c = \sqrt{a^{2} + b^{2}}\). Substituting gives the single formula $$P = a + b + \sqrt{a^{2} + b^{2}}$$

Right triangle with legs a and b and hypotenuse formed from the legs
The two legs a and b meet at the right angle; the hypotenuse closes the triangle, and the perimeter is the sum of all three sides.

Worked Example

Suppose a = 3 and b = 4. The hypotenuse is $$\sqrt{3^{2} + 4^{2}} = \sqrt{9 + 16} = \sqrt{25} = 5$$ The perimeter is therefore \(3 + 4 + 5 = \mathbf{12}\). This is the classic 3-4-5 right triangle.

FAQ

Do the legs have to be whole numbers? No. You can enter decimals such as 2.5 or 6.75; the result is computed at full precision.

What unit does the result use? The same unit you enter. If both legs are in meters, the perimeter is in meters.

Which side is the hypotenuse? The hypotenuse is the side opposite the right angle and is always the longest side of a right triangle.

Last updated: