What Is the Pythagorean Theorem Used For?

Seventeen real-life uses of a2 + b2 = c2, grouped by field. Each one comes with a short calculation you can check yourself and a link to the page that goes deeper.

By the PythagoreanTheorem.net teamUpdated 10 min read

The Pythagorean theorem is used to find a straight-line distance you can't measure directly but can split into two perpendicular parts. Builders use it to square corners and cut rafters, navigators to work out how far a ship has really traveled, programmers to measure distances on a screen, and physicists to combine forces and velocities. Every time, c = √a2 + b2.

The one idea behind every use

Every application on this page follows the same pattern. Somewhere there is a right angle: a wall meeting the floor, east meeting north, the bottom edge of a screen meeting its side. The two measurements along those perpendicular directions are the legs, and the slanted distance joining their ends is the hypotenuse.

400 m 300 m 500 m Gate Café Around the edge: 700 m Straight across: 500 m
Two friends leave the gate at the same walking speed. The one who follows the paths covers 400 + 300 = 700 m; the one who cuts across covers √4002 + 3002 = 500 m and is already at the café when the other turns the last corner.

That picture is the whole theorem in practice: going around a corner always costs more than going straight across, and a2 + b2 = c2 tells you exactly how much. If you need a refresher on the statement itself, start with what the Pythagorean theorem says.

How to spot the right triangle

  1. Find the right angle. Look for perpendicular directions: vertical and horizontal, north and east, width and height, the x-axis and the y-axis.
  2. Name the legs. The two measurements along those directions are a and b. Put them in the same unit before you do anything else.
  3. Decide what is missing. Want the slanted distance? Add the squares: c = √a2 + b2. Know the slanted distance and one leg? Subtract: a = √c2 − b2.
Ladder TV screen Ramp N Ship's course
The same shape hides in a ladder against a wall, a TV screen, a ramp and a ship's course. Blue and orange are the legs you can measure; green is the hypotenuse you calculate.

When the theorem is not enoughIt needs a true 90° angle and flat geometry. If the angle is not a right angle, use the law of cosines. Over hundreds of kilometers of the Earth's surface, flat-map distances drift and navigators switch to spherical formulas (see the theorem on curved surfaces).

Building and home projects

1. Squaring a corner

Builders check that a corner is exactly 90° by marking 6 ft along one wall, 8 ft along the other, and measuring between the marks. If the corner is square, the diagonal is exactly 10 ft, because 6-8-10 is the 3-4-5 triangle doubled.

√62 + 82 = √36 + 64 = √100 = 10 ft

A diagonal longer than 10 ft means the corner is wider than 90°; a shorter one means it is tighter. That test is the converse of the theorem doing real work.

2. Placing a ladder safely

Ladder safety guidance uses the 4-to-1 rule: the foot of the ladder sits about 1 ft from the wall for every 4 ft of ladder between the foot and the top support. For a 20 ft ladder that is 5 ft out. How high does it reach?

h = √202 − 52 = √375 ≈ 19.36 ft

The ladder meets the ground at about 75.5°, the angle the rule is designed to give. The ladder calculator solves every version of this problem.

3. Cutting roof rafters

A 6/12 roof pitch rises 6 in for every 12 in of horizontal run. On a building 24 ft wide, the run to the ridge is 12 ft, so the roof rises 6 ft. The rafter is the hypotenuse:

√122 + 62 = √180 = 6√5 ≈ 13.42 ft

That is the line length before the overhang and ridge-board adjustments a carpenter adds. The rafter length calculator handles those details and converts pitch to degrees.

4. Building a wheelchair ramp

The US accessibility standards (ADA) limit ramp slope to 1:12, one inch of rise for every 12 in of run. Climbing a 24 in step therefore needs 288 in (24 ft) of run, and the ramp surface is

√242 + 2882 = √83,520 ≈ 289.0 in

That is only about 1 in longer than the run. When one leg is much longer than the other, the hypotenuse is barely longer than the long leg, which makes a handy sanity check. More layout methods are on the construction page.

Screens, gadgets and everyday objects

5. TV and monitor sizes

Screens are sold by their diagonal. A 55-inch TV with a 16:9 shape is 16k wide and 9k tall for some number k, so its diagonal is k√162 + 92 = k√337. Setting that equal to 55:

k = 55 over √337 ≈ 2.996  ⇒  width ≈ 47.9 in,  height ≈ 27.0 in

The diagonal also gives pixel density. A 24-inch monitor with 1920 × 1080 pixels has √19202 + 10802 ≈ 2,203 pixels along its diagonal, or about 92 pixels per inch. Try your own screen in the screen size calculator.

6. Will it fit in the suitcase?

A carry-on bag measures 22 × 14 × 9 in. The longest thin object that fits runs corner to corner through the box, along the space diagonal. Use the theorem twice, or its 3D version once:

d = √222 + 142 + 92 = √761 ≈ 27.6 in

So a slim 27-inch tripod fits diagonally, even though it is longer than every edge of the bag. The Pythagorean theorem in 3D explains why the two-step method works.

7. Drone and radio range

A drone hovering 120 m up and 300 m away horizontally is not 300 m from its controller. The radio signal travels the hypotenuse:

d = √3002 + 1202 = √104,400 ≈ 323 m

That is the number to compare with the controller's rated range. The same calculation tells you how far a Wi-Fi router really is from a laptop on the floor above.

Maps, navigation and GPS

8. Straight-line distance on a map

On a 1:50,000 map, two villages are 6 cm apart east–west and 8 cm apart north–south. On paper they are √62 + 82 = 10 cm apart, and each map centimeter stands for 50,000 cm in real life:

10 cm × 50,000 = 500,000 cm = 5 km

That is the distance "as the crow flies". With grid coordinates instead of a ruler, the same calculation is the distance formula.

9. Where did the ship end up?

A ship sails 12 km due east, then 5 km due north. East and north are perpendicular, so its distance from port is

√122 + 52 = √169 = 13 km

in a direction about 22.6° north of east (arctan5 over 12), a compass bearing of about 067°. Navigators call this the displacement. The navigation page adds wind, multi-leg trips and the limits set by the Earth's curvature.

10. How GPS measures distance

A GPS receiver works out its distance to each satellite from how long the signal took to arrive, then finds the single point that fits all of those distances at once. Each distance, written in 3D coordinates, is a Pythagorean distance:

d = √(x − xs)2 + (y − ys)2 + (z − zs)2

A satellite offset by 12,000 km, 9,000 km and 16,000 km along the three axes is √12,0002 + 9,0002 + 16,0002 ≈ 21,932 km away, a trip radio waves make in about 0.073 s. Light covers about 300 m in a millionth of a second, so the receiver also has to solve for its own clock error, which is why it needs at least four satellites.

Computers, games and data

11. Distance checks in video games

A game needs to know whether an enemy at (130, 40) is within 60 pixels of the player at (100, 0). The legs are the differences in the coordinates, 30 and 40:

d = √302 + 402 = √2,500 = 50 px

50 is less than 60, so the enemy is in range. Real games usually skip the square root and compare 2,500 with 602 = 3,600 instead, a trick explained on the programming page.

12. Recommendations and data science

Recommendation systems can treat each person's ratings as a point in space. If you rated three films 5, 1 and 4, and a friend rated them 4, 2 and 4, the distance between you is √12 + 12 + 02 = √2 ≈ 1.41. Someone who rated them 1, 5 and 2 is √42 + 42 + 22 = 6 away, so your friend's favorites are the better suggestions. This Euclidean distance is the theorem in as many dimensions as you have measurements; see the theorem in n dimensions.

Science, engineering and surveying

13. Combining perpendicular velocities and forces

A boat points straight across a river at 4 m/s while the current carries it downstream at 3 m/s. Its actual speed over the riverbed is the resultant of two perpendicular velocities:

v = √42 + 32 = 5 m/s

Forces, displacements and electric fields combine the same way when they act at right angles; the physics page works through each one.

14. Impedance in AC circuits

In an alternating-current circuit, resistance R and reactance X behave like perpendicular components. A circuit with R = 30 Ω and X = 40 Ω has a total opposition to current, the impedance, of

Z = √R2 + X2 = √302 + 402 = 50 Ω

so a 120 V supply drives 120 ÷ 50 = 2.4 A through it, not the 4 A that the resistance alone would suggest.

15. Surveying on a slope

Surveying instruments measure the slope distance along the line of sight, but maps and property plans need the horizontal distance. If the slope distance is 250.00 m and the far point is 12.00 m higher, the horizontal distance is a leg:

√2502 − 122 = √62,356 ≈ 249.71 m

The difference is only 29 cm, but on a property boundary that is far too much to ignore.

Sports, paper and design

16. The throw from home plate to second base

A baseball infield is a square with 90 ft sides, so the catcher's throw to second base runs along its diagonal:

√902 + 902 = 90√2 ≈ 127.3 ft

The official rules list this distance as 127 ft 3⅜ in, which is 90√2 to the nearest eighth of an inch. Soccer, football and swimming examples are on the sports page.

17. Paper sizes and the square root of 2

An A4 sheet is 210 mm × 297 mm. Draw a square on the short side and its diagonal is 210√2 ≈ 297.0 mm, the long side of the sheet to the nearest millimeter. Because the sides are in the ratio 1 : √2, cutting the sheet in half gives A5, which has the same proportions. See the art and architecture page for √2 in design.

Explore each field in depth

Each page below takes one field further, with diagrams and realistic worked examples. If you are wondering who does these calculations for a living, the careers page follows twelve jobs through a typical task. To practice turning situations like these into triangles yourself, try the word problems.

Frequently asked questions

Who uses the Pythagorean theorem in real life?

Carpenters, electricians, architects, surveyors, pilots, ship navigators, game developers, engineers, physicists and data scientists all use it, often through software or a calculator that applies it for them. Many people also use it at home without naming it, for example when choosing a TV or checking whether furniture will fit.

Does GPS really use the Pythagorean theorem?

Yes, but as one ingredient. A receiver models each satellite distance with the 3D distance formula, which comes straight from the theorem, and then solves several of those equations together with an unknown clock error. The solving is done numerically, and the final position is converted to latitude, longitude and height.

Why do builders use 3-4-5 instead of measuring the angle?

A tape measure is far more precise over long distances than a protractor or small square. The 3-4-5 triangle has whole-number sides, so no square roots are needed on site, and it scales up to 6-8-10 or 9-12-15 for larger layouts, which makes small errors easier to spot.

Can I use the theorem if the angle is not exactly 90°?

Only as an approximation. If the angle is close to 90°, the answer is close; the further it is from 90°, the bigger the error. For any angle, the law of cosines gives the exact third side, and it turns back into the Pythagorean theorem when the angle is 90°.

What is a good first real-life example to show a student?

The shortcut across a rectangular field or parking lot works well because students can walk it. A 30 m by 40 m lot has a 50 m diagonal, a saving of 20 m. Measuring a TV or phone screen diagonal with a tape measure and checking it against the width and height is another quick classroom activity.

Keep exploring