Boneyard Tools

Right Triangle Calculator

Enter any two values of a right triangle and the calculator finds the rest. Combine two legs, a leg with the hypotenuse, or one side with angle A, as long as at least one entry is a side. It returns both legs, the hypotenuse, angles A and B, the area and the perimeter, each rounded to four decimals.

How to solve a right triangle

  1. Note the right angle sits at C, so angle A and angle B are the two acute angles.
  2. Fill in exactly two of Leg a, Leg b, Hypotenuse, or Angle A in degrees.
  3. Make sure at least one of your two values is a side length, and leave the other fields blank.
  4. Read Leg a, Leg b, Hypotenuse, Angle A, Angle B, Area and Perimeter in the result grid.
  5. Press Copy result to save all seven values as text.

Examples

Two legs (3-4-5 triangle)

Leg a = 3, Leg b = 4
Hypotenuse 5, Angle A 36.8699 deg, Angle B 53.1301 deg, Area 6, Perimeter 12

Leg and angle

Leg a = 5, Angle A = 30 degrees
Hypotenuse 10, Leg b 8.6603, Angle B 60 deg, Area 21.6506, Perimeter 23.6603

Leg and hypotenuse

Leg b = 6, Hypotenuse = 10
Leg a 8, Angle A 53.1301 deg, Angle B 36.8699 deg, Area 24, Perimeter 24

Frequently asked questions

What is a right triangle?

A right triangle has one 90 degree angle. The two shorter sides that meet at that corner are the legs, and the longest side opposite the right angle is the hypotenuse.

How many values do I need to solve a right triangle?

Exactly two, and at least one must be a side length. Two legs, a leg and the hypotenuse, or one side and angle A all work. Entering only one value, or three, returns a message asking for exactly two.

Why do I need at least one side?

A right triangle has only one free acute angle here, angle A. Angle A alone fixes the shape but not the size, so without any side length there are infinitely many triangles and no unique answer.

Which angle is angle A?

Angle A is the acute angle opposite Leg a, and angle B is opposite Leg b. The two acute angles always add to 90 degrees, so the tool reports angle B as 90 minus angle A.

Why can a leg not equal the hypotenuse?

The hypotenuse is always strictly the longest side. If you enter a leg that is equal to or longer than the hypotenuse, no real right triangle exists, so the input is rejected with an error.

Are angles in degrees or radians?

Angle A is entered in degrees, so 30 means 30 degrees and must be strictly between 0 and 90. It is converted to radians internally before any sine, cosine, or tangent is applied.

How is the area and perimeter found?

Area is Leg a times Leg b divided by two, since the legs are perpendicular. Perimeter is simply the sum of Leg a, Leg b, and the hypotenuse.

Why are results shown to four decimals?

Trigonometry and square roots often produce long irrational values, so every output is rounded to four decimal places for readability. Whole-number answers like the 3-4-5 triangle stay exact.

Is my input private?

Yes. The solver runs locally in your browser and nothing is uploaded. A JSON API is also available for scripts, taking any two of legA, legB, hypotenuse, and angleADeg.

Learn more

Related tools