Calculate all sides and angles of a right triangle from any two known values.
Reviewed by the CalculatorKosh Editorial TeamUpdated June 2026Free Β· No sign-up
Right Triangle Calculator
Calculate all sides and angles of a right triangle from any two known values.
How It Works
A right triangle is any triangle containing one angle of exactly 90Β° (a right angle, denoted C on this calculator). The side directly opposite that right angle is the hypotenuse (c) and is always the longest of the three sides. The two shorter sides that form the right angle are called the legs (a and b). Because a right triangle is so tightly constrained, you only ever need two independent measurements to reconstruct the whole shape β every other side, angle, the area, and the perimeter follow automatically. This tool does exactly that: give it two known values and it solves the remaining sides, both non-right angles, the area, and the perimeter in one step.
This calculator is useful for students learning geometry and trigonometry, for carpenters, masons, and surveyors checking that corners are truly square, for engineers and architects sizing ramps, roof pitches, and braces, and for anyone working with ladders, staircases, or diagonal distances. If you can identify the right angle and measure any two of the remaining parts, you can finish the triangle here.
The exact formulas used
Pythagorean theorem: for the two legs a, b and hypotenuse c, the relationship aΒ² + bΒ² = cΒ² always holds. Rearranged, the hypotenuse is c = β(aΒ² + bΒ²) and a missing leg is b = β(cΒ² β aΒ²). This is the single most important identity for right triangles and the reason the longest side is always opposite the largest (90Β°) angle.
Trigonometric ratios connect an angle to a pair of sides. For the angle A (opposite leg a, adjacent to leg b): sin(A) = opposite / hypotenuse = a/c, cos(A) = adjacent / hypotenuse = b/c, and tan(A) = opposite / adjacent = a/b. A handy way to remember these is the mnemonic SOH-CAH-TOA. To recover an angle from sides you use the inverse functions, for example A = arcsin(a/c) or A = arctan(a/b).
Angle sum: the interior angles of any triangle add to 180Β°. Since C = 90Β°, the other two must satisfy A + B = 90Β°, so they are complementary β knowing one immediately gives the other as B = 90Β° β A. Area: because the legs are perpendicular, the area is simply (1/2) Γ a Γ b. Perimeter: the sum a + b + c.
Worked example
Suppose you know the two legs are a = 3 and b = 4. The hypotenuse is c = β(3Β² + 4Β²) = β(9 + 16) = β25 = 5 β the famous 3-4-5 right triangle. The area is (1/2)(3)(4) = 6 square units and the perimeter is 3 + 4 + 5 = 12. For the angles, tan(A) = a/b = 3/4 = 0.75, so A = arctan(0.75) β 36.87Β°, and therefore B = 90Β° β 36.87Β° β 53.13Β°. Every output the calculator shows for these inputs can be reproduced by hand with the formulas above.
Tips
Keep your units consistent β if one side is in centimetres, every side must be in centimetres. Memorising a few Pythagorean triples (3-4-5, 5-12-13, 8-15-17, 7-24-25) and their multiples lets you sanity-check answers instantly. When you have a leg and an angle, pick the ratio whose two sides you know or want: use sin for opposite-and-hypotenuse, cos for adjacent-and-hypotenuse, and tan for the two legs.
Common mistakes
The most frequent error is treating a leg as the hypotenuse β always square and add the two legs to find c, and square and subtract to find a missing leg. Make sure your calculator is in degree mode (not radians) when entering angles. Do not confuse the inverse functions (arcsin, arccos, arctan) with reciprocals β sinβ»ΒΉ means "the angle whose sine is", not 1/sin. Finally, remember the hypotenuse must be the longest side: if a supposed leg is longer than the hypotenuse, the data is inconsistent and no real triangle exists.
Key relationships at a glance
Pythagorean theorem: aΒ² + bΒ² = cΒ²
Ratios: sin(A) = a/c Β· cos(A) = b/c Β· tan(A) = a/b
Angles: A + B + C = 180Β°, with C = 90Β°, so A + B = 90Β°
Area: (1/2) Γ a Γ b Β· Perimeter: a + b + c
Frequently Asked Questions
For any right triangle with legs a and b and hypotenuse c: aΒ² + bΒ² = cΒ². It allows you to find the third side when you know two. Example: legs 3 and 4 β hypotenuse = β(9 + 16) = β25 = 5 (a 3-4-5 Pythagorean triple).
Part of Geometry Calculators β compare every related calculator in one place.