Right Triangle Calculator: Complete Guide to Sides, Angles, Area, Perimeter & Trigonometry
A right triangle is one of the most useful shapes in mathematics, engineering, construction, surveying, physics, navigation, and everyday measurement. It is defined by one angle of exactly 90°, and once enough information is known, every other important measurement can be determined from the relationships between its sides and angles.
This Right Triangle Calculator is designed to solve a complete right triangle rather than returning only a single missing value. Enter two suitable known measurements and the calculator can determine the remaining side lengths, both acute angles, area, perimeter, altitude to the hypotenuse, inradius, circumradius, median, trigonometric ratios, and related slope or grade values.
The calculator also provides a visual triangle, step-by-step mathematical results, unit conversion, and validation for contradictory or physically impossible inputs. To explore foundational relationships between right-triangle sides, compare with our dedicated Pythagorean Theorem Calculator.
How to Use the Right Triangle Calculator
For a standard right triangle, the two legs meet at the 90° angle and the hypotenuse is opposite the 90° angle.
Use the calculator by entering the measurements you already know. Common starting combinations include:
- two legs
- a leg and the hypotenuse
- a leg and an acute angle
- the hypotenuse and an acute angle
For example, entering a = 5 and b = 12 produces the classic 5-12-13 right triangle:
The calculator keeps these quantities synchronized so that the displayed triangle, trigonometric values, geometric invariants, and derived measurements describe the same geometry. For non-right triangles or arbitrary polygons, visit our comprehensive Triangle Calculator.
What Is a Right Triangle?
A right triangle is a triangle containing exactly one right angle, measuring 90°. The other two angles are acute, so each is greater than 0° and less than 90°.
The three sides are conventionally described as:
- Leg a: the side opposite angle α
- Leg b: the side opposite angle β
- Hypotenuse c: the side opposite the 90° angle
The hypotenuse is always the longest side of a right triangle.
The three interior angles satisfy:
This complementary-angle relationship is one of the quickest checks for a right-triangle calculation.
Pythagorean Theorem
The fundamental relationship between the three sides is the Pythagorean theorem:
where a and b are the legs and c is the hypotenuse.
When both legs are known, the hypotenuse is:
Example: Finding the Hypotenuse
Suppose a = 3 and b = 4:
So a triangle with legs 3 and 4 has a hypotenuse of 5. This is the well-known 3-4-5 Pythagorean triple. Coordinate distance on a Cartesian plane uses the exact same formulation; test this with our Distance Calculator.
Finding a Missing Leg
If the hypotenuse and one leg are known, rearrange the Pythagorean theorem:
Example: 5-12-13 Triangle
Given b = 12 and c = 13:
The hypotenuse must be greater than either leg. For example, c = 10 cannot be used with a = 15 because a side of length 15 cannot be longer than the hypotenuse of the same right triangle. The calculator explicitly validates contradictory side combinations instead of silently replacing them with another triangle.
Right Triangle Angles
Because one angle is always 90°, only the two acute angles need to be determined:
When the three sides are known, inverse trigonometric functions can be used to find the acute angles:
Example: 5-12-13 Triangle
For a = 5, b = 12, c = 13:
The two acute angles therefore add to exactly 90°.
SOH-CAH-TOA for Right Triangles
The three primary right-triangle trigonometric ratios are sine, cosine, and tangent. A common mnemonic is SOH-CAH-TOA.
The calculator also evaluates the reciprocal trigonometric functions:
For the other acute angle β, the opposite and adjacent legs switch roles. These relationships follow directly from the side positions relative to the selected acute angle.
Area of a Right Triangle
The area of a right triangle is especially simple because the two perpendicular legs can be used as base and height:
where a and b are the two legs.
For a = 5, b = 12: A = 1/2 × 5 × 12 = 30 square units.
If the side lengths are measured in meters, the area is in square meters. If they are measured in feet, the area is in square feet.
Perimeter of a Right Triangle
The perimeter is the sum of all three side lengths:
For a 5-12-13 triangle: P = 5 + 12 + 13 = 30 units.
Perimeter and area measure different properties. Perimeter measures total boundary length, while area measures the two-dimensional region enclosed by the triangle.
Altitude to the Hypotenuse
The altitude from the right-angle vertex to the hypotenuse is another important right-triangle quantity. If the legs are a and b and the hypotenuse is c, then:
For a 5-12-13 triangle: h_c = (5 × 12) / 13 = 60 / 13 ≈ 4.6154.
The altitude can also be understood by equating two expressions for the same triangle area: 1/2 ab = 1/2 c h_c, which gives h_c = ab / c. This is useful when a problem asks for the perpendicular height to the hypotenuse rather than the height represented by either leg.
Inradius of a Right Triangle
The inradius is the radius of the circle that fits inside the triangle and touches all three sides. For a right triangle:
For a 5-12-13 triangle: r = (5 + 12 − 13) / 2 = 4 / 2 = 2.
There is also a useful area relationship: A = r s, where s is the semiperimeter s = (a + b + c) / 2. For the 5-12-13 triangle, s = 30 / 2 = 15, and A = 2 × 15 = 30. This provides an independent check on the area.
Circumradius of a Right Triangle
The circumradius is the radius of the circle passing through all three vertices. For every right triangle, a particularly simple relationship applies:
because the hypotenuse is the diameter of the circumcircle (Thales's Theorem). For c = 13: R = 13 / 2 = 6.5. This is one of the special geometric properties that makes right triangles especially convenient to analyze.
Median to the Hypotenuse
The median drawn from the right-angle vertex to the midpoint of the hypotenuse also has a simple result:
Therefore, in a right triangle, the median to the hypotenuse has the same length as the circumradius: m_c = R = 6.5 for c = 13.
Right Triangle Slope, Grade and Roof Pitch
Right triangles are closely related to slope and grade calculations. If rise is the vertical change and run is the horizontal change:
Example: 1:12 Slope (ADA Ramp)
For a rise of 1 and a run of 12: slope = 1 / 12, grade ≈ 8.3333%, and angle = arctan(1 / 12) ≈ 4.7636°. The corresponding rise-to-run ratio is written as 1:12. The same geometry appears in roof pitch, ramps, accessibility calculations, surveying, and construction layout.
Special Right Triangles
45°-45°-90° Triangle
A 45°-45°-90° triangle has two equal legs. If each leg has length x, the hypotenuse is c = x√2. For x = 1: a = 1, b = 1, c = √2 ≈ 1.4142. Both acute angles are 45°.
30°-60°-90° Triangle
The side ratios are 1 : √3 : 2, where the shortest leg is opposite 30°, the longer leg is opposite 60°, and the hypotenuse is opposite 90°. For a shortest leg of 1: a = 1, b = √3 ≈ 1.7321, c = 2.
Pythagorean Triples
A Pythagorean triple consists of three positive integers satisfying a² + b² = c². Common examples include 3-4-5, 5-12-13, 8-15-17, and 7-24-25.
For example: 5² + 12² = 13² (25 + 144 = 169). These integer triangles are useful in construction and geometric layout because they can create exact right angles without requiring decimal measurements.
Why Input Validation Matters
Not every combination of numbers represents a valid right triangle. For three side lengths, the defining condition is a² + b² = c².
For example: a = 5, b = 12, c = 10 would imply 5² + 12² = 169, but 10² = 100. Since 169 ≠ 100, these values cannot describe one right triangle. Likewise, the hypotenuse cannot be equal to or smaller than a leg. Instead of silently changing the numbers, the calculator reports a validation error.
Units and Measurement Consistency
A right triangle can be calculated in any consistent length unit. For example, if a = 3 m and b = 4 m, then c = 5 m, and Area = 6 m². The unit of area is squared because area is two-dimensional.
The calculator's conversion tools support common units including meters, centimeters, millimeters, feet, inches, and yards (e.g. 10 yd = 9.144 m and 10 m ≈ 10.9361 yd). When comparing or combining dimensions, make sure the input lengths use compatible units.
Worked Example: Complete 5-12-13 Right Triangle
Suppose the known legs are a = 5 and b = 12:
All independent relationships agree: 5² + 12² = 13², 22.6199° + 67.3801° = 90°, and A = r · s = 2 × 15 = 30.
Common Right Triangle Calculation Mistakes
Applications of Right Triangles
Construction & Framing
Checking corners for 90° squareness using 3-4-5 rules, stair stringer rise/run, and rafters.
Roofing & Ramps
Expressing roof pitch (e.g. 5:12) and ADA wheelchair ramp compliance (1:12 ratio, 8.33% grade).
Surveying & Physics
Triangulating elevation differences, vector decomposition, and navigation bearings.