Skip to main content
Retro cartoon-style pyramid characters marching in a line on a light background

Right Triangle Calculator

Find hypotenuse, angles, area, and altitude - with steps

What is a right triangle?

A right triangle has one 90° angle. The side opposite that angle is the hypotenuse (always the longest side). The other two sides are called legs. On this page we label the legs a and b, the hypotenuse c, and the acute angles α and β (they add to 90°). The Pythagorean theorem a² + b² = c² ties the three sides together.

Right triangle with legs a and b and hypotenuse cRight angle at bottom left; horizontal leg length a, vertical leg length b; hypotenuse c joins the acute vertices.abchαβ

The Formula

c² = a² + b² ; sin(α) = a/c ; cos(α) = b/c ; tan(α) = a/b ; A = ½ab ; h = ab/c

Section A

Special right triangles

These two triangles have fixed angle sets that produce side ratios you can memorize. Knowing one side instantly gives you the other two without a calculator. Click a ratio badge in the diagrams to load matching values in Two legs mode, then press Calculate.

30-60-90 triangle

ratio 1 : √3 : 2
30-60-90 reference triangle; ratio boxes load calculator presets90°60°30°a = 1short legb = √3 ≈ 1.732long legc = 2hypotenuseratio a : b : c = 1 : √3 : 2 ≈ 1 : 1.732 : 2
1 : √3 : 2
Angles30°, 60°, 90°
Originbisected equilateral
sin 30°= ½ = 0.5
cos 30°= √3/2 ≈ 0.866

45-45-90 triangle

ratio 1 : 1 : √2
45-45-90 reference triangle; ratio boxes load calculator presets90°45°45°a = 1first legb = 1second legc = √2 ≈ 1.414hypotenuseratio a : b : c = 1 : 1 : √2 ≈ 1 : 1 : 1.414
1 : 1 : √2
Angles45°, 45°, 90°
Typeisosceles right triangle
sin 45°= √2/2 ≈ 0.707
Originhalved square diagonal

How to use the 30-60-90 ratio

Once you know any single side, multiply or divide by the ratio constants to find the rest. The short leg (opposite 30°) is always the base unit.

Know a: b = a√3, c = 2aKnow b: a = b/√3, c = 2b/√3Know c: a = c/2, b = c√3/2
This triangle appears when you bisect an equilateral triangle down its line of symmetry. It underlies the exact values for sin/cos of 30° and 60°.

How to use the 45-45-90 ratio

Because both legs are equal, you only need one value to resolve the whole triangle. The hypotenuse is always √2 times the leg.

Know a (or b): c = a√2Know c: a = b = c/√2 = c√2/2
This triangle appears when a square is cut along its diagonal. The diagonal equals the side length multiplied by √2 - a useful fact for construction, screen aspect ratios, and woodworking.

Section B

Solving scenarios - all eight input modes

Every right triangle can be fully solved from any valid pair of values. Worked examples below match each combination the calculator supports. Green pills are the inputs; blue values are computed results.

01

Two legs known

Given

a = 3b = 4

Solved

c
5.000
α
36.870°
β
53.130°
h
2.400
area
6.000
perim
12.000
c = √(3² + 4²) = √25 = 5
α = arctan(3 ÷ 4) = 36.870°
β = 90° − 36.870° = 53.130°

✦ Pythagorean triple (3, 4, 5)

02

Leg + hypotenuse

Given

a = 5c = 13

Solved

b
12.000
α
22.620°
β
67.380°
h
4.615
area
30.000
perim
30.000
b = √(c² − a²) = √(169 − 25) = √144 = 12
α = arcsin(5 ÷ 13) = 22.620°

✦ Pythagorean triple (5, 12, 13)

03

Leg + opposite angle

Given

a = 6α = 30°

Solved

b
10.392
c
12.000
β
60.000°
h
5.196
area
31.177
perim
28.392
c = a ÷ sin(α) = 6 ÷ sin(30°) = 12
b = a ÷ tan(α) = 6 ÷ tan(30°) = 6√3

✦ 30-60-90 special triangle

04

Leg + adjacent angle

Given

a = 7β = 45°

Solved

b
7.000
c
9.899
α
45.000°
h
4.950
area
24.500
perim
23.899
c = a ÷ cos(β) = 7 ÷ cos(45°) = 7√2
b = a × tan(β) = 7 × 1 = 7

✦ 45-45-90 special triangle

05

Hypotenuse + angle

Given

c = 10α = 45°

Solved

a
7.071
b
7.071
β
45.000°
h
5.000
area
25.000
perim
24.142
a = c × sin(α) = 10 × sin(45°) = 5√2
b = c × cos(α) = 10 × cos(45°) = 5√2

✦ a = b → isosceles right triangle

06

Area + leg

Given

A = 24a = 6

Solved

b
8.000
c
10.000
α
36.870°
β
53.130°
h
4.800
perim
24.000
b = 2A ÷ a = 48 ÷ 6 = 8
c = √(6² + 8²) = √100 = 10

✦ Pythagorean triple (6, 8, 10)

07

Perimeter + leg

Given

P = 40a = 8

Solved

b
15.000
c
17.000
α
28.072°
β
61.928°
h
7.059
area
60.000
let s = P − a = 32 (so b + c = 32)
b = (s² − a²) ÷ (2s) = 960 ÷ 64 = 15
c = s − b = 32 − 15 = 17

✦ Pythagorean triple (8, 15, 17)

08

Altitude + hypotenuse

Given

h = 4c = 10

Solved

a
8.944
b
4.472
α
63.435°
β
26.565°
area
20.000
perim
23.416
a+b = √(c(c+2h)) = √180 ≈ 13.416
a−b = √(c(c−2h)) = √20 ≈ 4.472
a = (13.416 + 4.472) ÷ 2 = 8.944

FAQ

How do I find the hypotenuse of a right triangle?

Use the Pythagorean theorem: c = √(a² + b²), where a and b are the two legs and c is the hypotenuse. For example, if a = 3 and b = 4, then c = √(9 + 16) = 5.

What is the Pythagorean theorem?

In a right triangle, the square of the hypotenuse equals the sum of the squares of the legs: a² + b² = c². It only applies when one angle is exactly 90°.

Can I use this if I only know one side and one angle?

Yes. Pick the mode that matches what you know - for example “Leg + opposite angle” if you have a leg and the acute angle opposite it - then enter the values. The calculator uses sine, cosine, or tangent as needed.

What is a 30-60-90 triangle?

A right triangle with acute angles 30° and 60°. Its sides are in the ratio 1 : √3 : 2 (short leg : long leg : hypotenuse). It appears often in geometry and construction.

What is a 45-45-90 triangle?

An isosceles right triangle: both acute angles are 45°, and the legs are equal. Side ratios are 1 : 1 : √2 (leg : leg : hypotenuse).

How do I calculate the area of a right triangle?

Area equals half the product of the legs: A = ½ × a × b. You can also use A = ½ × hypotenuse × altitude to the hypotenuse.

What is the altitude of a right triangle?

The altitude h from the right-angle vertex to the hypotenuse has length h = (a × b) / c. It splits the triangle into two smaller right triangles similar to the original.

What are Pythagorean triples?

Three whole numbers (a, b, c) that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13. They represent side lengths of a right triangle with integer sides.

How do I convert degrees to radians?

Multiply degrees by π/180. For example, 45° = π/4 radians. In radian mode you can also type expressions like pi/4 or pi/3.

Why does a² + b² = c² only work for right triangles?

That exact relationship is equivalent to the angle opposite c being 90°. For other triangles you need the law of cosines: c² = a² + b² − 2ab cos(C).

💡 Tips

  • The longest side must be the hypotenuse - if a leg is larger than your “hypotenuse” input, the calculator will flag it.
  • As a sanity check: very flat triangles (one tiny angle) need precise inputs.
  • Pythagorean triples (integer sides) are detected automatically when your solution lands on whole numbers.

🎉 Fun Facts

  • The 3-4-5 triangle is ancient. Egyptian rope-stretchers (harpedonaptai) used knotted ropes with 12 equal segments to lay out perfect right angles for the pyramids around 2000 BC - long before Pythagoras was born. The theorem bears his name, but the knowledge is thousands of years older.
  • Pythagoras was not first, and might not have proved it. The Babylonians documented Pythagorean triples on the clay tablet Plimpton 322 around 1800 BC - over 1,200 years before Pythagoras. Indian mathematician Baudhayana also stated the theorem in the Sulba Sutras around 800 BC.
  • There are infinitely many Pythagorean triples. You can generate them all with two integers m > n using the formula: a = m² - n², b = 2mn, c = m² + n². Plug in any two integers and you get a valid triple.
  • The 345,345,345-triangle does not exist. A right triangle can never be equilateral - if all three sides were equal, no angle could be 90°. The closest an equilateral triangle gets to "right" is its 60° angles, which are as far from 90° as you can get while still being acute.
  • A right triangle fits perfectly inside a semicircle. If you draw a triangle where the hypotenuse is the diameter of a circle, the right-angle vertex will always land exactly on the circle's edge - no matter where you put it. This is Thales' theorem, from around 600 BC, and it is one of the oldest recorded geometric proofs.
  • The spiral of Theodorus: if you chain right triangles together - each new one using the previous hypotenuse as one leg and a leg of length 1 - you get a spiral that approximates the golden spiral. It was drawn by the Greek mathematician Theodorus of Cyrene around 400 BC and contains the square roots of every integer from 2 to 17.
  • Right triangles power GPS. The trilateration calculation that locates your phone uses the 3D Pythagorean relationship (a² + b² + c² = d²) to find the distance from each satellite. Your position is the intersection of three spheres - each radius calculated from a right-triangle relationship.
  • The world's most expensive right triangle: the Pythagorean theorem is the most proven theorem in mathematics, with over 370 distinct proofs on record - including one by US President James Garfield, who published his own original proof in 1876 while serving as a congressman.

Related calculators