Right Triangle Perimeter from Two Legs Calculator

Right Triangle Perimeter from Two Legs Calculator

Growing AI Skill PRO
Right triangle
Right triangleRight trianglea = 3b = 4c = 5CBAP = 12
Worked stepsStep 2 of 2

Hypotenuse c=a2+b2c = \sqrt{a^2 + b^2}, area A=12abA = \tfrac{1}{2}ab

Download figure
Figure data
Leg a3
Leg b4
Perimeter12
Hypotenuse5
Right triangle in the Library: formulas and every calculator

Enter Calculation

Formula

P=Leg a+Leg b+Leg a2+Leg b2P = {{\text{Leg }a}} + {{\text{Leg }b}} + \sqrt{{{\text{Leg }a}}^{2} + {{\text{Leg }b}}^{2}}

Example

P=3+4+32+42=12P = 3 + 4 + \sqrt{3^{2} + 4^{2}} = 12
Usage stats

Advertisement

Results

Perimeter
12
units
Hypotenuse (c) 5

Report an error on this page

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}}$$

Advertisement
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:

Most popular in Geometry

View all Geometry calculators