Right Triangle Side and Angle Calculator
Enter any two known values of a right triangle (two sides, or one side and one acute angle) and the calculator finds everything else: all three sides, both acute angles, the altitude from the right angle to the hypotenuse, the area, and the perimeter. The "show your work" panel traces each formula so you can follow along or check your homework.
Formula
Worked example
Given legs a = 3 and b = 4: c = sqrt(9 + 16) = sqrt(25) = 5. Angle A = arcsin(3/5) = 36.87 deg, angle B = 90 - 36.87 = 53.13 deg. Altitude h = (3 x 4) / 5 = 2.4. Area = (1/2) x 3 x 4 = 6. Perimeter = 3 + 4 + 5 = 12.
How a right triangle calculator works
A right triangle has one 90-degree angle. That fixed constraint means knowing any two of the five free values (legs a and b, hypotenuse c, angle A, angle B) is enough to determine everything else. When you provide two sides, the Pythagorean theorem (a squared plus b squared equals c squared) finds the third. When you provide one side and one angle, the three main trigonometric ratios (sine, cosine, tangent) connect them. Because A plus B always equals 90 degrees, you only need to find one angle and the other follows as its complement. This calculator handles all nine possible input combinations and returns all three sides, both acute angles, the altitude from the right angle to the hypotenuse, the area, and the perimeter.
The Pythagorean theorem and trig ratios
The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a squared plus b squared equals c squared. Rearranging gives b = sqrt(c squared minus a squared) or a = sqrt(c squared minus b squared). The basic trig ratios link the sides to the angles: sin(A) = a/c (opposite over hypotenuse), cos(A) = b/c (adjacent over hypotenuse), and tan(A) = a/b (opposite over adjacent). Flipping each gives the co-functions for angle B. To go from a ratio back to an angle, the inverse functions arcsin, arccos, and arctan are used.
The altitude to the hypotenuse and its geometric meaning
When you drop a perpendicular from the right-angle vertex to the hypotenuse, you get the altitude h. Its length is always equal to a times b divided by c. The altitude has a useful geometric property: it creates two smaller right triangles inside the original that are each similar to the original and to each other. This leads to the geometric mean relationships: a squared equals c times the projection of a onto c, and similarly for b. In practice, the altitude appears in surveying, roof pitch calculations, and any problem that requires the height of a triangle from its longest side.
Special right triangles and Pythagorean triples
Two right triangles appear so often that their exact ratios are worth memorizing. A 45-45-90 triangle has two equal legs and a hypotenuse that is the leg multiplied by sqrt(2), roughly 1.414. A 30-60-90 triangle has sides in the ratio 1 to sqrt(3) to 2; the short leg is half the hypotenuse and the long leg is the short leg times sqrt(3). Pythagorean triples are sets of three positive integers (a, b, c) that satisfy the Pythagorean theorem exactly. The most common are 3-4-5, 5-12-13, 8-15-17, and 7-24-25. Builders and surveyors use the 3-4-5 triple to check that two walls meet at a right angle: if you measure 3 units along one wall, 4 units along the other, and the diagonal is exactly 5, the corner is square.
Common right triangle types
| Type | Angles | Side ratio (a : b : c) | Typical use |
|---|---|---|---|
| 3-4-5 triple | 36.87 / 53.13 / 90 deg | 3 : 4 : 5 | Squaring corners in construction |
| 5-12-13 triple | 22.62 / 67.38 / 90 deg | 5 : 12 : 13 | Surveying, carpentry |
| 8-15-17 triple | 28.07 / 61.93 / 90 deg | 8 : 15 : 17 | Structural engineering |
| 45-45-90 | 45 / 45 / 90 deg | 1 : 1 : sqrt(2) | Square diagonals, tile cutting |
| 30-60-90 | 30 / 60 / 90 deg | 1 : sqrt(3) : 2 | Equilateral triangle halves |
| 7-24-25 triple | 16.26 / 73.74 / 90 deg | 7 : 24 : 25 | Ladder problems, roofing |
Frequently encountered right triangles in geometry and construction.
Frequently asked questions
Can I solve a right triangle with just one side?
Only for the two special triangles: 45-45-90 and 30-60-90. For any other right triangle you need at least two values (two sides, or one side and one acute angle) because infinitely many differently shaped right triangles share any single given side length.
What is the difference between leg a, leg b, and the hypotenuse?
The two shorter sides that form the right angle are called legs (labelled a and b). The hypotenuse (c) is the longest side, opposite the 90-degree angle. Angle A is the acute angle at the vertex between the hypotenuse and leg b, so it is directly opposite leg a. Angle B is directly opposite leg b.
How do I find the angles if I only know the sides?
Use inverse trig: A = arcsin(a / c) or equivalently arctan(a / b). B is simply 90 minus A. This calculator does all of that automatically; just select "Legs a and b" (or any two-side mode) and your angles appear in the results.
What is the altitude to the hypotenuse and why does it matter?
The altitude h is the perpendicular distance from the right-angle vertex to the hypotenuse. It equals a times b divided by c. It is useful in architecture, surveying, and geometry proofs because it splits the original triangle into two smaller ones that are both similar to the original.
Why does the 3-4-5 triangle check whether a corner is square?
Because 3 squared plus 4 squared equals 5 squared (9 + 16 = 25), any triangle with sides in that ratio is guaranteed to have a 90-degree angle by the converse of the Pythagorean theorem. Carpenters and builders mark 3 units along one wall and 4 along the other; if the diagonal is exactly 5, the corner is a right angle.
Do the angles have to be in degrees?
This calculator always uses degrees, which are the most common unit in practical geometry. If you have an angle in radians, multiply by 180 divided by pi to convert it to degrees first (for example, pi/6 radians equals 30 degrees).