Skip to main content

Right Triangle Calculator

Blake Boege
Written by Blake Boege · Founder, Calculator Answers

A right triangle calculator is a trigonometric tool that solves for missing angles, side lengths, area, and perimeter of a right-angled triangle. By utilizing the Pythagorean theorem and basic trigonometric ratios (sine, cosine, tangent), the calculator determines all properties of the triangle when any two dimensions (with at least one side) are provided. It displays step-by-step derivations for each value, helping students learn trigonometry and assisting carpenters in measuring angular cuts.

Pick the mode that matches what you know about the right triangle. The calculator returns all three sides, both acute angles, the area, and the perimeter.

Quick Answer

Solve right triangles instantly. Enter any two known sides or one side and an angle to calculate all remaining dimensions, angles, and area.

Solve from

e.g. 3

e.g. 4

Right triangle has one 90° angle. The two non-right (acute) angles always sum to 90°. Angle a is opposite leg a; angle b is opposite leg b.

Right triangle

Hypotenuse & angles

5

legs 3 and 4

Leg a3
Leg b4
Hypotenuse c5
Angle A (opp. leg a)36.8699°
Angle B (opp. leg b)53.1301°
Area6
Perimeter12

a² + b² = c² · Area = a × b ÷ 2 · A + B = 90°. Angles use atan, asin, acos as appropriate for the chosen mode.

Was this helpful?

Examples

Legs 3 and 4

hyp 5 · angles 36.87° / 53.13° · area 6 · perim 12

Leg 5, hypotenuse 13

other leg 12 · angles ≈ 22.62° / 67.38° · area 30

Hypotenuse 10, angle 30°

legs 5 and ≈ 8.660 · area ≈ 21.651

How it works

Formula · c = √(a² + b²); angle A = arctan(a ÷ b); area = (a × b) ÷ 2

Every right triangle satisfies a² + b² = c², where a and b are the legs and c is the hypotenuse. The acute angles satisfy A + B = 90°, and each is governed by a basic trig ratio (sin, cos, tan) against the sides.

Pythagorean · a² + b² = c²

Angles · sin A = a/c · cos A = b/c · tan A = a/b

Area & perimeter · A = a × b ÷ 2, P = a + b + c

Angle inputs and outputs are in degrees.

Learn the concept

These guides explain the geometry this tool computes, with worked examples.

What this solves, and what the neighbouring pages solve

Three pages on this site touch right triangles, and they do different jobs. Picking the wrong one is not harmful, just slower.

  • This page solves the whole triangle from any two facts: two legs, a leg and the hypotenuse, or a side and one acute angle. It returns every side, both acute angles, the area and the perimeter.
  • The Pythagorean theorem calculator takes sides only. Its three fields are leg a, leg b and hypotenuse c, so you cannot start from an angle there. It does report the angles once it has the sides; what it cannot do is work backwards from one.
  • The triangle area calculator handles any triangle, not just right ones, and returns area alone by base and height, by three sides, or by two sides and the angle between them.

The short version: if an angle is involved, in or out, you want this page.

By hand, the 3-4-5 triangle

The smallest right triangle with whole-number sides, worked all the way through. Legs of 3 and 4.

  1. Hypotenuse from the theorem. c = √(3² + 4²) = √25 = 5
  2. The angle opposite the leg of 3. arctan(3 ÷ 4) = 36.8699°
  3. The other acute angle. It must complete 90 degrees, and it does: arctan(4 ÷ 3) = 53.1301°, and 36.8699 + 53.1301 = 90.
  4. Area is half the product of the legs, because the legs ARE the base and the height: (3 × 4) ÷ 2 = 6. Perimeter is 3 + 4 + 5 = 12.

That two-angles-sum-to-90 check is worth keeping. In any right triangle the two acute angles are complementary, so if your two answers do not add to 90 you have made an arithmetic slip somewhere.

The four ways in

  • Two legs. The hypotenuse comes from the theorem and both angles from arctan.
  • A leg and the hypotenuse. The missing leg is √(c² − a²). A hypotenuse of 5 with a leg of 3 gives the other leg as 4.
  • A leg and its opposite angle. The other leg is the leg divided by the tangent, and the hypotenuse is the leg divided by the sine.
  • The hypotenuse and an angle. Sides come straight from sine and cosine. A hypotenuse of 10 at 30 degrees gives legs of 5 and 8.660254.

Edge cases, and what the calculator refuses

  • A hypotenuse no longer than a leg. Rejected, because no such triangle exists. The hypotenuse is opposite the right angle, which is the largest angle, so it is always the longest side.
  • An angle of 0 or 90 degrees. Rejected. At 90 the triangle would have two right angles; at 0 it collapses to a line. Both are outside the range the trigonometry is meaningful over.
  • Zero or negative sides. Rejected. A length of zero is not a shortcut to a degenerate answer, it is an input error.
  • Non-right triangles. Everything here assumes one angle is exactly 90 degrees. For any other triangle the law of sines and the law of cosines replace these relationships entirely.

Where these results come from

Nowhere that could be cited, in the sense a source line usually means. The Pythagorean theorem and the definitions of sine, cosine and tangent are results, not measured values: they follow from the definitions of a right triangle and the unit circle. No outside standard publishes a number this page could reference, so it references none rather than decorating an identity with a citation it does not need.

What can be checked is the arithmetic, and it is. The figures quoted above are recomputed from the calculator's own formulas by an automated test, so changing the code fails the page rather than quietly leaving the prose wrong.

Your figures stay in the page

The sides and angles you enter are processed by this page in your browser. They are not sent to a server, not stored after you close the tab, and not visible to anyone else. There is no account and nothing to sign up for.

Isosceles right triangles, the 45-45-90 case

An isosceles right triangle is one whose two legs are the same length, which forces both acute angles to 45 degrees. There is no separate mode for it because none is needed: enter the same value for both legs in the two-legs mode and the solver returns 45 and 45 along with the hypotenuse, which comes out as the leg times the square root of 2.

Related geometry calculators

Frequently asked questions

A right triangle has exactly one 90° angle. The side opposite the right angle is the hypotenuse (always the longest side); the other two sides are the legs. The two non-right angles are acute (less than 90°) and always sum to 90°.

Two legs: when both perpendicular sides are known. Leg + hypotenuse: when one leg and the slanted hypotenuse are known. Leg + acute angle: when one leg and one non-right angle are known. Hypotenuse + acute angle: when the slanted hypotenuse and one non-right angle are known. Pick the mode that matches what you know.

The Pythagorean theorem calculator solves for one missing side when two sides are known. The right triangle calculator goes further: it returns all three sides, both acute angles, area, and perimeter, and it accepts angle inputs as well as side inputs. Use Pythagorean when you only need a single side; use this when you want the full picture.

Area = (leg a × leg b) ÷ 2. The two legs are perpendicular, so they serve directly as base and height. For legs 3 and 4, area = 6 square units. This is the same formula as a generic triangle with base × height ÷ 2, with the legs filling in.

The hypotenuse is opposite the largest interior angle (90°), so by the law of sines it is the longest side. If you enter a leg equal to or larger than the hypotenuse, the configuration is impossible and the calculator flags it.

From any two sides, using inverse trigonometry. With legs of 3 and 4, the angle opposite the 3 is arctan(3 ÷ 4) = 36.8699 degrees, and the other acute angle is arctan(4 ÷ 3) = 53.1301 degrees. The two acute angles always sum to 90, so that is a free check on your working: 36.8699 + 53.1301 = 90.

Which direction you can work in. The Pythagorean theorem calculator takes sides only, and its three fields are leg a, leg b and hypotenuse c. It will report the angles once it knows the sides, but it cannot start from one. This page can: two of its four modes accept an acute angle as an input and solve the rest of the triangle from it. If you have an angle and a side, you need this page.

Use the triangle area calculator if the triangle is not right-angled, or if area is genuinely all you want. It handles any triangle by base and height, by three sides, or by two sides and the included angle. This page assumes a right angle and gives you the whole triangle, area included.

Yes, and there are two ways to do it. Give a leg and the angle opposite it, and the other leg is the leg divided by the tangent while the hypotenuse is the leg divided by the sine. Give the hypotenuse and an acute angle, and both legs come straight from sine and cosine: a hypotenuse of 10 at 30 degrees gives legs of 5 and 8.660254.

The isosceles right triangle: both legs equal, both acute angles 45 degrees. Its hypotenuse is always the leg multiplied by the square root of two, so a leg of 1 gives a hypotenuse of 1.41421356. That ratio is exact, and it is why the 45-45-90 triangle turns up constantly in construction and in trigonometry exercises.

A right triangle whose acute angles are 30 and 60 degrees. Its sides sit in a fixed ratio: the side opposite 30 is half the hypotenuse, and the side opposite 60 is that half multiplied by the square root of three. A hypotenuse of 10 gives sides of 5 and about 8.660254. The ratio is exact; the decimal is not, because the square root of three does not terminate.

Because no such triangle exists. The hypotenuse is the side opposite the right angle, the right angle is the largest angle, and the longest side is always opposite the largest angle. A hypotenuse of 4 with a leg of 5 is not an unusual triangle, it is a typo, and returning a number for it would be worse than refusing.

At 90 degrees the triangle would have two right angles, which is impossible because the three angles must total 180. At 0 degrees it collapses to a straight line with no area. Both sit outside the range over which the trigonometry means anything, so the calculator declines rather than returning a degenerate answer.

No, and that is a hard limit rather than a missing feature. Every relationship on this page assumes one angle is exactly 90 degrees. For any other triangle you need the law of sines or the law of cosines, which generalise these results to triangles with no right angle.

No. Everything you type is processed by the page in your browser. Nothing is sent to a server, nothing is stored after you close the tab, and there is no account.

An acute angle in a right triangle has to be strictly positive (the triangle would degenerate at 0°) and strictly less than 90° (the right angle already takes 90°). Values at the boundary give degenerate shapes with no triangle at all.