Skip to content

Right Triangle Calculator

From legs a and b: hypotenuse sqrt(a^2+b^2), area 0.5*a*b, and angle A = atan(a/b) in degrees.

Maintained by the Calcenzo team. Last reviewed September 25, 2026. Methodology

Right Triangle Calculator

A right triangle calculator finds the hypotenuse, area and an acute angle from the two legs of a right triangle. Formula: c = sqrt(a^2 + b^2). Area = 0.5 × a × b. Angle A (deg) = atan(a/b) × 180 / pi. Legs of 3 and 4 give a hypotenuse of 5, an area of 6 and an angle of 36.87°.

right triangle calculator
Right triangle calculator chart: right triangle examples.

How to use the right triangle calculator

  1. Enter leg a.
  2. Enter leg b.
  3. Read the hypotenuse, area and angle A.

How the right triangle calculator works

The right triangle calculator takes the two legs, a and b, of a right triangle and returns three results:

  • Hypotenuse c = √(a² + b²)
  • Area = ½ × a × b
  • Angle A = arctan(a ÷ b), in degrees

Angle A is the angle opposite leg a. The other acute angle, B, is 90° − A, since the angles of a triangle add to 180°. Both legs must be positive. The hypotenuse and area are shown to four decimal places and the angle to two.

Right triangle calculator worked example

Enter legs of 3 and 4. The hypotenuse is √(9 + 16) = 5, the area is ½ × 3 × 4 = 6, and angle A is arctan(3/4) ≈ 36.87°. So angle B is 53.13°. The right triangle calculator gives the same results for any unit, as long as both legs use it; the area is then in square units.

a b Hypotenuse Area Angle A
3 4 5 6 36.87°
5 12 13 30 22.62°
1 1 1.4142 0.5 45.00°
7 24 25 84 16.26°

The trigonometry behind it

In a right triangle, the three basic ratios relate an angle to the sides. For angle A: sin A = opposite ÷ hypotenuse = a ÷ c, cos A = adjacent ÷ hypotenuse = b ÷ c, and tan A = opposite ÷ adjacent = a ÷ b. The tool uses the tangent because it needs only the two legs. The memory aid SOH-CAH-TOA helps you recall which ratio uses which sides.

Special right triangles

Two shapes come up often. A 45-45-90 triangle has equal legs, and the hypotenuse is leg × √2; legs of 1 give 1.4142. A 30-60-90 triangle has sides in the ratio 1 : √3 : 2. Enter legs of 1 and 1.7321 and the right triangle calculator gives a hypotenuse of about 2 and an angle of 30°.

Practical uses

Roof pitch, ramp slope, ladder safety, stair design and surveying all use right triangles. A ramp that rises 1 ft over a run of 12 ft has an angle of arctan(1/12) ≈ 4.76°, the common 1:12 accessibility slope, and a ramp surface length of about 12.04 ft. A ladder should make an angle of roughly 75° with the ground; that is about 1 ft out for every 4 ft up.

If you know a different pair

This tool needs both legs. If you know a leg and the hypotenuse, find the other leg first with the Pythagorean theorem, b = √(c² − a²), then enter both legs. If you know one leg and an angle, the other leg is a ÷ tan A. For a triangle without a right angle, use the law of sines or cosines instead.

Rounding

Keep full precision in middle steps and round only the final answer. Rounding the hypotenuse early and then using it for an angle can shift the angle by a few hundredths of a degree.

Checking your answer

A quick check: the hypotenuse must be longer than each leg but shorter than their sum, and the larger angle is always opposite the longer leg. If leg a is longer than leg b, angle A will be above 45°. These checks catch most typing mistakes before you use a result in a project.

Tips

  • Label the legs so you know which angle is A.
  • Check that the hypotenuse is longer than both legs.
  • Find angle B as 90° minus angle A.
  • Use the right triangle calculator to check trigonometry homework.

Related calculators:

Sources

OpenStax Algebra and Trigonometry 2e, 7.2: Right triangle trigonometry; OpenStax Prealgebra 2e, 9.3: Triangles and the Pythagorean theorem.

Formula and method

c = sqrt(a^2 + b^2). Area = 0.5 * a * b. Angle A (deg) = atan(a/b) * 180 / pi.

Assumes a right angle between legs a and b. Angle A is opposite leg a relative to adjacent leg b in the atan(a/b) form used by the live JS.

Questions about this calculator

How do I find the hypotenuse?

c = √(a² + b²).

How is the angle found?

Angle A = arctan(a / b).

What is the area of a right triangle?

½ × a × b.

How do I get the other angle?

90° minus angle A.

Can I enter the hypotenuse?

No, enter both legs.

Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.

Report a calculation issue