Right Triangle Sides
Last reviewed: January 2026
Find any side of a right triangle using the Pythagorean theorem a²+b²=c². Enter any two sides to solve. This calculator runs entirely in your browser — your data stays private, and no account is required.
In a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². Given legs a = 3 and b = 4: c² = 9 + 16 = 25, so c = 5. This is the famous 3-4-5 triple — the simplest Pythagorean triple. The theorem extends to 3D: the space diagonal of a rectangular box with dimensions a, b, c is √(a² + b² + c²).
The 3-4-5 rule is used constantly in construction to verify square corners. Measure 3 feet along one wall from a corner, 4 feet along the adjacent wall, and check that the diagonal between those two points is exactly 5 feet. If not, adjust until it is — that corner is then a perfect 90°. This technique works with any multiple: 6-8-10, 9-12-15, 30-40-50. Carpenters use it to square foundations, deck frames, tile layouts, and room additions.
| a | b | c (hypotenuse) | Multiples |
|---|---|---|---|
| 3 | 4 | 5 | 6-8-10, 9-12-15 |
| 5 | 12 | 13 | 10-24-26 |
| 8 | 15 | 17 | 16-30-34 |
| 7 | 24 | 25 | 14-48-50 |
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². This relationship, attributed to the ancient Greek mathematician Pythagoras around 500 BCE (though known to Babylonian mathematicians over a thousand years earlier), is one of the most fundamental results in all of mathematics. It connects geometry to algebra, enables distance calculations in any number of dimensions, and forms the foundation of trigonometry, coordinate geometry, and vector mathematics. The theorem only applies to right triangles — for non-right triangles, the law of cosines provides the generalized relationship. For solving triangle problems directly, see our Right Triangle Calculator.
| Triple (a, b, c) | Verification | Multiples | Common Use |
|---|---|---|---|
| 3, 4, 5 | 9 + 16 = 25 | 6-8-10, 9-12-15, 12-16-20 | Construction right angles |
| 5, 12, 13 | 25 + 144 = 169 | 10-24-26, 15-36-39 | Roof pitch calculations |
| 8, 15, 17 | 64 + 225 = 289 | 16-30-34 | Engineering design |
| 7, 24, 25 | 49 + 576 = 625 | 14-48-50 | Advanced problems |
| 20, 21, 29 | 400 + 441 = 841 | 40-42-58 | Nearly isosceles right triangle |
The 3-4-5 triangle is the most commonly used Pythagorean triple in construction. To verify a right angle when laying a foundation, measure 3 feet along one wall, 4 feet along the adjacent wall, and check that the diagonal between those points is exactly 5 feet. Any multiple works equally well — 6-8-10, 9-12-15, or 30-40-50 for larger structures. This technique requires no specialized equipment beyond a tape measure and ensures square corners for foundations, framing, tile layout, and fencing. Carpenters also use the theorem to calculate rafter lengths: a roof with a 12-foot horizontal run and a 5-foot rise needs rafters of √(12² + 5²) = √(144 + 25) = √169 = 13 feet (a convenient 5-12-13 triple). For construction calculations, see our Beam Deflection Calculator and Concrete Calculator.
Navigation and surveying rely heavily on Pythagorean calculations. GPS positioning uses three-dimensional distance calculations (extensions of the Pythagorean theorem to 3D: d = √(x² + y² + z²)) to triangulate your position from satellite signals. Surveyors calculate distances across obstacles (rivers, ravines, buildings) by measuring accessible legs of right triangles and computing the inaccessible distance. Aviation uses the theorem to calculate ground distance when altitude and slant distance are known — a plane at 30,000 feet altitude with a slant distance of 50 miles to a point on the ground is √(50² − 5.68²) ≈ 49.7 miles of ground distance from that point. Sailors calculate distance traveled when navigating by dead reckoning, treating north-south and east-west displacements as legs of a right triangle.
The distance formula — d = √((x₂-x₁)² + (y₂-y₁)²) — is the Pythagorean theorem applied to coordinate geometry. The horizontal distance (x₂-x₁) and vertical distance (y₂-y₁) form the legs of a right triangle, with the direct distance as the hypotenuse. This formula calculates the straight-line distance between any two points on a plane. The distance between (1, 2) and (4, 6) is √((4-1)² + (6-2)²) = √(9 + 16) = √25 = 5. In three dimensions, the formula extends to d = √((x₂-x₁)² + (y₂-y₁)² + (z₂-z₁)²), and this pattern continues to any number of dimensions — a remarkable mathematical generalization.
The midpoint formula, equation of a circle (x² + y² = r²), and many other coordinate geometry results derive directly from the Pythagorean theorem. The unit circle — the foundation of trigonometry — is defined as x² + y² = 1, which is the Pythagorean theorem with the hypotenuse equal to 1. The coordinates of any point on the unit circle at angle θ are (cos θ, sin θ), and the identity cos²θ + sin²θ = 1 is the Pythagorean theorem restated for trigonometric functions. This connection means the Pythagorean theorem underlies virtually all of trigonometry and, by extension, wave mechanics, signal processing, and quantum physics. Explore related concepts with our Graphing Calculator and Surface Area Calculator.
The Pythagorean theorem has more known proofs than any other theorem in mathematics — over 370 distinct proofs have been published, ranging from simple geometric rearrangements to advanced algebraic methods. The most intuitive proof arranges four identical right triangles inside a large square: the outer square has side length (a + b), the inner tilted square formed by the hypotenuses has side length c. The area of the outer square equals the area of the four triangles plus the inner square: (a + b)² = 4(½ab) + c², which simplifies to a² + 2ab + b² = 2ab + c², and therefore a² + b² = c². President James Garfield published a proof using a trapezoid in 1876, and the theorem can even be proven using fluid dynamics or dimensional analysis. Einstein reportedly proved it at age 12 using similar triangles — the altitude from the right angle to the hypotenuse creates two smaller triangles, each similar to the original, from which the theorem follows directly.
The converse of the Pythagorean theorem is equally useful: if a² + b² = c² for a triangle with sides a, b, and c (where c is the longest side), then the triangle is a right triangle. If a² + b² > c², the triangle is acute (all angles less than 90°). If a² + b² < c², the triangle is obtuse (one angle greater than 90°). This converse test allows you to determine triangle type from side lengths alone without measuring angles — useful in construction, engineering, and geometric proofs. For related mathematical tools, see our Equation Solver, Square Root Calculator, and Angle Converter.
See also: Slope Calculator · Triangle Calculator · Quadratic Equation Solver · Area Calculator
→ c is always the longest side. The hypotenuse (c) is opposite the right angle and must be longer than either leg. If your answer for a leg comes out larger than the hypotenuse, recheck your inputs.
→ Look for Pythagorean triples. Common integer solutions: 3-4-5, 5-12-13, 8-15-17, 7-24-25. Any multiple works too (6-8-10, 9-12-15). Great for quick mental checks.
→ Apply it to real-world squaring. Need to check if a corner is perfectly square? Measure 3 feet along one edge, 4 feet along the other — the diagonal should be exactly 5 feet.
→ Extend to 3D distance. The 3D distance between points is √(Δx² + Δy² + Δz²) — the Pythagorean theorem applied twice. See our Distance Calculator for coordinate-based calculations.
See also: Slope Calculator · Triangle Area · Distance Calculator · Angle Converter