Right Triangle Calculator

Hypotenuse, area and angles from the two legs.

by Calcuatany.com

A right triangle calculator takes the two legs that meet at the right angle, side a and side b, and returns the hypotenuse c, the area, the perimeter and both acute angles. The hypotenuse is c = √(a² + b²), the area is a × b / 2, and the perimeter is a + b + c. Angle A comes from the two-argument arctangent atan2(a, b) converted to degrees, and Angle B is 90 minus Angle A, so the two always sum to exactly 90°. Both legs run from 0.000001 to 1 billion, since a triangle side cannot be zero or negative.

Right triangles are special because their geometry is tightly connected. Once the two legs are known, everything else can be derived directly. The Pythagorean theorem gives the hypotenuse, basic area geometry gives the area, and trigonometry gives the acute angles. A good calculator does those steps instantly and consistently, which is especially helpful when you want to check manual work or compare several designs quickly. This tool is built specifically for right triangles, so it focuses on the measurements that follow from that assumption.

How to use the Right Triangle Calculator

  1. Enter Side a as one leg of the right triangle. This value must be positive because a side length cannot be zero or negative in the calculator.
  2. Enter Side b as the other leg. Side a and Side b are the only inputs this tool needs, because the triangle is assumed to contain a right angle between them.
  3. Read Hypotenuse c first. The calculator uses the Pythagorean relationship and computes the square root of a squared plus b squared.
  4. Check Area and Perimeter if you need size and total boundary length. Area is Side a times Side b divided by 2, and Perimeter is Side a plus Side b plus the hypotenuse.
  5. Use Angle A and Angle B for layout or geometry work. The calculator finds Angle A with atan2 of Side a over Side b, converts it to degrees, and then gets Angle B by subtracting Angle A from 90.

Formula

c = √(a² + b²)

Example: Side a = 3 and Side b = 4

Suppose Side a is 3 and Side b is 4. With those inputs, the calculator returns Hypotenuse c = 5, Area = 6, Perimeter = 12, Angle A = 36.87°, and Angle B = 53.13°.

The hypotenuse comes from the square root of 3 squared plus 4 squared, which is the square root of 9 plus 16, or 25, so c equals 5. The area is 3 times 4 divided by 2, giving 6. The perimeter is 3 plus 4 plus 5, giving 12. For the angles, the calculator uses atan2 of 3 and 4, converts the result to degrees for 36.87°, and then subtracts that from 90 to get 53.13°.

How to interpret the result

The hypotenuse is always the longest side because it sits opposite the right angle. If your manual work produces a shorter hypotenuse than one of the legs, something has gone wrong in the setup.

Area grows directly with both leg lengths, while perimeter grows with both legs and the diagonal. That means long narrow right triangles and more balanced right triangles can share similar areas but still have different perimeters and angles.

The angle outputs help you understand shape, not just size. A smaller Angle A means Side a is relatively short compared with Side b, while a larger Angle A means the triangle is steeper in that direction.

Next, you may also find these useful: Percentage Calculator, Fraction Calculator, Average & Standard Deviation.

Assumptions and limitations

  • This calculator assumes the triangle is a right triangle with Side a and Side b meeting at the 90-degree angle. It is not designed for oblique triangles.
  • Only positive inputs are valid. Side lengths of zero or less do not describe a usable triangle in this implementation.
  • Angle A is defined specifically as atan2 of Side a and Side b, then converted to degrees. Angle B is computed as 90 minus Angle A, so the labels depend on that chosen orientation.
  • Displayed values are rounded for readability, which is why some angles may show fewer trailing decimals than a raw trigonometric calculation.

Frequently asked questions

Why do I only need two sides for a right triangle?

Because the right angle fixes the relationship between the legs and the hypotenuse. Once the two legs are known, the Pythagorean theorem and basic trigonometry determine the rest.

What is the hypotenuse?

It is the side opposite the right angle, and it is always the longest side in a right triangle. In this calculator it is shown as Hypotenuse c.

Can I use this for any triangle?

No. The formulas here depend on one angle being exactly 90 degrees. Other triangles need a different set of inputs and formulas.

Why do the two acute angles add up to 90 degrees?

Every triangle adds to 180 degrees in total. Since one angle is fixed at 90 degrees, the remaining two must sum to the other 90 degrees.

What does atan2 do in the angle calculation?

It finds the angle whose tangent matches the ratio between the two legs while keeping the orientation consistent. It is a reliable way to derive the acute angle from the side lengths.

Why might my hand calculation differ slightly from the displayed angle?

The calculator rounds the final display for readability. If you keep more decimal places during manual work, you may see a tiny difference before rounding.

Sources and further reading

Last reviewed: 2026-10-02. See our editorial policy.

Related calculators

For informational purposes only. Full disclaimer