Skip to content
Math

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.

Your details

Choose which two values you already know. The calculator solves for everything else.
One of the two shorter sides (legs) of the right triangle.
The other shorter side (leg) of the right triangle.
Leg a
3

Length of leg a

Leg b4
Hypotenuse c5
Angle A36.8699deg
Angle B53.1301deg
Altitude h2.4
Area6sq units
Perimeter12units

Triangle solved: legs 3.0000 and 4.0000, hypotenuse 5.0000.

  • The side ratio 3:4:5 is a Pythagorean triple, a set of integers that satisfy a^2 + b^2 = c^2 exactly.
  • Angle A is 36.87 deg and angle B is 53.13 deg. They always add to 90 deg in a right triangle.
  • Area = (3.0000 x 4.0000) / 2 = 6.0000 square units.
  • The altitude from the right angle to the hypotenuse is 2.4000 units, which also equals a*b/c.

Next stepTo scale the triangle, multiply all sides by a constant. The angles stay the same, and area scales by the square of that constant.

Formula

c=a2+b2,A=arcsin ⁣(ac),B=90A,h=abc,Area=ab2c = \sqrt{a^2 + b^2}, \quad A = \arcsin\!\left(\tfrac{a}{c}\right), \quad B = 90^\circ - A, \quad h = \tfrac{ab}{c}, \quad \text{Area} = \tfrac{ab}{2}

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

TypeAnglesSide ratio (a : b : c)Typical use
3-4-5 triple36.87 / 53.13 / 90 deg3 : 4 : 5Squaring corners in construction
5-12-13 triple22.62 / 67.38 / 90 deg5 : 12 : 13Surveying, carpentry
8-15-17 triple28.07 / 61.93 / 90 deg8 : 15 : 17Structural engineering
45-45-9045 / 45 / 90 deg1 : 1 : sqrt(2)Square diagonals, tile cutting
30-60-9030 / 60 / 90 deg1 : sqrt(3) : 2Equilateral triangle halves
7-24-25 triple16.26 / 73.74 / 90 deg7 : 24 : 25Ladder 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).

Sources

Written by Dr. Elena Vasquez, PhD Mathematician · Lisbon, Portugal

Translating rigorous geometric theory into accurate, reliable calculation tools trusted by engineers, students, and researchers worldwide.

Search 3,500+ calculators

Loading search…