Right Triangle Calculator
This right triangle calculator solves all three sides, both acute angles, area, and perimeter from two sides or one side and an acute angle. Explicit measurement modes identify the hypotenuse and the angle reference, avoiding the ambiguity of unlabeled side-and-angle entries.
By Dr. Hassan Khames EliwaLast updated
Result
- Leg b
- 4 m
- Hypotenuse c
- 5 m
- Angle A
- 36.869898°
- Angle B
- 53.130102°
- Area
- 6 m²
- Perimeter
- 12 m
How it works
Label the triangle before entering numbers
The two perpendicular legs are a and b. The hypotenuse c sits opposite the right angle and must be longer than either leg. Angle A is opposite leg a and adjacent to leg b. Angle B is the other acute angle, so A + B = 90 degrees. A small labeled sketch is usually the fastest way to avoid reversing a slope calculation.
Choose the mode that matches what you know. The two-side choices are a with b, a with c, or b with c. The side-and-angle choices pair angle A with a, b, or c. The form evaluates only the selected pair; hidden fields are not additional constraints and cannot be used to verify an overdetermined survey.
Use the appropriate relationship
With both legs known, c = √(a² + b²). With one leg and the hypotenuse, the other leg follows from rearranging the same Pythagorean relationship. A hypotenuse equal to or shorter than the known leg is rejected because it cannot produce a nondegenerate right triangle.
For an angle input, the relationships are sin A = a/c, cos A = b/c, and tan A = a/b. Angles are entered in degrees and must be strictly greater than zero and less than 90. Either endpoint would collapse a leg instead of defining the intended triangle.
After finding the sides, the calculator obtains the acute angles from their ratio. Area is ab/2 because the legs are perpendicular. Perimeter is a + b + c. These are geometric results without allowances for joints, supports, landings, or material cutting.
Keep the model and precision in perspective
A general triangle with two arbitrary sides and a nonincluded angle can have ambiguous solutions. This calculator does not attempt that problem: the right angle is fixed, the side identities are explicit, and the selected angle is always A. Use the general triangle calculator when your measurements do not describe a right triangle.
Meters and feet are supported as alternative interpretations of all side entries. The selector does not convert existing values. Output is displayed to six decimal places at most, while extremely disproportionate or overflowing measurements are rejected when the numeric representation cannot retain a valid triangle.
Worked example
Example 1: A rectangular layout diagonal
Two perpendicular offsets measure 3 m and 4 m. Choose legs a and b, then enter a = 3 and b = 4. The results are a = 3 m, b = 4 m, and c = 5 m. Angle A is 36.869898° and angle B is 53.130102°. Area is 6 m² and perimeter is 12 m. These values describe the triangle formed by the offsets and its diagonal, not the area of the whole surrounding rectangle.
Example 2: A pitched member defined by length and angle
A straight member is 10 ft long and makes angle A = 30° with the horizontal leg b. Choose hypotenuse c and angle A. The calculated rise a is 5 ft, the horizontal leg b is 8.660254 ft, and c remains 10 ft. The acute angles are 30° and 60°, area is 21.650635 ft², and perimeter is 23.660254 ft.
Expert tips
Common mistakes
- Entering a roof pitch percentage as degrees gives the wrong geometry. A percentage expresses rise divided by run times 100; its numerical value is not the angle.
- Calling the longest measured leg the hypotenuse does not prove a corner is square. The right-angle assumption must be justified independently when checking existing construction.
- Supplying an unlabeled side and an angle leaves the relationship unclear. Select whether the known side is opposite, adjacent, or the hypotenuse before using the result.
Frequently asked questions
Can I enter two angles instead of a side?
No. Angles determine the shape but not its scale. At least one side length is needed to find actual side lengths, area, or perimeter.
Why is a 90-degree angle input rejected?
The right angle is already fixed between the legs. The entered angle is A, one of the two acute angles, and must lie strictly inside the zero-to-90-degree interval.
Are extra hidden side values checked?
No. The selected mode defines the two known measurements. Switch modes to make a separate check rather than expecting stale hidden values to constrain the solution.
Can a side be negative?
No. Sides are physical lengths and must be positive finite numbers. Negative coordinates belong in a coordinate-distance calculation, not in a triangle side field.
Does this solve non-right triangles?
No. Use the triangle calculator for supported general-triangle measurements. Applying right-triangle formulas to an oblique corner can produce convincing but incorrect dimensions.
Related calculators
Related guides
Construction & ProjectRoof pitch, rafters and slope: one triangle, three tradesOne labeled triangle connects roof pitch, percent grade, and rafter slope length, but a geometric answer is not a structural design or cutting list.15 November 2026 · 8 min read
MathPercentages people get wrong: change, difference and pointsThe denominator determines the answer. Learn to distinguish percentage change, symmetric difference and percentage-point movements.14 November 2026 · 7 min read
MathStandard deviation without the jargonThe average tells you the centre. Standard deviation helps describe the spread, provided you know what the data represents.14 November 2026 · 7 min readSources and standards
About the author
Dr. Hassan Khames Eliwa holds a PhD in Construction & Built Environment and has more than 20 years of international project controls experience. He is Director of Eliwa Project Controls Limited in Auckland and founder of PMMilestone.org and PMMilestone.com.
Buy me a coffee