Calculate Hypotenuse from Both Legs (Pythagorean Theorem)
Use this form when both legs of a right triangle are known and you need the hypotenuse. The Pythagorean theorem is the most famous result in geometry.
c = √(a² + b²)
Calculate Right Triangle Area from Legs
Use this form when both legs are known. The two legs serve as base and height because they meet at the right angle.
A = (1/2) a b
Calculate Leg a from Hypotenuse and Leg b
Use this rearrangement of the Pythagorean theorem when the hypotenuse and one leg are known and you need the other leg.
a = √(c² − b²)
Calculate Leg b from Hypotenuse and Leg a
Use this rearrangement when the hypotenuse and the first leg are known and you need the second leg.
b = √(c² − a²)
How It Works
This right triangle calculator solves c² = a² + b² (the Pythagorean theorem) and A = (1/2) a b for area. Pick the unknown with the solve-for toggle, enter the remaining values, and the calculator returns the result plus all related quantities — perimeter, both acute angles (atan(a/b) and atan(b/a)), inradius r = (a+b−c)/2, and circumradius R = c/2 (the hypotenuse is the diameter of the circumscribed circle, a special property of right triangles).
Example Problem
A right triangle has legs of 3 m and 4 m. Find the hypotenuse, area, and the two acute angles.
- Knowns: a = 3 m, b = 4 m, right angle at the corner where a and b meet
- Hypotenuse: c = √(a² + b²) = √(9 + 16) = √25 = 5 m
- Area: A = (1/2) a b = (1/2) · 3 · 4 = 6 m²
- Angle α (opposite a): α = atan(3/4) ≈ 36.87°
- Angle β (opposite b): β = atan(4/3) ≈ 53.13°
- Verify: α + β = 90° ✓ (the two acute angles sum to 90°)
3-4-5 is the smallest 'Pythagorean triple' — integer legs and hypotenuse. Other common triples: 5-12-13, 8-15-17, 7-24-25.
When to Use Each Variable
- Solve for Hypotenuse — when both legs are known — measuring diagonal distances, brace lengths, line-of-sight.
- Solve for Area — when both legs are known and you need the enclosed area — triangular sails, gable roofs, ramps.
- Solve for Leg a — when the hypotenuse and the other leg are known — typical 'find the missing side' problem.
- Solve for Leg b — same as Leg a but the other side missing.
Key Concepts
A right triangle has one 90° angle and two acute angles that sum to 90°. The side opposite the right angle is the hypotenuse (always the longest side); the other two sides are legs. The Pythagorean theorem c² = a² + b² relates the three sides — it works in any right triangle. The hypotenuse is also the diameter of the triangle's circumscribed circle, which is why R = c/2. Special right triangles to know: 3-4-5 (and its multiples 6-8-10, 9-12-15), 5-12-13, 45-45-90 (isosceles right, sides in ratio 1:1:√2), and 30-60-90 (sides in ratio 1:√3:2).
Applications
- Construction: brace lengths, rafter spans, diagonal distance verification (5-12-13 trick for squaring corners)
- Surveying: line-of-sight calculations, slope distance from horizontal and vertical components
- Navigation: distance to horizon, dead reckoning with bearing and travel time
- Physics: vector addition and decomposition, projectile range with horizontal and vertical components
Common Mistakes
- Confusing legs with hypotenuse — c is always the side OPPOSITE the right angle, never adjacent to it
- Using c² = a² + b² when you actually have a non-right triangle — the Pythagorean theorem only works for right triangles (general triangles use the law of cosines)
- Forgetting to take the square root: c² gives c² (an area), not c (a length)
- Reading angles in radians when degrees are wanted — atan returns radians by default; this calculator converts to degrees
Frequently Asked Questions
How do you find the hypotenuse of a right triangle?
Use the Pythagorean theorem c = √(a² + b²), where a and b are the two legs. For a 3-4-5 triangle, c = √(9+16) = 5.
What is the formula for the area of a right triangle?
A = (1/2) a b, where a and b are the two legs (the sides meeting at the right angle). For legs 3 and 4, A = 6.
How do you find a missing leg of a right triangle?
Rearrange the Pythagorean theorem: a = √(c² − b²) or b = √(c² − a²). For a hypotenuse of 5 and a leg of 4, the other leg is √(25−16) = √9 = 3.
What is a Pythagorean triple?
A set of three positive integers (a, b, c) satisfying a² + b² = c². The smallest is 3-4-5; others include 5-12-13, 8-15-17, 7-24-25, 20-21-29. Any multiple of a triple is also a triple.
How are the two non-right angles related?
They sum to 90° because the total of all three angles in any triangle is 180° and one angle is 90°. So if α = atan(a/b), then β = 90° − α = atan(b/a).
What is the inradius of a right triangle?
r = (a + b − c) / 2. For a 3-4-5 triangle, r = (3+4−5)/2 = 1. The inscribed circle touches all three sides from inside.
What is the circumradius of a right triangle?
R = c/2. The hypotenuse is the diameter of the circumscribed circle — a special property of right triangles. For c = 5, R = 2.5.
How does the Pythagorean theorem work in 3D?
The same idea extends: for a rectangular box with sides l, w, h, the space diagonal d = √(l² + w² + h²). This calculator handles only the 2D right-triangle case; use the rectangular prism calculator for 3D.
Reference: Weisstein, Eric W. "Right Triangle." MathWorld — A Wolfram Web Resource. https://mathworld.wolfram.com/RightTriangle.html
Worked Examples
Carpentry
What brace length is needed for a 6 × 8 ft frame?
A wooden frame is 6 ft tall and 8 ft wide. Compute the diagonal brace needed to square it (6-8-10 triple).
- Knowns: a = 6 ft, b = 8 ft (legs)
- Formula: c = √(a² + b²)
- c = √(36 + 64) = √100 = 10 ft
Brace length = 10 ft
6-8-10 is a multiple of the 3-4-5 Pythagorean triple. Carpenters use this trick — a 6-8-10 triangle is a quick way to square a corner.
Ramp Design
What is the area of a 5 × 12 ramp?
A right-triangular ramp has a rise of 5 ft and a run of 12 ft. Compute its area.
- Knowns: a = 5 ft, b = 12 ft
- Formula: A = (1/2) a b
- A = (1/2) · 5 · 12 = 30 ft²
Area = 30 ft²; hypotenuse = √(25+144) = 13 ft
5-12-13 is another famous Pythagorean triple. Ramp slope ratio is 5:12 — that's about 22.6° from horizontal.
Distance Calculation
Find the missing leg of a 15-17-? triangle
A right triangle has a hypotenuse of 17 m and one leg of 15 m. Find the other leg.
- Knowns: c = 17 m, b = 15 m
- Formula: a = √(c² − b²)
- a = √(289 − 225) = √64 = 8 m
Missing leg = 8 m (8-15-17 Pythagorean triple)
8-15-17 is a Pythagorean triple. Memorizing the common triples — 3-4-5, 5-12-13, 8-15-17, 7-24-25, 20-21-29 — speeds up everyday geometry.
Right Triangle Formulas
A right triangle has one 90° angle. The two sides meeting at the right angle are the legs (a, b); the side opposite the right angle is the hypotenuse (c) and is always the longest side.
Where:
- a, b — the two legs (meet at the right angle)
- c — the hypotenuse (longest side, opposite the right angle)
- A — area = (1/2) a b
- α, β — the two acute angles; α = atan(a/b), β = atan(b/a), α + β = 90°
- r — inradius = (a + b − c) / 2
- R — circumradius = c / 2 (hypotenuse is the diameter of the circumscribed circle)
Related Calculators
- General Triangle Calculator — find sides, angles, and area for any triangle (SSS, SAS, ASA, etc.)
- Equilateral Triangle Calculator — compute properties for a triangle with three equal sides
- Isosceles Triangle Calculator — compute properties for a triangle with two equal sides
- Geometric Formulas Calculator — explore area and side formulas for many shapes
- Trigonometry Calculator — general SOH-CAH-TOA and inverse trig functions
Related Sites
- Temperature Tool — Temperature unit converter
- Z-Score Calculator — Z-score, percentile, and probability calculator
- OptionsMath — Options trading profit and loss calculators
- Medical Equations — Hemodynamic, pulmonary, and dosing calculators
- Dollars Per Hour — Weekly paycheck calculator with overtime
- Percent Off Calculator — Discount and sale price calculator