Skip to content

Right Triangle Calculator — Free Online Right Triangle Solver

Solve any right triangle instantly using the Pythagorean theorem. Enter any two sides to find the third side, both angles, area, perimeter, and all trigonometric ratios.

Known Values

Right Triangle Results

Leg a

3.0000

Leg b

4.0000

Hypotenuse c

5.0000

Angle A

36.87°

Angle B

53.13°

Area

6.0000 sq units

Perimeter

12.0000

Trigonometric Ratios

sin A

0.6000

sin B

0.8000

cos A

0.8000

cos B

0.6000

tan A

0.7500

tan B

1.3333

How to Use the Right Triangle Calculator

  1. Select which sides are known: Choose from three input modes. Select "Two Legs (a, b)" if you know both legs. Select "Leg a + Hypotenuse c" if you know one leg and the hypotenuse. Select "Leg b + Hypotenuse c" for the other leg-hypotenuse combination. The calculator labels update to match your selection.
  2. Enter the known values: Type positive numbers into both input fields. The values represent lengths in whatever unit you are working with (inches, feet, meters, etc.). The calculator accepts decimal values for precise measurements.
  3. Review all results: The results panel instantly displays all three sides (both legs and hypotenuse), both non-right angles in degrees, the triangle area, the total perimeter, and all six trigonometric ratios (sin, cos, tan for angles A and B). Results update in real time as you type.
  4. Interpret the trigonometric ratios: The trig ratios show the sine, cosine, and tangent values for both acute angles. Angle A is opposite leg a, and angle B is opposite leg b. These values are useful for further calculations and for verifying your work.

The calculator automatically validates your input. If the hypotenuse you enter is not longer than the given leg, the calculator indicates no valid solution exists because the hypotenuse must always be the longest side in a right triangle.

Right Triangle Formulas

Pythagorean Theorem

a² + b² = c²

Trigonometric Ratios (Angle A)

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

Area of Right Triangle

Area = (a x b) / 2

Perimeter

P = a + b + c

Finding Angles

A = arcsin(a/c), B = 90° - A

Variables Explained

  • a: One leg of the right triangle (the side opposite angle A). The leg is always shorter than the hypotenuse.
  • b: The other leg of the right triangle (the side opposite angle B). Together with leg a, the two legs form the right angle.
  • c: The hypotenuse (the side opposite the 90-degree right angle). It is always the longest side of the right triangle.
  • A: The acute angle opposite leg a. Angle A = arcsin(a/c) = arctan(a/b).
  • B: The acute angle opposite leg b. Since A + B + 90 = 180, angle B always equals 90 - A.

Step-by-Step Example

Solve a right triangle with legs a = 3 and b = 4:

  1. Find the hypotenuse: c = sqrt(3² + 4²) = sqrt(9 + 16) = sqrt(25) = 5
  2. Find angle A: A = arcsin(3/5) = arcsin(0.6) = 36.87°
  3. Find angle B: B = 90 - 36.87 = 53.13°
  4. Calculate area: Area = (3 x 4) / 2 = 6 sq units
  5. Calculate perimeter: P = 3 + 4 + 5 = 12
  6. Trig ratios: sin(A) = 0.6, cos(A) = 0.8, tan(A) = 0.75

Practical Examples

Example 1: Kevin's Ladder Safety Calculation

Kevin needs to lean a 20-foot ladder against a wall so the base is 5 feet from the wall. He wants to know how high up the wall the ladder will reach and at what angle it rests.

  • Known: leg a = 5 ft (base distance), hypotenuse c = 20 ft (ladder length)
  • Height: b = sqrt(20² - 5²) = sqrt(400 - 25) = sqrt(375) = 19.36 ft
  • Angle at base: B = arccos(5/20) = arccos(0.25) = 75.52°

The ladder reaches 19.36 feet up the wall at an angle of 75.52 degrees from the ground. Safety guidelines recommend ladder angles between 70 and 80 degrees, so Kevin's setup is within the safe range. If the angle is too steep (over 80 degrees), the ladder could fall backward. If too shallow (under 70 degrees), the base could slide out.

Example 2: Amanda's Television Diagonal

Amanda is buying a new TV and wants to verify a 55-inch TV fits her wall mount. She knows the screen is about 48 inches wide and 27 inches tall. She calculates the diagonal to confirm the size.

  • Diagonal: c = sqrt(48² + 27²) = sqrt(2304 + 729) = sqrt(3033) = 55.07 inches
  • This confirms it is indeed a 55-inch TV (measured diagonally)

The 55.07-inch diagonal confirms the TV specification. TV sizes are always measured diagonally using the Pythagorean theorem. Amanda can use this same calculation to determine whether her wall space (which she measures in width and height) can accommodate a given TV size. For area calculations of her wall space, she can use our area calculator.

Example 3: Tom's Wheelchair Ramp Design

Tom is building an ADA-compliant wheelchair ramp. The entrance is 2 feet above ground level. ADA guidelines require a maximum slope of 1:12 (for every 1 inch of rise, 12 inches of run). He needs the ramp length.

  • Rise (leg a) = 2 ft, Run (leg b) = 2 x 12 = 24 ft (1:12 ratio)
  • Ramp length: c = sqrt(2² + 24²) = sqrt(4 + 576) = sqrt(580) = 24.08 ft
  • Angle: A = arctan(2/24) = 4.76°

Tom needs a ramp that is 24.08 feet long at a 4.76-degree angle. The ramp angle is well within ADA requirements. If space is limited, Tom could consider a switchback ramp design, but each section must still maintain the 1:12 ratio or shallower.

Example 4: Rachel's Distance Shortcut

Rachel is walking through a city. Instead of walking 300 meters east and then 400 meters north along the streets, she can cut diagonally through a park. She wants to know how much distance she saves.

  • Street route: 300 + 400 = 700 meters
  • Diagonal: c = sqrt(300² + 400²) = sqrt(90000 + 160000) = sqrt(250000) = 500 meters
  • Distance saved: 700 - 500 = 200 meters (28.6% shorter)

By cutting through the park, Rachel saves 200 meters, a 28.6% reduction in walking distance. This is a classic example of the 3-4-5 Pythagorean triple (scaled by 100). For more complex distance problems, try our distance calculator.

Common Pythagorean Triples Reference Table

Leg a Leg b Hypotenuse c Angle A Area
3 4 5 36.87° 6
5 12 13 22.62° 30
8 15 17 28.07° 60
7 24 25 16.26° 84
9 40 41 12.68° 180
6 8 10 36.87° 24
20 21 29 43.60° 210

Tips and Complete Guide

The SOH-CAH-TOA Mnemonic

The most popular way to remember trigonometric ratios is SOH-CAH-TOA. SOH means Sine = Opposite / Hypotenuse. CAH means Cosine = Adjacent / Hypotenuse. TOA means Tangent = Opposite / Adjacent. "Opposite" and "adjacent" are relative to the angle you are working with. The opposite side is across from the angle, and the adjacent side is next to it (but not the hypotenuse). This mnemonic is universally taught and will help you solve right triangle problems quickly.

The 3-4-5 Rule in Construction

Builders have used the 3-4-5 rule for thousands of years to create perfect right angles. Measure 3 units along one direction and 4 units along the perpendicular direction. If the diagonal between these two points measures exactly 5 units, the corner is a perfect 90-degree angle. This works with any multiple: 6-8-10, 9-12-15, 12-16-20, and so on. This practical application of the Pythagorean theorem requires no special tools, just a measuring tape, and is still widely used in framing, concrete work, and landscaping.

Relationship Between Right Triangles and Circles

Right triangles have a deep connection to circles. The hypotenuse of a right triangle inscribed in a circle always equals the diameter of that circle (Thales' theorem). This means any triangle inscribed in a semicircle with one side being the diameter is always a right triangle. This relationship is fundamental to understanding the unit circle in trigonometry, where a point on a circle of radius 1 creates a right triangle whose legs are cos(A) and sin(A). For circle calculations, try our circle calculator.

Extending to Three Dimensions

The Pythagorean theorem extends naturally to three dimensions. The space diagonal of a rectangular box with dimensions l, w, and h is d = sqrt(l squared + w squared + h squared). This is derived by applying the Pythagorean theorem twice: first to find the floor diagonal, then to find the space diagonal. This is useful for determining whether long objects fit inside boxes or rooms, and it forms the basis of 3D distance calculations in computer graphics and physics.

Common Mistakes to Avoid

  • The hypotenuse must be the longest side: If you enter a "hypotenuse" that is shorter than the given leg, no valid right triangle exists. The hypotenuse is always opposite the largest angle (90 degrees) and is therefore always the longest side.
  • Do not confuse legs with the hypotenuse: Legs are the two sides that form the right angle. The hypotenuse is the side opposite the right angle. Mixing them up reverses the Pythagorean calculation and gives wrong results.
  • Units must be consistent: Both input values must be in the same unit (both in feet, both in meters, etc.). Mixing units produces incorrect results. Convert all measurements to the same unit before entering them.
  • Angle measures are in degrees: This calculator outputs angles in degrees. If you need radians, multiply the degree value by pi/180. For example, 45 degrees = 0.7854 radians.
  • Rounding the hypotenuse: When the hypotenuse is an irrational number (like sqrt(2)), rounding it early introduces error. Use the full-precision value from our calculator for downstream calculations.

Frequently Asked Questions

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides: a squared + b squared = c squared. For example, a right triangle with legs of 3 and 4 has a hypotenuse of sqrt(9 + 16) = sqrt(25) = 5. This theorem is one of the most fundamental relationships in geometry and is used extensively in construction, navigation, physics, and engineering.

To find a missing side, rearrange the Pythagorean theorem based on which side is unknown. If the hypotenuse c is missing: c = sqrt(a squared + b squared). If leg a is missing: a = sqrt(c squared - b squared). If leg b is missing: b = sqrt(c squared - a squared). For example, if leg a = 5 and hypotenuse c = 13, then leg b = sqrt(169 - 25) = sqrt(144) = 12. Our calculator performs this computation instantly for any combination of two known sides.

The three primary trigonometric ratios are sine, cosine, and tangent. For angle A in a right triangle: sin(A) = opposite/hypotenuse = a/c, cos(A) = adjacent/hypotenuse = b/c, and tan(A) = opposite/adjacent = a/b. These ratios are constant for any given angle regardless of triangle size. For example, sin(30 degrees) is always 0.5. Our calculator displays all six trigonometric ratios (sin, cos, tan for both non-right angles) alongside the triangle solution.

Two special right triangles have fixed angle and side ratios. The 45-45-90 triangle has two equal legs and a hypotenuse equal to leg x sqrt(2). The side ratio is 1:1:sqrt(2). The 30-60-90 triangle has sides in the ratio 1:sqrt(3):2, where the shortest side is opposite the 30-degree angle. These triangles appear frequently in geometry, trigonometry, and standardized tests. Recognizing them allows quick mental calculations without a calculator.

Once you know two sides, you can find the non-right angles using inverse trigonometric functions. Angle A = arcsin(a/c) or arctan(a/b). Angle B = arcsin(b/c) or arctan(b/a). Since one angle is always 90 degrees and all angles sum to 180 degrees, angle B = 90 - angle A. For example, with legs 3 and 4: angle A = arctan(3/4) = 36.87 degrees, and angle B = 90 - 36.87 = 53.13 degrees. Our right triangle calculator computes both angles automatically.

This calculator requires two side measurements. If you know one side and one non-right angle, you can first compute the second side using trigonometric ratios and then use this calculator. For example, if leg a = 5 and angle A = 30 degrees, then hypotenuse c = a / sin(A) = 5 / 0.5 = 10. You can then enter a = 5, c = 10 into our calculator. For general triangle solving with mixed inputs, try our <a href='/math/geometry/triangle-calculator'>triangle calculator</a>.

Pythagorean triples are sets of three positive integers that satisfy the Pythagorean theorem. The most common are (3, 4, 5), (5, 12, 13), (8, 15, 17), and (7, 24, 25). Any multiple of a triple is also a triple, so (6, 8, 10) works because it is 2 x (3, 4, 5). There are infinitely many Pythagorean triples. They are useful for quick mental verification and appear in number theory, cryptography, and problem-solving competitions.

Right triangles are fundamental to countless real-world applications. Builders use the 3-4-5 rule to verify right angles. Surveyors use right triangle trigonometry to calculate heights and distances. Pilots and sailors use it for navigation calculations. Architects design stairs, ramps, and roof pitches using right triangle ratios. Physicists decompose forces into components using right triangles. Computer graphics use right triangle math for rendering and transformations.

Related Calculators

Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.

Last updated: February 23, 2026

Sources