Skip to content
CalcTide logo
Education & Math

Right Triangle Calculator

A right triangle with legs of 3 and 4 has a hypotenuse of 5, area of 6, and acute angles of 36.87 and 53.13 degrees. This right triangle calculator solves one specific case: a triangle whose two perpendicular legs are known. Enter both legs in the same unit to find the hypotenuse, area, perimeter, and two acute angles. The calculation assumes the entered sides meet at exactly 90 degrees.

Education & MathBy

Quick answer

A right triangle has one 90-degree angle, and the side opposite it is the hypotenuse.

What this tells you

  • A right triangle has one 90-degree angle, and the side opposite it is the hypotenuse.
  • The two legs are the sides that form the right angle.
  • The hypotenuse comes from the Pythagorean theorem, a squared plus b squared equals c squared.
  • The two acute angles always add up to 90 degrees.
  • Area uses square units, while all three side lengths and the perimeter use the original linear unit.
  • Swapping the two legs leaves the sides, area, and perimeter unchanged but swaps the angle labels.
  • Sides and area are rounded to 4 decimal places, while angles are rounded to 2 decimal places.

How to Use

  1. 1Enter the positive length of leg a, one of the two sides that form the right angle.
  2. 2Enter leg b in the same unit. Convert mixed feet, inches, meters, or other units before calculating.
  3. 3Calculate to get the hypotenuse, area, perimeter, angle A, and angle B.
  4. 4Interpret angle A as arctangent of leg a divided by leg b. Angle B is the remaining acute angle.
  5. 5Check that the two displayed acute angles add to about 90 degrees and that the hypotenuse is longer than either leg.
  6. 6Label area in square units and the side or perimeter results in the original linear unit.

How It Works

Formula

c = sqrt(a^2 + b^2), area = (a x b) / 2, perimeter = a + b + c

The hypotenuse uses the Pythagorean theorem: square both legs, add them, and take the square root. Area is half the product of the perpendicular legs. Perimeter adds both legs and the hypotenuse. The code defines angle A as arctangent of a / b, converted from radians to degrees, then sets angle B to 90 minus angle A. For legs 3 and 4, c = sqrt(9 + 16) = 5, area = 3 x 4 / 2 = 6, perimeter = 12, angle A = 36.87 degrees, and angle B = 53.13 degrees.

Calculation note: values are processed in the order shown above, using the current input units.

Worked Examples

The 3-4-5 right triangle

Leg A3
Leg B4
ResultHypotenuse 5, area 6, perimeter 12

Square the legs (9 and 16), add to get 25, and take the square root for a hypotenuse of 5. The area is 3 x 4 / 2 = 6, and the angles are about 36.87 and 53.13 degrees.

Equal legs of 1 (a 45-45-90 triangle)

Leg A1
Leg B1
ResultHypotenuse 1.4142, both angles 45 degrees

When both legs are equal, the hypotenuse is the square root of 2, about 1.4142, and the two acute angles are each 45 degrees.

A 5-12-13 right triangle

Leg A5
Leg B12
ResultHypotenuse 13, area 30, perimeter 30, angles 22.62 and 67.38 degrees

The squared legs add to 25 + 144 = 169, whose square root is 13. Area is 5 x 12 / 2 = 30, perimeter is 5 + 12 + 13 = 30, and angle A is about 22.62 degrees.

Scaled 6-8-10 triangle

Leg A6
Leg B8
ResultHypotenuse 10, area 24, perimeter 24, angles 36.87 and 53.13 degrees

This triangle is twice the size of a 3-4-5 triangle. The side lengths and perimeter double, while area becomes 4 times larger. The angles stay the same because the triangles are similar.

Decimal legs of 2.5 and 7

Leg A2.5
Leg B7
ResultHypotenuse 7.433, area 8.75, perimeter 16.933, angles 19.65 and 70.35 degrees

The hypotenuse is sqrt(6.25 + 49) = sqrt(55.25) = 7.433 after rounding. Area is 8.75, perimeter is 16.933, and arctangent of 2.5 / 7 gives angle A of 19.65 degrees.

Common Right Triangles

Leg pairs and the resulting hypotenuse, area, and angles.

Legs (a, b)HypotenuseAreaAcute Angles
3, 45636.87 and 53.13
6, 8102436.87 and 53.13
5, 12133022.62 and 67.38
1, 11.41420.545 and 45

Angle order follows leg a and leg b. Swapping the legs swaps the two acute angle labels.

How side labels affect the angle results

The hypotenuse, area, and perimeter do not depend on which perpendicular side is called a or b. The angle labels do. This implementation calculates angle A from a divided by b, so a shorter leg a produces the smaller displayed angle A.

A right triangle's two acute angles are complementary, meaning they add to 90 degrees. The calculator finds one with inverse tangent and obtains the other by subtraction. Small differences from exactly 90 in separately rounded values can come from display precision.

Similar right triangles have the same angles even when their sides differ in scale. The 3-4-5 and 6-8-10 examples share the same acute angles because every side in the second triangle is twice the matching side in the first.

Check trigonometric ratios

Common mistakes

  • Using the hypotenuse as one of the legs. Enter the two shorter sides that form the right angle, not the long side opposite it.
  • Forgetting to square the legs before adding. The Pythagorean theorem adds the squares of the legs, not the legs themselves.
  • Mixing units. Both legs must be in the same unit, so convert before calculating if one is in feet and one is in inches.
  • Assuming angle A is opposite leg a under every diagram convention. Check the implementation's stated a-to-b ratio and match labels carefully.
  • Reporting area in linear units. Multiplying two leg lengths produces square units.
  • Using the formula on a triangle that is not known to contain a 90 degree angle.

Embed this calculator on your site

Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.

<script src="https://calctide.com/embed.js" data-tool="right-triangle-calculator" async></script>

Preview the embed at /embed/right-triangle-calculator/.

Frequently Asked Questions

Use the Pythagorean theorem: square both legs, add them, and take the square root. For legs of 3 and 4, the hypotenuse is the square root of 25, which is 5.
The area is half the product of the two legs, or (a x b) / 2. For legs of 3 and 4, the area is 3 x 4 / 2 = 6 square units.
The hypotenuse of a 3-4-5 right triangle is 5. It is the most common Pythagorean triple, where 3 squared plus 4 squared equals 5 squared.
Use the inverse tangent of the leg ratio. The two acute angles always add up to 90 degrees, so for legs of 3 and 4 they are about 36.87 and 53.13 degrees.
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs, written as a squared plus b squared equals c squared.
No, this tool solves right triangles only, where one angle is exactly 90 degrees. General triangles need the law of sines or the law of cosines.
They add to 90 degrees because every triangle totals 180 degrees and the right angle already accounts for 90 degrees.
Yes, both legs may be positive decimals. Use the same unit for each and expect displayed side results to be rounded to 4 decimal places.
The hypotenuse, area, and perimeter stay the same, but angle A and angle B swap because the inverse-tangent ratio reverses.
It estimates right triangle calculator outputs using the visible inputs and formula assumptions on this page.

Explore More in Education & Math