Right Triangle Calculator

About this calculator

The Right Triangle Calculator solves a right triangle from any two known values. Enter two of the legs a and b, the hypotenuse c, the acute angles α and β, the altitude h to the hypotenuse, the area or the perimeter, and it returns all the others, plus the inradius and circumradius.

Angle α is opposite leg a and β is opposite leg b, and the right angle sits between the two legs. Angles can be entered in degrees or radians (radian fields accept expressions such as pi/6).

α unit
β unit
Embed this calculator

Paste this code into a Custom HTML block on your site. The calculator fits the width of the block. Adjust the height in the code if you want more room for results.

Find this widget in the publisher directory

What is a right triangle?

A right triangle is a triangle with one 90° angle. The two sides that form the right angle are the legs (a and b here) and the side across from it, always the longest, is the hypotenuse (c). The other two angles, α and β, are acute and always add up to 90°, so knowing one tells you the other.

Because the right angle is already known, only two more pieces of information are needed to pin down the whole triangle, provided at least one of them carries a size (a length, the area or the perimeter). Two angles alone describe infinitely many similar triangles.

Key relationships

a² + b² = c²
sin α = a / c, cos α = b / c, tan α = a / b
h = a · b / c, Area = a · b / 2, Perimeter = a + b + c
Inradius r = (a + b − c) / 2, Circumradius R = c / 2

The circumradius is always half the hypotenuse because the hypotenuse is a diameter of the circle that passes through all three vertices (Thales's theorem). The altitude h is drawn from the right angle to the hypotenuse and splits the triangle into two smaller triangles that are both similar to the original.

Worked example

Take a hypotenuse of 10 and an angle α of 35°. The leg opposite α is a = 10 · sin 35° ≈ 5.73576 and the adjacent leg is b = 10 · cos 35° ≈ 8.19152. The other acute angle is β = 90° − 35° = 55°. The area is ½ · 5.73576 · 8.19152 ≈ 23.49232, the perimeter is about 23.92728, the altitude to the hypotenuse is about 4.69846, the inradius is about 1.96364 and the circumradius is exactly 5.

Solving from area or perimeter

Some combinations need a little algebra. If you know the hypotenuse and the area, the product of the legs is ab = 2 · Area while their squares sum to c², so (a + b)² = c² + 4 · Area and (a − b)² = c² − 4 · Area. From the perimeter and the area, the hypotenuse is c = (P² − 4 · Area) / (2P). When the legs are found from a sum and a product like this, the calculator reports the longer one as a. Swap the labels if your drawing has them the other way around: the triangle is the same.

Special right triangles

30°-60°-90° triangle

The sides are in the ratio 1 : √3 : 2. The side opposite the 30° angle is half the hypotenuse, and the side opposite 60° is √3 times the short side. If the side opposite 60° is 5, the short side is 5 / √3 ≈ 2.88675 and the hypotenuse is 10 / √3 ≈ 5.7735.

45°-45°-90° triangle

This is the isosceles right triangle, with sides in the ratio 1 : 1 : √2. Each leg equals the hypotenuse divided by √2, so a hypotenuse of 5 gives legs of about 3.53553.

TriangleSide ratioExample sides
30°-60°-90°1 : √3 : 21, 1.73205, 2
45°-45°-90°1 : 1 : √21, 1, 1.41421
3-4-5 (Pythagorean triple)3 : 4 : 53, 4, 5

Where right triangles show up

Right triangles are the basis of trigonometry and appear wherever horizontal and vertical distances meet: roof pitches, wheelchair ramps, ladder placement, screen diagonals, surveying, navigation and the components of forces in physics. A builder squaring a corner with the 3-4-5 rule is using the Pythagorean theorem directly.

Frequently asked questions

How do I find the hypotenuse of a right triangle?
Square both legs, add them and take the square root: c = √(a² + b²). Legs of 3 and 4 give a hypotenuse of 5.
How do I find a missing angle in a right triangle?
Use an inverse trig function. With legs a and b, α = arctan(a / b). With a leg and the hypotenuse, α = arcsin(a / c). The other acute angle is 90° minus α.
What is the altitude to the hypotenuse?
It is the perpendicular from the right angle to the hypotenuse, with length h = a · b / c. For a 3-4-5 triangle it is 2.4.
Can I solve a right triangle from two angles?
No. Two angles give the shape only. You need at least one length, the area or the perimeter to fix the size.

Formulas and sample results on this page were checked against independent references. Page last reviewed or updated . How we verify calculators. Project led by Shaun Connell.