Skip to content

Right Triangle Calculator

Creator

Ashna Bashir, AI/ML Engineer

Reviewer

Muhammad Azeem, AI Consultant
Updated

Computed automatically, this can't be entered as a known value.

The triangle's area, in the same squared units as the sides.

Computed automatically, this can't be entered as a known value.

abchαβ

Enter any two independent known values from a right triangle, both legs, a leg with the hypotenuse, a leg or the hypotenuse with an angle, or a leg or the hypotenuse with the area, and this right triangle calculator solves the rest: every missing side, both non-right angles, the area and the perimeter. Textbook prompts such as “solve the following triangle for all missing sides and angles,” “find the side labeled x” or “solve for x in the following right triangle” all reduce to the same six modes below.

Nothing is uploaded anywhere: every number stays in your browser, and the labels on the result match the standard right triangle setup, with the right angle at C and legs a and b opposite angles A and B.

How the right triangle calculator works in each solving mode

A right triangle, sometimes called a right angle triangle, is defined by one interior angle fixed at exactly 90 degrees, at the vertex this calculator calls C; that single fixed angle is what separates it from every other triangle shape and is the reason a plain right angle calculator can lean on simpler trigonometry than a general triangle solver needs. The two shorter sides, called legs, are labeled a and b, and the longest side, opposite the right angle, is the hypotenuse, labeled c. Angle A sits opposite leg a, and angle B sits opposite leg b, so this tool also works as a right triangle angle calculator whenever an angle, rather than a third side, is the value you are solving for. Every triangle has 180 degrees in total, and a right triangle spends 90 of them on the right angle, so angles A and B always add up to exactly 90 degrees between them. The geometry formulas behind all six solving modes are laid out one by one below.

Two legs. Given both legs a and b, the hypotenuse comes straight from the Pythagorean theorem, c equals the square root of a squared plus b squared, exactly how to find the hypotenuse of a triangle whenever both legs are already known, and exactly what a dedicated Pythagoras calculator does behind the scenes. Once the hypotenuse of a right triangle is known this way, angle A is the arctangent of a divided by b, and angle B is 90 minus angle A. Worked example: with a = 3 and b = 4, c = the square root of 9 plus 16, which is the square root of 25, or 5. The 3-4-5 triangle angles are about 36.87 degrees for angle A and 53.13 degrees for angle B, adding up to exactly 90.

Leg and hypotenuse. Given one leg a and the hypotenuse c, the other leg comes from rearranging the same theorem, b equals the square root of c squared minus a squared. Angle A is the arcsine of a divided by c, since a is the side opposite angle A and c is the hypotenuse. Worked example: with a = 3 and c = 5, b = the square root of 25 minus 9, which is the square root of 16, or 4, the same 3-4-5 triangle as above, with the same 36.87 and 53.13 degree angles.

Leg and angle. Given one leg a and its opposite angle A, the other leg comes from the tangent relationship, b equals a divided by the tangent of angle A, and the hypotenuse comes from the sine relationship, c equals a divided by the sine of angle A. Worked example: with a = 4 and angle A = 53.13 degrees, b works out to approximately 3 and c to approximately 5, recovering the same 3-4-5 triangle from a completely different starting pair. In every mode, once all three sides are known, the area is half of a times b, and the perimeter is simply a plus b plus c.

Hypotenuse and angle. Given the hypotenuse c and angle A, leg a is c times the sine of A, and leg b is c times the cosine of A, since sine is opposite over hypotenuse and cosine is adjacent over hypotenuse. Worked example: with c = 5 and angle A = 36.87 degrees, a = 5 x sin(36.87°) ≈ 3, and b = 5 x cos(36.87°) ≈ 4, the familiar 3-4-5 triangle again, this time solved from the hypotenuse outward instead of from a leg.

Leg and area. Since the area of a right triangle is half of a times b, a known leg a and area rearrange directly to b = (2 x area) / a. Once both legs are known, the hypotenuse and angles follow exactly as in the two-legs mode above. Worked example: a = 3 and area = 6 gives b = (2 x 6) / 3 = 4, recovering the same 3-4-5 triangle a third time.

Hypotenuse and area. This is the one pair that cannot solve for either leg with a single rearrangement, since neither leg is given directly. Instead, the calculator treats a + b and a - b as two new unknowns: squaring and combining a² + b² = c² with a x b = 2 x area shows that (a + b)² = c² + 4 x area and (a - b)² = c² - 4 x area, and taking square roots of both recovers a and b individually. There is a limit worth knowing: for a fixed hypotenuse, the largest possible area happens when the triangle is isosceles (a equals b), and asking for more area than that at that hypotenuse describes a triangle that cannot exist, so the calculator flags it rather than returning an invalid answer.

Right triangle formulas by solving path

Two legs (a and b known)

c = √(a^2 + b^2)
A = arctan (a/b)

Leg and hypotenuse (a and c known)

b = √(c^2 - a^2)
A = arcsin (a/c)

Leg and angle (a and angle A known)

b = a/(tan A)
c = a/(sin A)

Hypotenuse and angle (c and angle A known)

a = c sin A
b = c cos A

Leg and area (a and area known)

b = (2 × area)/a

Hypotenuse and area (c and area known)

(a + b)^2 = c^2 + 4 × area
(a - b)^2 = c^2 - 4 × area

Once all three sides are known

Area = 1/2 a b
Perimeter = a + b + c

Checking a result for consistency

Every answer this calculator returns can be double-checked with two quick, independent tests. The first is the angle sum: angle A plus angle B should always equal exactly 90 degrees, since the right angle at C already accounts for the other 90 of the triangle's 180 total degrees; if a hand-calculated angle A and angle B do not add to 90, something went wrong before this stage.

The second check is the Pythagorean theorem itself, applied after the fact: once all three sides are known, a squared plus b squared should equal c squared exactly, or within a small rounding difference. For the 3-4-5 triangle used throughout this page's worked examples, 3 squared plus 4 squared is 9 plus 16, which is 25, and 5 squared is also 25, confirming the three sides fit together correctly. A third, faster check works for area alone: half of a times b should match the reported area whenever both legs are known. Any of these three catches the same class of mistake, a misplaced digit or a degree-radian mix-up, before it carries into a cut list or a construction plan built on the result.

How this differs from the other two triangle tools

“How to solve a triangle” is a broader question than it first sounds, since the right method depends on what shape the triangle is and what you already know about it. This site answers it with three related but distinct triangle tools, each built for a different question, whether you think of this one as a right triangle finder, a quick hypotenuse calc, or a fuller right angled triangle calc that also returns the angles, area and perimeter. The Pythagorean theorem calculator is narrower on purpose: give it two sides of a right triangle and it returns only the third side, with no angles, no area and no perimeter. Reach for it when a missing side length is genuinely the only thing you need, for example checking whether a ladder, a diagonal brace or a screen size fits a given rectangle.

This right triangle calculator goes further. It accepts a side and an angle as well as two sides, and every successful calculation returns the complete picture: all three sides, both acute angles, the area and the perimeter together, because a right triangle problem in practice, like sizing a roof rafter, a ramp, or a set of stairs, usually needs more than one number back.

The general triangle calculator goes further still, but in a different direction: it solves any triangle, not just right triangles, using the law of sines and the law of cosines to handle shapes where no angle is fixed at 90 degrees. If your triangle does not have a right angle at all, that tool is the correct one to use; the shortcuts this calculator relies on, like the Pythagorean theorem and the simple sine, cosine and tangent ratios, only hold true because one angle here is always exactly 90 degrees.

For the trigonometry behind each mode, with more worked examples and the special triangles, read how to solve a right triangle.

Frequently asked questions

What is the difference between this calculator and the Pythagorean theorem calculator?

The Pythagorean theorem calculator does one thing: given two sides of a right triangle, it finds the third side using a² + b² = c², and nothing else. This calculator solves the whole triangle. Give it any two known values, including a side and an angle or a side and the area, and it returns every side, both non-right angles, the area and the perimeter in one go.

What is the difference between this calculator and the general triangle calculator?

The general triangle calculator works for any triangle, including ones with no right angle, using tools like the law of sines and the law of cosines that apply to arbitrary triangle shapes. This calculator only works for right triangles, where one angle is fixed at 90 degrees. Because that angle is known in advance, right triangle problems need only simple trigonometry rather than the more general laws, which is why this page exists separately.

Which pairs of values can I enter?

Every field, a, b, c, angle α, angle β, and the area, is shown at once, and any two of them are enough: both legs; one leg with the hypotenuse; one leg with its own opposite angle; the hypotenuse with either angle; one leg with the triangle's area; or the hypotenuse with the area. Angle α is opposite leg a and angle β is opposite leg b, so it never matters which one you happen to know; fill in whichever two boxes you have numbers for and press Calculate. Two angles alone are never enough on their own, because a right triangle's two acute angles always add up to 90 degrees regardless of size, so they carry no information about scale, and an angle paired with the area alone is not one of the pairs this calculator solves from either.

How many degrees are in a triangle, and why do angles A and B add up to 90?

Every triangle's three interior angles add up to 180 degrees. In a right triangle, the right angle already uses up 90 of those degrees, which leaves exactly 90 degrees split between the other two angles. That is true no matter which two values you started from, and the calculator uses it directly: once one acute angle is known, the other is just 90 minus that angle.

What if I enter values that describe an impossible triangle?

The calculator rejects them rather than guessing. A leg entered as equal to or longer than the hypotenuse is impossible, since the hypotenuse is always a right triangle's longest side, so filling in a leg and the hypotenuse that way shows an error instead of a wrong answer. Likewise, for a given hypotenuse there is a largest possible area (reached when the triangle is isosceles, area equals hypotenuse squared divided by 4); filling in the hypotenuse and an area larger than that is rejected as geometrically impossible for that hypotenuse. Filling in more than two fields, or fewer than two, is also rejected, since the calculator needs exactly two independent known values to know what to solve for.

How does the hypotenuse and angle mode work?

Given the hypotenuse c and angle A (opposite leg a), leg a is c times the sine of A, and leg b is c times the cosine of A, straight from the standard definitions of sine and cosine in a right triangle. This is a common combination in the real world, for example a ladder of known length leaning at a known angle against a wall, where the ladder itself is the hypotenuse.

How can the calculator find the sides if I only know the area, not a side or an angle?

Filling in a leg with the area, or the hypotenuse with the area, both start from the area formula, half of leg a times leg b, and combine it with the Pythagorean theorem. With one leg already known, the other leg is simply twice the area divided by that leg, and the rest follows the same way as the two-legs mode. With only the hypotenuse and the area known, both legs come from solving a small system of two equations at once, since neither leg is given directly. The area alone, paired only with an angle and no side, is not enough information for the calculator to solve from.

How to find the missing length of a triangle?

Enter the two values you already know, two sides or a side and an angle, and press Calculate: every missing length appears at once, along with both acute angles. By hand the route depends on the pair. Two legs give the hypotenuse through the Pythagorean theorem, a leg and the hypotenuse give the other leg by rearranging it, and a side with an angle uses sine, cosine or tangent. The formulas for each pair are listed above.

How do you find the hypotenuse of a right triangle?

With both legs known, square each leg, add the squares and take the square root: for legs of 6 and 8, the hypotenuse is the square root of 36 plus 64, which is 10. With one leg and an angle, divide the leg by the sine of the angle opposite it. The calculator does either version once you fill in the two values you have.

Can it work as a 45 45 90 triangle calculator or a 30 60 90 triangle calculator?

Yes, because those are ordinary right triangles with special angles. For a 45-45-90 triangle, enter a leg and an angle of 45: both legs come out equal and the hypotenuse is the leg times the square root of 2, so a leg of 1 gives 1.4142. For a 30-60-90 triangle, enter the short leg and an angle of 30: the long leg is the short leg times the square root of 3 and the hypotenuse is twice the short leg, so a short leg of 1 gives 1.7321 and 2.

Related tools: Distance Calculator, Binary Calculator and Factor Calculator. More are grouped under Math Calculators, and every tool on the site is listed at all calculators.