How to Solve Right Triangles: Complete Step-by-Step Guide
How to solve a right triangle from any two known values (at least one a side) with the Pythagorean theorem and sin, cos, tan, worked step by step.
Calculate any missing side of a right triangle using a² + b² = c². Enter any two sides to find the third - fast and accurate.
Pythagorean Theorem
a² + b² = c²
Enter any two values to find the third:
Choose what to find and enter values
Solved Formula
-
Side a
-
Side b
-
Hypotenuse (c)
-
Area
-
Perimeter
-
Angle A
-
Angle B
-
The Pythagorean theorem states that in any 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² + b² = c². It is named after the Greek mathematician Pythagoras, who lived around 500 BC.
Given any two sides of a right triangle, the theorem gives you the third. No angles are needed beyond knowing that one of them is 90°. That is why it shows up in construction, navigation and computer graphics: anywhere you need a distance and have a right angle to work from. It holds for every right triangle, at any size.
Square the two sides you know, add or subtract, then take the square root. Which one depends on the side you are missing.
Example 1, find the hypotenuse. The legs are 6 and 8. c = √(6² + 8²) = √(36 + 64) = √100 = 10.
Example 2, find a leg. The hypotenuse is 13 and one leg is 5. b = √(13² − 5²) = √(169 − 25) = √144 = 12.
Example 3, an answer that is not a whole number. The legs are 4 and 7. c = √(16 + 49) = √65 ≈ 8.06. Most right triangles come out like this one. Keep √65 if you need the exact value.
The theorem works with side lengths only. Once you have all three sides, the angles come from inverse trig: A = arctan(a ÷ b), and B = 90° − A. For the 6-8-10 triangle, A = arctan(6 ÷ 8) = 36.87° and B = 53.13°. The right triangle calculator returns the sides and the angles together, and the inverse trig calculator turns any ratio into an angle.
The relationship is older than Pythagoras. Babylonian clay tablets from around 1800 BC list Pythagorean triples (whole-number solutions such as 3-4-5), and early Indian geometry texts state the rule as well. Greek tradition credits Pythagoras or his followers with the first proof. Hundreds of different proofs are known today, including one by U.S. President James Garfield. Many of them are collected in Cut-the-Knot's collection of 122+ proofs of the Pythagorean theorem.
Construction and carpentry: Builders use the 3-4-5 rule to square a corner. Measure 3 feet along one wall and 4 feet along the other. If the diagonal between those two marks is exactly 5 feet, the corner is 90°. The diagonal calculator scales the same check up to a full deck or slab.
Navigation and distance: GPS systems, pilots, and sailors use the Pythagorean theorem to calculate straight-line distances when they have north-south and east-west components. The distance formula in coordinate geometry is the same theorem written with x and y.
Computer graphics and gaming: Calculating distances between points in 2D and 3D space (extended to √(x² + y² + z²)) is used for rendering, collision detection, and physics simulations.
Architecture and engineering: A diagonal brace, a ramp, a roof rafter and a stair stringer are each the hypotenuse of a right triangle, so each length comes from a² + b² = c².
Pythagorean triples are sets of three positive integers that satisfy the equation a² + b² = c². The most famous is 3-4-5, but there are infinitely many. Common triples include 5-12-13, 8-15-17, and 7-24-25. Any multiple of a Pythagorean triple is also a triple, so 6-8-10 (double of 3-4-5) and 9-12-15 (triple of 3-4-5) also work. For a picture of why the theorem works, see Math is Fun's visual proof of the Pythagorean theorem. Builders like triples because every side comes out as a whole number, which is easy to measure with a tape. There is a longer list in the guide to Pythagorean triples.
The Formula:
a² + b² = c²
Where a and b are the legs (sides forming the right angle) and c is the hypotenuse (longest side)
In a right triangle, a and b are the two legs that form the 90° angle and c is the hypotenuse, the side across from it. The equation says the square of the hypotenuse equals the squares of the two legs added together. With legs of 3 and 4: 3² + 4² = 9 + 16 = 25, and √25 = 5, so the hypotenuse is 5.
The Pythagorean theorem calculates the length of any side of a right triangle when you know the other two sides. It's used in construction, navigation, computer graphics, physics, and anywhere distances or right angles are involved.
Yes, the Pythagorean theorem only applies to right triangles (triangles with one 90° angle). For other triangle types, you need different formulas like the Law of Cosines.
Pythagorean triples are sets of three whole numbers that satisfy a² + b² = c². The most common is 3-4-5. Others include 5-12-13, 8-15-17, and 7-24-25. Any multiple of a triple also works (like 6-8-10).
The hypotenuse (c) is always the longest side of a right triangle, opposite the right angle. The other two sides (a and b) are called legs and form the right angle.
This calculator works for 2D right triangles. For 3D distances, use the extended formula: distance = √(x² + y² + z²), which applies the Pythagorean theorem in three dimensions.
Deepen your understanding of triangles and trigonometry with our guides and tutorials:
How to solve a right triangle from any two known values (at least one a side) with the Pythagorean theorem and sin, cos, tan, worked step by step.
Pythagorean triples are right triangles with whole-number sides, like 3-4-5 and 5-12-13. A list of common triples, Euclid's formula, scaling and patterns.
The Pythagorean theorem a² + b² = c² explained: what it says, why it holds only with a right angle, its history from Babylon to Euclid, and three proofs.
3D geometry from right triangles: 3D distance is √(Δx² + Δy² + Δz²) and a box diagonal is √(l² + w² + h²), plus direction angles and vectors.
Right triangle mistakes students make: wrong hypotenuse, missing square root, mislabeled angles, mixed units, early rounding. Each with an example and fix.
Surveying with trigonometry: measure heights and distances you can't reach using right triangles, angle of elevation, tangent and the two-position method.
Formulas and results last reviewed . How we check accuracy · Corrections log · Report an error