Skip to content

Right Triangle Calculator

What you know

The side opposite angle A.

Hypotenuse c —
Leg a
—
Leg b
—
Angle A (°)
—
Angle B (°)
—
Area
—
Perimeter
—
Altitude to hypotenuse
—

A right triangle is fixed by any two values that include a side. With both legs, the hypotenuse is √(a² + b²); with a leg and the hypotenuse, the other leg is √(c² − a²); with a leg and its opposite angle, c = a ÷ sin A. Legs 3 and 4 give a hypotenuse of 5, an area of 6 and angles of 36.87° and 53.13°.

About this tool

Students checking homework, carpenters squaring a frame and anyone working out a ramp or roof pitch run into the same problem: two measurements of a right triangle are known and the rest are not. Pick which pair you have, enter the values, and the calculator returns the hypotenuse, both legs, both acute angles in degrees, the area, the perimeter and the altitude dropped onto the hypotenuse. The working lists each formula with your numbers in it. Lengths carry no unit, so the answers come back in whatever unit you entered, and areas in that unit squared. The tool assumes the triangle has an exact 90° corner; for a general triangle, use a solver based on the law of sines and cosines.

How to use it

  1. Choose what you know

    Select both legs, a leg and the hypotenuse, or a leg and the angle opposite it.

  2. Enter the values

    Type the lengths in any single unit and the angle in degrees; results update as you type.

  3. Read the solved triangle

    Check the hypotenuse, the other sides, the angles, area and perimeter, then open the working to see each formula.

Examples

Legs 3 and 4

What you know
Both legs
Leg a
3
Leg b
4

Result Hypotenuse c: 5
Leg a: 3
Leg b: 4
Angle A (°): 36.87
Angle B (°): 53.13
Area: 6
Perimeter: 12
Altitude to hypotenuse: 2.4

  1. c = √(a² + b²) = √(3² + 4²) = 5
  2. A = atan(a ÷ b) = 36.8699°
  3. B = 90° − A = 53.1301°
  4. Area = a × b ÷ 2 = 6
  5. Perimeter = a + b + c = 12
  6. Altitude to hypotenuse = a × b ÷ c = 2.4

The classic 3-4-5 triangle: the hypotenuse is exactly 5 and the smaller acute angle is 36.87°.

Leg 5, hypotenuse 13

What you know
Leg and hypotenuse
Leg a
5
Hypotenuse c
13

Result Hypotenuse c: 13
Leg a: 5
Leg b: 12
Angle A (°): 22.62
Angle B (°): 67.38
Area: 30
Perimeter: 30
Altitude to hypotenuse: 4.6154

  1. b = √(c² − a²) = √(13² − 5²) = 12
  2. A = asin(a ÷ c) = 22.6199°
  3. B = 90° − A = 67.3801°
  4. Area = a × b ÷ 2 = 30
  5. Perimeter = a + b + c = 30
  6. Altitude to hypotenuse = a × b ÷ c = 4.615385

The missing leg is √(169 − 25) = 12, giving the 5-12-13 triple with area 30.

Leg 1 opposite 30°

What you know
Leg and angle
Leg a
1
Angle A
30

Result Hypotenuse c: 2
Leg a: 1
Leg b: 1.7321
Angle A (°): 30
Angle B (°): 60
Area: 0.866
Perimeter: 4.7321
Altitude to hypotenuse: 0.866

  1. c = a ÷ sin A = 1 ÷ sin 30° = 2
  2. b = a ÷ tan A = 1.732051
  3. B = 90° − A = 60°
  4. Area = a × b ÷ 2 = 0.866025
  5. Perimeter = a + b + c = 4.732051
  6. Altitude to hypotenuse = a × b ÷ c = 0.866025

A 30-60-90 triangle has sides 1, √3 and 2, so the hypotenuse is twice the short leg.

How it is calculated

c² = a² + b²; sin A = a ÷ c; tan A = a ÷ b; B = 90° − A

a, b
the two legs, which meet at the right angle
c
the hypotenuse, opposite the right angle
A, B
the acute angles opposite legs a and b

The Pythagorean theorem links the three sides, and the sine and tangent ratios link a side to an angle. Whichever pair is entered, the calculator finds the third side and angle A first, then sets B to 90° minus A. Area is half the product of the legs, and the altitude to the hypotenuse is a × b ÷ c, since both expressions equal twice the area divided by a base.

When not to use it

  • For a triangle without a 90° angle, where the law of sines or cosines is needed.
  • When only the three angles are known, since that fixes the shape but not the size.

Common mistakes

  • Entering the hypotenuse as a leg, which makes the computed hypotenuse too long.
  • Giving the angle adjacent to leg a instead of the one opposite it, which swaps the two legs in the answer.
  • Mixing units, such as one leg in feet and the other in inches.

Frequently asked questions

Which side is the hypotenuse?

It is the side opposite the right angle and always the longest of the three. If the value you enter as the hypotenuse is not longer than the leg, no right triangle exists and the calculator flags the field.

Why is only one angle asked for?

The two acute angles of a right triangle always add up to 90°, so knowing one gives the other. Together with one side, a single acute angle fixes the whole triangle.

What units do the results use?

The same unit as your inputs. Enter centimetres and the sides come back in centimetres, the area in square centimetres. Angles are always in degrees.

What is the altitude to the hypotenuse?

It is the perpendicular distance from the right-angle corner to the hypotenuse. It equals a × b ÷ c; for the 3-4-5 triangle that is 12 ÷ 5 = 2.4.

How do I check a corner is square on site?

Measure 3 units along one edge and 4 along the other; the diagonal between the marks should be exactly 5. Multiples such as 6-8-10 or 9-12-15 work the same way for larger frames.

Can a right triangle have whole-number sides?

Yes. Sets such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25 are Pythagorean triples, where a² + b² equals c² exactly with integers.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 13). Right Triangle Calculator. Tools Directory. Retrieved October 26, 2026, from https://tools.milunir.com/math/triangles-and-trigonometry/right-triangle-calculator/

MLA

Tools Directory Editorial Team. “Right Triangle Calculator.” Tools Directory, 13 Oct. 2026, https://tools.milunir.com/math/triangles-and-trigonometry/right-triangle-calculator/. Accessed 26 Oct. 2026.

Chicago

Tools Directory Editorial Team. “Right Triangle Calculator.” Tools Directory. Last modified October 13, 2026. Accessed October 26, 2026. https://tools.milunir.com/math/triangles-and-trigonometry/right-triangle-calculator/.

Link<a href="https://tools.milunir.com/math/triangles-and-trigonometry/right-triangle-calculator/">Right Triangle Calculator – Tools Directory</a>