Right triangle calculator

📐 Free Geometry Tool

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.

Fast Geometry Calculations
Student & Engineering Friendly
Accurate Triangle Solutions
Angle opposite side a (not the right angle)
Angle opposite side b (not the right angle)
Solved right triangle
Side a
—
Side b
—
Hypotenuse c
—
Angle A
—
Angle B
—
Area
—
½ × a × b
Perimeter
—
a + b + c
📐 Trigonometric ratios for angle A
sin A
—
opposite / hypotenuse
cos A
—
adjacent / hypotenuse
tan A
—
opposite / adjacent
📝 Step-by-step solution
💡 Triangle insights:
—
⚠️ This calculator provides educational geometry calculations. Results are computed using standard trigonometric formulas and are accurate to 6 significant figures. Always verify critical engineering or construction measurements independently.

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:

a² + b² = c²

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 findFormulaGiven
Hypotenuse cc = √(a² + b²)Both legs a and b
Leg aa = √(c² − b²)Hypotenuse c and leg b
Leg bb = √(c² − a²)Hypotenuse c and leg a
Angle AA = arcsin(a/c) or arctan(a/b)Two sides
Angle BB = 90° − AAngle A
AreaArea = (a × b) / 2Both legs
PerimeterP = a + b + cAll three sides
Leg a from anglea = c × sin(A) = b × tan(A)Hypotenuse + angle
Leg b from angleb = 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:

SOH: sin(A) = Opposite / Hypotenuse = a / c
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⁻¹).

Anglesincostan
0°010
30°0.50.8660.577
45°0.7070.7071
60°0.8660.51.732
90°10undefined

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 typeAnglesSide ratiosCommon use
45-45-9045°, 45°, 90°1 : 1 : √2Square diagonals, equal-leg bracing
30-60-9030°, 60°, 90°1 : √3 : 2Equilateral 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

Pythagorean theorem: a² + b² = c²
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

What is a right triangle?
A right triangle is a triangle with one angle exactly equal to 90 degrees (a right angle). The side opposite the right angle is called the hypotenuse — always the longest side. The other two sides are called legs. The two acute angles (less than 90°) in a right triangle always sum to exactly 90°. Right triangles are fundamental in geometry, trigonometry, engineering, and construction.
How do I calculate the hypotenuse?
If you know both legs (a and b): hypotenuse c = √(a² + b²). This is the Pythagorean theorem. Example: a = 3, b = 4 → c = √(9 + 16) = √25 = 5. If you know one leg and one angle: c = a ÷ sin(A) or c = b ÷ cos(A). Enter your known values in the calculator above for an instant result with step-by-step explanation.
What is the Pythagorean theorem?
The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². It is one of the most important mathematical relationships ever discovered, with applications in geometry, physics, engineering, navigation, and computer graphics. It works exclusively for right triangles — for other triangle types, the Law of Cosines is needed.
How do sine and cosine work in a right triangle?
Sine and cosine are ratios of the sides of a right triangle relative to an angle. For angle A: sin(A) = opposite side ÷ hypotenuse = a/c; cos(A) = adjacent side ÷ hypotenuse = b/c. These ratios are constant for a given angle regardless of the triangle’s size — they only depend on the angle, not the scale. To find an angle: A = arcsin(a/c) or A = arccos(b/c). The memory aid SOH-CAH-TOA covers all three primary trig functions.
Can I solve missing angles with this calculator?
Yes. Enter any two sides and the calculator will compute both acute angles using inverse trigonometric functions. Alternatively, enter one side and one angle, and the calculator derives all other values. The only constraint is that you must provide exactly two independent values — providing three values that are inconsistent will generate an error message.
What is the formula for the area of a right triangle?
Area = (base × height) / 2. For a right triangle, the two legs serve as the base and height, so Area = (a × b) / 2. Example: a = 6, b = 8 → Area = (6 × 8) / 2 = 24 square units. If only one leg and the hypotenuse are known, first find the missing leg using the Pythagorean theorem, then calculate the area.
How accurate is this right triangle calculator?
The calculator uses JavaScript’s Math library which provides IEEE 754 double-precision floating-point accuracy — approximately 15–17 significant digits. Results are displayed to 4–6 significant figures to avoid false precision while maintaining practical accuracy. For engineering or construction applications, always verify critical measurements independently. The step-by-step solution shows exactly which formulas are applied, allowing you to verify the calculation method.
What units are supported?
The calculator accepts any consistent unit of length — metres, centimetres, feet, inches, etc. All sides must be in the same unit. The unit selector changes the label on results but does not convert values between units. Angles can be entered in degrees (the default) or radians. Area is returned in square units of the chosen length unit.
Why are right triangles important in engineering?
Right triangles are foundational in engineering because forces, vectors, and structural loads are analysed using their horizontal and vertical components — which form right triangles. Roof pitch, ramp angles, stair design, cable tension calculations, bridge geometry, and circuit analysis (impedance triangles in electrical engineering) all depend on right triangle mathematics. The Pythagorean theorem and trigonometric functions are among the most-used mathematical tools in professional engineering.
What are Pythagorean triples?
Pythagorean triples are sets of three positive whole numbers (a, b, c) that satisfy a² + b² = c². The most famous is 3-4-5 (3² + 4² = 5²). Others include 5-12-13, 8-15-17, 7-24-25, and 9-40-41. Any multiple of a Pythagorean triple is also a triple (e.g. 6-8-10, 9-12-15). They are used extensively in construction to verify right angles without angle-measuring tools — the 3-4-5 method for squaring corners is a centuries-old carpentry technique.
What is a 45-45-90 triangle?
A 45-45-90 triangle is a special right triangle with two 45° angles and one 90° angle. Because both legs are equal, it is an isosceles right triangle. The side ratios are always 1 : 1 : √2. If each leg is length x, the hypotenuse is x√2 ≈ 1.414x. This triangle appears whenever a square is cut diagonally, and frequently in architecture, tiling, and structural diagonal bracing.
What is a 30-60-90 triangle?
A 30-60-90 triangle has angles of 30°, 60°, and 90°. Its side ratios are always 1 : √3 : 2 (short leg : long leg : hypotenuse). If the shortest leg is x, the longer leg is x√3 and the hypotenuse is 2x. This triangle is half an equilateral triangle and appears frequently in hexagonal geometry, mechanical design, and structural engineering.

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 ↑