Right Triangle
Calculator
Solve right triangles instantly — calculate hypotenuse, missing sides, angles, area, and perimeter using the Pythagorean theorem and trigonometry, with step-by-step solutions.
—
Right Triangle Calculator: Solve Hypotenuse & Angles Instantly
The right triangle is one of the most fundamental shapes in mathematics, engineering, architecture, and everyday life. From calculating roof pitch angles to determining the diagonal of a room, right triangle calculations appear constantly in practical applications. This free right triangle calculator solves any right triangle when at least two values are known — sides, angles, or a combination — using the Pythagorean theorem and trigonometric functions, with complete step-by-step solutions.
Enter any two known values (sides or angles) and the calculator instantly computes all missing measurements: the hypotenuse, both legs, both acute angles, area, perimeter, and trigonometric ratios — with an annotated triangle diagram that updates in real time.
What Is a Right Triangle?
A right triangle (also called a right-angled triangle) is a triangle in which one of the three interior angles is exactly 90 degrees (a right angle). The side opposite the right angle — always the longest side — is called the hypotenuse. The other two sides are called legs (or catheti): side a (opposite angle A) and side b (opposite angle B).
The three angles of any triangle always sum to 180°. In a right triangle, one angle is 90°, so the other two acute angles must sum to 90°. If angle A is known, angle B = 90° − A.
Key right triangle facts:
• The right angle (90°) is always opposite the hypotenuse
• The two acute angles always sum to 90°
• The hypotenuse is always the longest side
• A right triangle with two equal legs (45-45-90) has a hypotenuse of leg × √2
Understanding the Pythagorean Theorem
The Pythagorean theorem is the most famous formula in geometry, stated by the ancient Greek mathematician Pythagoras (though known much earlier in Babylon and Egypt). It describes the relationship between the three sides of any right triangle:
Where:
a = one leg (shorter side)
b = other leg
c = hypotenuse (longest side, opposite the right angle)
To find the hypotenuse: c = √(a² + b²). To find a missing leg: a = √(c² − b²). The theorem only works for right triangles — it does not apply to acute or obtuse triangles without modification.
Common Pythagorean triples — sets of whole numbers that satisfy a² + b² = c² — include: 3-4-5, 5-12-13, 8-15-17, 7-24-25, and 20-21-29. These triples appear frequently in construction, carpentry, and engineering because they allow precise right angles without a protractor.
Right Triangle Formulas Explained
| What to find | Formula | Given |
|---|---|---|
| Hypotenuse c | c = √(a² + b²) | Both legs a and b |
| Leg a | a = √(c² − b²) | Hypotenuse c and leg b |
| Leg b | b = √(c² − a²) | Hypotenuse c and leg a |
| Angle A | A = arcsin(a/c) or arctan(a/b) | Two sides |
| Angle B | B = 90° − A | Angle A |
| Area | Area = (a × b) / 2 | Both legs |
| Perimeter | P = a + b + c | All three sides |
| Leg a from angle | a = c × sin(A) = b × tan(A) | Hypotenuse + angle |
| Leg b from angle | b = c × cos(A) = a / tan(A) | Hypotenuse + angle |
How to Calculate the Hypotenuse
The hypotenuse is the most commonly calculated value in right triangle problems. Given both legs, apply the Pythagorean theorem directly:
Example: Find the hypotenuse when a = 6 and b = 8
c = √(6² + 8²) = √(36 + 64) = √100 = 10
This is a 6-8-10 triangle (a multiple of the 3-4-5 Pythagorean triple).
When one leg and one angle are known, use trigonometry: if you know leg a and angle A, the hypotenuse is c = a ÷ sin(A). If you know leg b and angle A, the hypotenuse is c = b ÷ cos(A).
Understanding Sine, Cosine, and Tangent
The three primary trigonometric functions — sine, cosine, and tangent — describe the relationships between the angles and sides of a right triangle. They are memorised using the acronym SOH-CAH-TOA:
CAH: cos(A) = Adjacent / Hypotenuse = b / c
TOA: tan(A) = Opposite / Adjacent = a / b
These functions work for any acute angle in a right triangle. To find an angle from two sides, use the inverse functions: arcsin, arccos, or arctan (written sin⁻¹, cos⁻¹, tan⁻¹).
| Angle | sin | cos | tan |
|---|---|---|---|
| 0° | 0 | 1 | 0 |
| 30° | 0.5 | 0.866 | 0.577 |
| 45° | 0.707 | 0.707 | 1 |
| 60° | 0.866 | 0.5 | 1.732 |
| 90° | 1 | 0 | undefined |
How to Solve Triangle Angles
To find the angles of a right triangle when the sides are known, use inverse trigonometric functions. Given sides a, b, c:
- Angle A = arctan(a/b) — most reliable when both legs are known
- Angle A = arcsin(a/c) — when leg a and hypotenuse are known
- Angle A = arccos(b/c) — when leg b and hypotenuse are known
- Angle B = 90° − A — always, since angles must sum to 180°
Real-Life Uses of Right Triangles
Construction & roofing
Roof pitch calculations, staircase design, ramp angles, and squaring building foundations all use right triangle calculations. The 3-4-5 method is a classic way to check corners are square.
Engineering & surveying
Surveyors use trigonometry to calculate distances and elevations. Engineers use right triangle calculations for forces, vectors, structural loads, and mechanical systems.
Navigation & GPS
Distance between GPS coordinates, bearing calculations, and course corrections in aviation and maritime navigation all rely on right triangle trigonometry.
Screen & display design
Screen diagonal size (e.g. 65-inch TV) is calculated using the Pythagorean theorem from width and height dimensions. Aspect ratios and pixel density also use triangle geometry.
Engineering and Construction Applications
Right triangle calculations are the backbone of structural engineering and construction. Key applications include:
- Roof pitch: A 6:12 pitch means 6 inches of rise for every 12 inches of run — the rafter length is the hypotenuse of a 6-12 right triangle
- Stair design: Staircase rise and run form a right triangle; the stringer (diagonal board) is the hypotenuse
- Diagonal bracing: Cross-bracing in walls and bridges forms right triangles to resist lateral forces
- Foundation squaring: The 3-4-5 method confirms right angles when setting out building foundations
- Slope and grade: Road and drainage gradients are right triangle ratios expressed as percentages
Special Right Triangles
Two special right triangles have side ratios that are particularly useful in engineering and education:
| Triangle type | Angles | Side ratios | Common use |
|---|---|---|---|
| 45-45-90 | 45°, 45°, 90° | 1 : 1 : √2 | Square diagonals, equal-leg bracing |
| 30-60-90 | 30°, 60°, 90° | 1 : √3 : 2 | Equilateral triangle halves, hexagon geometry |
Common Geometry Mistakes
- Confusing sides and hypotenuse: The hypotenuse is always the side opposite the 90° angle — always the longest side. Never apply the Pythagorean theorem with the hypotenuse as one of the legs.
- Using degrees vs radians incorrectly: Calculator trigonometric functions require consistent angle units. Scientific calculators default to degrees; some programming environments default to radians.
- Assuming all triangles are right triangles: The Pythagorean theorem and SOH-CAH-TOA apply only to right triangles. Other triangle types require the Law of Sines or Law of Cosines.
- Rounding too early: In multi-step calculations, rounding intermediate values accumulates errors. Always carry full precision through the calculation and round only the final result.
Geometry Formula Cheat Sheet
Hypotenuse: c = √(a² + b²)
Leg a: a = √(c² − b²)
Leg b: b = √(c² − a²)
sin(A) = a/c │ cos(A) = b/c │ tan(A) = a/b
Area = (a × b) / 2
Perimeter = a + b + c
Angle A + Angle B = 90°
Angle A = arctan(a/b) = arcsin(a/c) = arccos(b/c)
Related Geometry Calculators
Frequently Asked Questions
Solve any right triangle instantly — free & educational
Enter any two known values above — sides or angles — for a complete solution with step-by-step explanation and triangle diagram.
Solve triangle ↑