Right Triangle Calculator
Creator
Reviewer
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.
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)
Leg and hypotenuse (a and c known)
Leg and angle (a and angle A known)
Hypotenuse and angle (c and angle A known)
Leg and area (a and area known)
Hypotenuse and area (c and area known)
Once all three sides are known
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?
What is the difference between this calculator and the general triangle calculator?
Which pairs of values can I enter?
How many degrees are in a triangle, and why do angles A and B add up to 90?
What if I enter values that describe an impossible triangle?
How does the hypotenuse and angle mode work?
How can the calculator find the sides if I only know the area, not a side or an angle?
How to find the missing length of a triangle?
How do you find the hypotenuse of a right triangle?
Can it work as a 45 45 90 triangle calculator or a 30 60 90 triangle calculator?
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.
