Pythagorean Theorem Calculator
Easily find the length of the hypotenuse of a right-angled triangle given the lengths of the other two sides.
5.0000
Pythagorean Theorem Calculator
Everything you need to know
About the Pythagorean Theorem Calculator
The Pythagorean theorem is one of the most famous and useful principles in all of mathematics. Discovered by the ancient Greek mathematician Pythagoras around 500 BCE, it describes the fundamental relationship between the three sides of a right triangle. Our calculator makes it effortless to find any missing side when you know the other two.
Whether you are a student learning geometry, a carpenter framing a house, a sailor navigating open waters, or a DIYer building a deck, the Pythagorean theorem provides a reliable way to calculate distances and ensure square corners.
The Pythagorean Theorem Explained
The Formula
For any right triangle (a triangle with one 90-degree angle):
a² + b² = c²
Where:
- a and b are the two legs (the sides that form the right angle)
- c is the hypotenuse (the longest side, opposite the right angle)
Finding the Hypotenuse
If you know both legs, rearrange the formula: c = √(a² + b²)
Example: A right triangle has legs of 3 feet and 4 feet. c = √(3² + 4²) = √(9 + 16) = √25 = 5 feet
This 3-4-5 relationship is the most famous right triangle and appears constantly in construction and design.
Finding a Missing Leg
If you know the hypotenuse and one leg, rearrange the formula: a = √(c² - b²)
Example: A ladder leans against a wall. The base is 6 feet from the wall, and the ladder reaches 10 feet up. a = √(10² - 6²) = √(100 - 36) = √64 = 8 feet Wait — actually, if the ladder is 10 feet and the base is 6 feet, the height is: a = √(10² - 6²) = √(100 - 36) = √64 = 8 feet
Visual Proof of the Theorem
One of the most elegant proofs involves arranging four identical right triangles inside a square:
- The large square has sides of length (a + b)
- Its area is (a + b)² = a² + 2ab + b²
- Inside, four triangles each have area (½ × a × b), totaling 2ab
- The inner square has area c²
- Therefore: a² + 2ab + b² = 2ab + c²
- Simplifying: a² + b² = c²
This proof has been reproduced for over 2,000 years and remains one of the most beautiful demonstrations in mathematics.
Special Right Triangles
Certain right triangles appear so frequently that memorizing their ratios saves time:
The 3-4-5 Triangle
| Leg 1 | Leg 2 | Hypotenuse |
|---|---|---|
| 3 | 4 | 5 |
| 6 | 8 | 10 |
| 9 | 12 | 15 |
| 12 | 16 | 20 |
| 15 | 20 | 25 |
Any multiple of 3-4-5 forms a valid right triangle. This is the most common triangle in construction.
The 5-12-13 Triangle
| Leg 1 | Leg 2 | Hypotenuse |
|---|---|---|
| 5 | 12 | 13 |
| 10 | 24 | 26 |
The 8-15-17 Triangle
| Leg 1 | Leg 2 | Hypotenuse |
|---|---|---|
| 8 | 15 | 17 |
The 45-45-90 Triangle (Isosceles Right Triangle)
Both legs are equal, and the hypotenuse is leg × √1.414.
| Leg | Hypotenuse |
|---|---|
| 1 | 1.414 |
| 5 | 7.07 |
| 10 | 14.14 |
The 30-60-90 Triangle
The sides are in a 1 : √3 : 2 ratio.
| Short Leg | Long Leg | Hypotenuse |
|---|---|---|
| 1 | 1.732 | 2 |
| 5 | 8.66 | 10 |
| 10 | 17.32 | 20 |
Real-World Applications
Construction and Carpentry
Squaring a foundation: To ensure a foundation corner is exactly 90 degrees, measure 3 feet along one wall and 4 feet along the adjacent wall. The diagonal between those points should be exactly 5 feet. If not, adjust until it is.
Roof pitch: A roof that rises 6 feet over a 12-foot run has a rafter length of: √(6² + 12²) = √(36 + 144) = √180 = 13.42 feet
Stair stringers: For stairs with a 7-inch rise and 10-inch tread, each stringer section measures: √(7² + 10²) = √(49 + 100) = √149 = 12.21 inches
Navigation and Mapping
Distance between two points: On a map, if Point A is 4 miles east and 3 miles north of Point B, the straight-line distance is: √(4² + 3²) = 5 miles
GPS coordinates: The theorem underlies the distance calculations used by GPS systems to determine your location.
Physics and Engineering
Vector addition: When two forces act at right angles, their combined magnitude is found using the Pythagorean theorem.
Optics: The theorem calculates the path length of light through lenses and prisms.
Computer graphics: 3D rendering engines use the theorem constantly to calculate distances, angles, and lighting.
Everyday Life
TV screen size: A 65-inch TV with a 16:9 aspect ratio has width and height calculable using the theorem. The diagonal is 65 inches, and the ratio of width to height is 16:9.
Ladder safety: OSHA recommends placing a ladder base one foot away from the wall for every four feet of height. The theorem tells you the exact ladder length needed.
Painting a diagonal wall: To cut a diagonal piece of trim or wallpaper, calculate the diagonal length using the wall's width and height.
Using the Calculator Effectively
Finding the Hypotenuse
Enter the two known leg lengths (a and b). The calculator computes c = √(a² + b²).
Finding a Leg
Enter the hypotenuse and one known leg. The calculator computes the missing leg.
Checking if a Triangle Is Right
Enter all three sides. If a² + b² = c², the triangle is a right triangle.
Common Mistakes
Confusing Legs and Hypotenuse
The hypotenuse is always the longest side and is always opposite the right angle. Never use a leg length as the hypotenuse unless it truly is the longest side.
Forgetting to Square the Values
The theorem uses a² and b², not just a and b. Squaring is essential.
Using the Theorem on Non-Right Triangles
The Pythagorean theorem only works for right triangles. For other triangles, use the Law of Cosines: c² = a² + b² - 2ab cos(C).
Rounding Too Early
When working through multi-step problems, carry full precision until the final answer. Rounding intermediate values introduces errors.
Frequently Asked Questions
Who discovered the Pythagorean theorem?
While named after Pythagoras, evidence suggests the theorem was known to Babylonian mathematicians over 1,000 years before Pythagoras. The ancient Egyptians also used 3-4-5 triangles to lay out square corners for construction.
Can the theorem be used in three dimensions?
Yes. The three-dimensional extension is: a² + b² + c² = d², where d is the space diagonal of a rectangular prism.
What if my triangle is not a right triangle?
Use the Law of Cosines: c² = a² + b² - 2ab cos(C). When angle C is 90 degrees, cos(90°) = 0, and the formula reduces to the Pythagorean theorem.
Are there Pythagorean triples larger than 3-4-5?
Yes, infinitely many. A Pythagorean triple is any set of three whole numbers that satisfy a² + b² = c². Examples include 5-12-13, 8-15-17, 7-24-25, and 20-21-29.
How accurate is this calculator?
The calculator uses standard floating-point arithmetic and is accurate to many decimal places. For construction, round to the nearest 1/16 inch or millimeter.
Related Calculators
Browse AllTriangle Calculator
Solve for missing sides and angles of a triangle.
Slope Calculator
Calculate slope, distance, and angle of a line.
Distance Formula Calculator
Calculate 2D and 3D Euclidean distance.
Circle Calculator
Calculate circle area, circumference, radius.