FLXCode Right Triangle Calculator

FLXCode apps

Appearance

Right Triangle Calculator

The right angle is already set. Type any two more values, one of them a side, and get every side and angle, drawn to scale.

Start from Example

Angle C is the right angle and counts as one value. Fill in two more, at least one a side. Side c is the hypotenuse, opposite C. Type feet as decimals: 5 ft 6 in is 5.5.

Solved. Method: SAS.

Scalene, right triangle

A36.87°B53.13°C90°a = 3b = 4c = 5
Side a
3
Side b
4
Side c
5
Angle A
36.87°
Angle B
53.13°
Angle C
90°
Area
6
Perimeter
12
Altitude to the hypotenuse c
2.4
sin A = a / c
0.6
cos A = b / c
0.8
tan A = a / b
0.75
sin B = b / c
0.8
cos B = a / c
0.6
tan B = b / a
1.333
Inradius
1
Circumradius
2.5

The steps, with your numbers

  1. Law of cosines: c² = a² + b² − 2 × a × b × cos C = 3² + 4² − 2 × 3 × 4 × cos(90°) = 25, so c = 5
  2. Law of sines: sin A = a × sin C / c = 3 × sin(90°) / 5 = 0.6, so A = 36.87° (the angle opposite the shorter given side is always acute)
  3. Third angle: B = 180° − C − A = 180° − 90° − 36.87° = 53.13°

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it. What this tool keeps and sends.

Problem or idea? Email us

Which two values work

You knowHow it is solved
Both legs, a and bc = √(a² + b²), then the angles with arctan
The hypotenuse c and a legThe other leg from c² − a², then the angles with arcsin
A leg and an acute angleThe other angle is 90° minus the first, then the sides with sine, cosine or tangent
The hypotenuse and an acute angleThe legs are c x sin A and c x cos A

Side a is opposite angle A, b opposite B, and c is the hypotenuse, opposite the right angle C.

Worked examples

These were solved by the same code as the tool above, to four decimals.

CaseYou enterabcABArea
Two legsa = 3, b = 434536.8699°53.1301°6
Hypotenuse and a lega = 5, c = 135121322.6199°67.3801°30
A leg and an anglea = 5, A = 30°58.66031030°60°21.6506
The other leg and an angleb = 8, A = 40°6.7128810.443340°50°26.8512
Hypotenuse and an anglec = 10, B = 25°9.06314.22621065°25°19.1511
A leg and the other anglea = 12, B = 20°124.367612.770170°20°26.2059

The first row is the 3, 4, 5 triangle. Each row needs only two values. The other four come out of Pythagoras, the angle sum and the sine, cosine and tangent.

Sine, cosine and tangent

  • sin A = a / c, opposite over hypotenuse
  • cos A = b / c, adjacent over hypotenuse
  • tan A = a / b, opposite over adjacent
  • For angle B the roles swap: sin B = b / c, cos B = a / c, tan B = b / a

The tool lists all six with your numbers. Notice that sin A and cos B are the same number, because A and B add up to 90°. A rise of 1 over a run of 12 is a tan of 0.0833 and an angle of 4.76°. For slopes between two points, there is the slope calculator.

What it calculates

  • Pythagoras: a² + b² = c²
  • Angles: A + B = 90°
  • Area: a x b / 2. Perimeter: a + b + c
  • Altitude to the hypotenuse: a x b / c

For a triangle without a right angle, use the triangle calculator. If you only want the hypotenuse from two legs, the Pythagorean theorem calculator is shorter.

Limits

  • Flat triangles with a 90° corner only. Angle C cannot be changed here.
  • Type exactly two values. A third one gives an error, and the tool does not check whether three sides fit Pythagoras.
  • A leg must be shorter than the hypotenuse. A leg equal to c or longer gives an error.
  • Sides above 1,000,000,000,000 are rejected so the arithmetic stays accurate. "Decimals" only rounds what is shown.

FAQ

What do I need to type for a right triangle?

Two values, and at least one has to be a side. The right angle C is already set to 90° and counts as the third value. Two legs, a hypotenuse and a leg, or a side and an angle all work. Two angles are not enough, because they give only the shape.

Which side is the hypotenuse?

Side c, the one opposite the right angle. It is always the longest side, so the tool refuses a leg that is as long as c or longer. Sides a and b are the legs. Side a sits opposite angle A and b opposite angle B.

How do I find a missing angle?

Give two sides. For legs of 3 and 4, A = arctan(3 / 4) = 36.8699° and B = 53.1301°. The tool shows the arctan or arcsin step and the other angle as 90° minus the first.

Why does it say the angles must add up to 90°?

In every triangle the three angles add up to 180°. The right angle takes 90°, so A and B share the other 90°, and each is above 0 and below 90°. If you type two angles that do not, you get one fixed message.

Can I use radians?

Yes. Switch "Angles in" to radians. The fixed right angle then shows as 1.5708, which is π/2, and the answers show the multiple of π when there is a simple one. For a plain conversion see degrees to radians.

Can I type feet and inches?

Not in two boxes. Type feet as a decimal: 5 ft 6 in is 5.5, and 4 ft 3 in is 4.25. Use the same unit for every side. The answer for a side comes back in that unit too.

More from FLXCode

  • Triangle CalculatorSolve any triangle from three values: sides, angles, area and more, drawn to scale with the steps.
  • Pythagorean Theorem CalculatorFind the missing side of a right triangle, or test if three sides make one. Exact roots and the steps.
  • Slope CalculatorSlope, angle, percent grade, distance, midpoint and y = mx + b from two points. Handles vertical lines.
  • Law of Sines CalculatorSolve ASA, AAS and SSA triangles. Shows both triangles in the ambiguous case, or says none exists.

Share Right Triangle Calculator