A 5–12–13 triangle
Enter leg a = 5 and leg b = 12. The hypotenuse is 13, area is 30 square units, perimeter is 30, and inradius is 2.
Work out a right triangle from two legs, a hypotenuse and one leg, or one leg and its opposite acute angle. Leg a and leg b always meet at 90°. The labeled diagram and result table keep the hypotenuse and acute angles distinct.
Changing the unit relabels the numbers. Convert measurements to one common unit before entering them.
Leg a is opposite angle A. Leg b is adjacent to angle A. The hypotenuse c must be the longest side. Positive measurements must be from 0.000000001 to 1,000,000,000; derived defining lengths must also remain in this range.
| Measurement | Value |
|---|---|
| Hypotenuse c | 5 units |
| Leg a | 3 units |
| Leg b | 4 units |
| Angle A (opposite a) | 36.8698976° |
| Angle B (opposite b) | 53.1301024° |
| Area | 6 units² |
| Perimeter | 12 units |
| Altitude to hypotenuse | 2.4 units |
| Inradius | 1 units |
Formula: c = √(a² + b²); A = atan(a/b); area = ab/2
The angle between legs a and b is exactly 90°.
Results use full floating-point precision internally and display up to 10 significant digits. Angles are in degrees.
Calculations run locally in your browser. Measurement values are not sent to a calculation service. The downloadable text contains your selected inputs and computed results.
Choose the known side or angle combination.
Enter leg a and the other requested measurement. Angle A is opposite leg a.
Use one consistent length unit and read acute angles in degrees.
Compare the results with the diagram, then copy or download the calculation.
Enter leg a = 5 and leg b = 12. The hypotenuse is 13, area is 30 square units, perimeter is 30, and inradius is 2.
For hypotenuse c = 17 and leg a = 8, leg b is 15. The remaining two angles add to 90°.
For a = 3 and A = 30°, the hypotenuse is 6 and leg b is approximately 5.196152423. The angle must be opposite the supplied leg.
The hypotenuse faces the right angle and is longer than either leg. A slanted edge is not automatically the hypotenuse; the right angle determines its identity. In the hypotenuse input mode, c must exceed a strictly. Equal values would leave the other leg with zero length.
The Pythagorean relation is a² + b² = c². With a hypotenuse and one leg, the missing leg is √(c² − a²). For the angle opposite a, tan A = a/b and sin A = a/c. The tool uses the two legs to recover a stable acute angle, then subtracts it from 90° for B.
The perpendicular legs give area ab/2 directly. If the same area is written as c × altitude/2, the altitude to the hypotenuse is ab/c. The inradius is ab/(a + b + c), equivalent to (a + b − c)/2 but less sensitive to subtraction when one leg is very small.
The results describe ideal straight sides and an exact right angle. A diagonal measurement can help check a rectangular layout, but the tool does not evaluate loads, ladder placement rules, survey uncertainty, or physical tolerances. Small angle measurement errors can produce substantial length changes near 0° or 90°.
Use the general Triangle Calculator instead. This calculator fixes the angle between a and b at 90°.
A is the acute angle between leg b and hypotenuse c, opposite leg a. This convention matters in the leg-and-angle mode.
The remaining leg would be zero. A right triangle needs two positive legs and a hypotenuse strictly longer than both.
Convert the measurements to a single unit first. The unit selector relabels values and does not convert them.