Right Triangle Calculator

Two measurements, at least one of them a side, fix a right triangle completely. Trigonometry and the Pythagorean theorem give everything else.

Also called: Right-angled triangle calculator · Right triangle solver

  • Last updated
  • Formula tested against reference values

Your numbers

Result

Hypotenuse c
—

Calculating…

Leg a
—
Leg b
—
Angle A
—
Angle B
—
Area
—
Perimeter
—
Altitude to the hypotenuse
—
Inradius
—

How to use this calculator

  1. Enter or choose i know.
  2. The hypotenuse c updates as you type. Use Copy result or Share to keep it.

Method

c² = a² + b²; sin A = a ÷ c, cos A = b ÷ c, tan A = a ÷ b; B = 90° − A; area = ab ÷ 2; altitude = ab ÷ c; inradius = (a + b − c) ÷ 2

a, b
legs
c
hypotenuse
A
angle opposite a
B
angle opposite b

Worked example

  1. c = √(3² + 4²) = 5.
  2. A = arctan(3 ÷ 4) = 36.8699°, so B = 90° − 36.8699° = 53.1301°.
  3. Area = 3 × 4 ÷ 2 = 6; perimeter = 3 + 4 + 5 = 12; altitude = 12 ÷ 5 = 2.4.

The 3-4-5 right triangle has angles of about 36.87° and 53.13°, area 6 and perimeter 12.

What the result means

Angles are in degrees. The two acute angles always add up to 90°, so knowing one gives the other.

Assumptions and limits

  • One angle is exactly 90°; angle A is opposite leg a.
  • Two angles alone fix only the shape, not the size, so at least one side is required.

Questions

What does SOH CAH TOA mean?

Sine = Opposite ÷ Hypotenuse, Cosine = Adjacent ÷ Hypotenuse, Tangent = Opposite ÷ Adjacent. They relate an angle to the sides around it.

How do I find a roof pitch angle?

Treat the rise and the run as the two legs. The pitch angle is arctan(rise ÷ run), which is angle A when a is the rise and b the run.