Skip to content
Calculator.hair

Right Triangle Calculator

Leg a

Leg b

Hypotenuse c

area
perimeter

Press Calculate to see the results.

This right triangle calculator solves a triangle with a 90° angle from any two known values: two sides, a side and an angle, or combinations with the height, area and perimeter.

Fill in any two boxes and leave the rest empty. At least one of the two must carry a size, a side, the height, the area or the perimeter, because two angles describe only the shape. The default values, a leg of 3 and a hypotenuse of 5, give the classic 3-4-5 triangle.

Right triangle

A right triangle has one angle of exactly 90°. The two sides that form that angle are the legs, and the side opposite it, always the longest, is the hypotenuse. Because the angles of a triangle sum to 180°, the other two angles α and β are acute and add up to 90°; they are called complementary angles.

The sides obey the Pythagorean theorem, a² + b² = c², so any two sides give the third. A side and an acute angle give everything through the trigonometric ratios: a = c·sin α, b = c·cos α, and a = b·tan α. For the default 3-4-5 triangle, sin α = 3/5 = 0.6, so α ≈ 36.87° and β ≈ 53.13°.

The area of a right triangle is especially simple, because each leg is the height relative to the other: Area = ab ÷ 2. The height h drawn from the right angle to the hypotenuse splits the triangle into two smaller right triangles that are similar to the original. That gives the useful relations h = ab ÷ c and h² = pq, where p and q are the two pieces of the hypotenuse. For 3-4-5, h = 12 ÷ 5 = 2.4.

Two other measurements follow quickly. The midpoint of the hypotenuse is the same distance from all three corners, so the circumradius is exactly c ÷ 2. The inradius, the radius of the circle touching all three sides, is (a + b − c) ÷ 2, which equals 1 for the 3-4-5 triangle.

When only the area and perimeter are known, or the height together with the hypotenuse, the calculator solves the resulting equations numerically. These combinations describe the same triangle in two mirror orientations, so the legs may come out swapped relative to a drawing you have in mind.

bachαβ
Legs a and b meet at the right angle; h is the height to the hypotenuse c.

a² + b² = c², α + β = 90°, h = ab ÷ c, Area = ab ÷ 2

a, b
the legs, which form the right angle
c
the hypotenuse
α, β
the acute angles opposite a and b
h
the height from the right angle to the hypotenuse

Trigonometry links sides and angles: sin α = a/c, cos α = b/c, tan α = a/b.

Special Right Triangles

Two right triangles appear so often in geometry, trigonometry and design that their side ratios are worth memorizing. Because their angles are fixed, their sides always keep the same proportions, which lets you solve them without a calculator.

The 45°-45°-90° triangle is half of a square cut along its diagonal. Its two legs are equal, and the hypotenuse is √2 times a leg, so the sides are in the ratio 1 : 1 : √2. A square tile 30 cm on a side has a diagonal of 30√2 ≈ 42.43 cm. This triangle also explains why sin 45° = cos 45° = √2/2 ≈ 0.7071.

The 30°-60°-90° triangle is half of an equilateral triangle, cut by a line from one corner to the middle of the opposite side. The short leg, opposite 30°, is half the hypotenuse, and the long leg, opposite 60°, is √3 times the short leg, giving the ratio 1 : √3 : 2. These ratios are the source of the values sin 30° = 1/2, cos 30° = √3/2 and tan 60° = √3.

Some right triangles are special because of their side lengths instead of their angles. Triangles whose sides are whole numbers, such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25, are based on Pythagorean triples. Their angles are not round numbers, but their exact sides make them convenient in construction and in classroom problems.

TriangleAnglesSide ratioExample sides
45-45-9045°, 45°, 90°1 : 1 : √25, 5, 7.0711
30-60-9030°, 60°, 90°1 : √3 : 24, 6.9282, 8
3-4-536.87°, 53.13°, 90°3 : 4 : 56, 8, 10
5-12-1322.62°, 67.38°, 90°5 : 12 : 135, 12, 13

Frequently asked questions

What do I need to solve a right triangle?

Any two values, as long as at least one is a length, the area or the perimeter. Two angles alone do not set the size.

How do I find the hypotenuse?

Use c = √(a² + b²). With one leg and an angle, c = a ÷ sin α.

How do I find an angle of a right triangle?

Use inverse trigonometry: α = arcsin(a/c), arccos(b/c) or arctan(a/b). The other acute angle is 90° − α.

What is the area of a right triangle?

Half the product of the two legs: Area = ab ÷ 2.

What are the sides of a 30-60-90 triangle?

They are in the ratio 1 : √3 : 2, with the shortest side opposite the 30° angle.

Updated by Calculator.hair. How we build and check our calculators