The Pythagorean Theorem
a2 + b2 = c2
In every right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. Here you can see why it's true, learn to use it step by step, check your answers with a free calculator, and practise with worked examples and printable worksheets.
What the Pythagorean theorem says
The Pythagorean theorem is a rule about right triangles — triangles with one 90° angle. The two sides that form the right angle are the legs, a and b. The side opposite the right angle is the hypotenuse, c, and it is always the longest side. The theorem says the three lengths are linked by one equation:
a2 + b2 = c2Read it as a statement about area. Build a square on each side of the triangle: the area of the square on the hypotenuse is exactly the area of the other two squares put together. In the 3-4-5 triangle above, 9 + 16 = 25. It works for every right triangle, of any size or shape — and for no other triangle.
In one sentenceIf you know two sides of a right triangle, the Pythagorean theorem gives you the third: c = √a2 + b2 for the hypotenuse, or a = √c2 − b2 for a leg.
New to it? Start with what the Pythagorean theorem is, then the formula and its rearrangements and how to spot the hypotenuse. The full step-by-step course takes you from the basics to the theorem in three dimensions and beyond.
Pythagorean theorem calculator
Type any two sides and leave the third box empty. You get the exact answer, the decimal, the angles and every step of the working.
Need more? The full set of calculators includes a right triangle solver, a right-angle checker for three sides, a distance calculator and a 3D diagonal calculator.
See it for yourself
Drag the blue and orange handles to change the legs. The squares redraw as you go, and the equation underneath always balances. Try 6 and 8 for another whole-number answer, or 1 and 1 to meet √2; untick whole numbers only to explore any shape.
32 + 42 = 9 + 16 = 25, so c = √25 = 5
Whatever shape you make, the blue and orange areas add up to the green one. That is the whole theorem — the rest of this site explains why it must be so and what you can do with it.
How to use it in three steps
- Find the hypotenuse. It is the side across from the right angle — the longest side. Call it c; the other two sides are a and b.
- Choose the right form. Missing the hypotenuse? Add the squares of the legs. Missing a leg? Subtract the square of the known leg from the square of the hypotenuse.
- Square root and check. Take the positive square root, then make sure the hypotenuse is still the longest side.
Example: how long is the ladder?
A ladder reaches 12 feet up a wall, and its foot stands 5 feet from the wall. The wall and the ground meet at a right angle, so the ladder is the hypotenuse.
c2= 52 + 122 = 25 + 144 = 169c= √169 = 13The ladder is 13 feet long.
The step-by-step guide covers every case, including answers that are square roots. Then work through the worked examples, the word problems and the printable worksheets, and watch out for the most common mistakes.
Why it's true: more than 300 proofs
A few measured triangles can't prove a rule about all triangles — a proof can. The Pythagorean theorem has more proofs than any other theorem: Elisha Loomis collected 367 of them in The Pythagorean Proposition. The quickest to understand is the rearrangement proof: four copies of the triangle, arranged two ways inside the same big square, leave either c2 or a2 + b2 uncovered, so the two must be equal.
Others are worth knowing for what they teach: Euclid's windmill proof from around 300 BCE, the elegant similar-triangles proof, Bhāskara's "Behold!", the trapezoid proof of a future US president, and the trigonometric proofs found by two high-school students in 2022–23.
- ProofsProofs of the Pythagorean TheoremProofs of the Pythagorean theorem: an animated proof, how a proof differs from checking examples, all 12 proofs on this site by type, and where to start.
- ProofsThe Rearrangement Proof of the Pythagorean TheoremThe rearrangement proof of the Pythagorean theorem, animated: four triangles in two squares, why the middle is a square, a full write-up and a paper activity.
- ProofsEuclid's Proof of the Pythagorean TheoremEuclid's windmill proof of the Pythagorean theorem, Book I Proposition 47, step by step: congruent triangles, an animated shear and the converse, I.48.
The converse and Pythagorean triples
The theorem also runs backwards. If three lengths satisfy a2 + b2 = c2, the triangle they make must have a right angle — the converse of the Pythagorean theorem. Builders use it to square corners: mark 3 feet along one wall and 4 along the other, and the diagonal between the marks must be exactly 5. If c2 is smaller than a2 + b2, the largest angle is acute; if larger, obtuse.
Whole numbers that fit the equation are called Pythagorean triples. They are worth memorising because they turn up again and again in homework and tests:
| Triple | a2 | b2 | c2 | Multiples |
|---|---|---|---|---|
| 3, 4, 5 | 9 | 16 | 25 | 6-8-10, 9-12-15, 12-16-20 |
| 5, 12, 13 | 25 | 144 | 169 | 10-24-26, 15-36-39 |
| 8, 15, 17 | 64 | 225 | 289 | 16-30-34 |
| 7, 24, 25 | 49 | 576 | 625 | 14-48-50 |
| 20, 21, 29 | 400 | 441 | 841 | 40-42-58 |
There are infinitely many; Euclid's formula generates all of them, and the complete list up to 100 and the triples generator let you look any of them up.
What is the Pythagorean theorem used for?
Any time you need a straight-line distance and can split it into two perpendicular parts, the theorem gives the answer. Carpenters check that foundations are square, firefighters place ladders, navigators work out how far a ship has really travelled, game engines measure the distance between characters every frame, and TV sizes are measured along the diagonal. The real-life uses page works through fifteen of them with numbers.
A theorem older than Pythagoras
The rule is named after Pythagoras of Samos, a Greek thinker of the 6th century BCE, but it was known long before him. A Babylonian clay tablet, Plimpton 322, lists Pythagorean triples about a thousand years earlier; India's Śulba Sūtras state the rule for laying out altars; and Chinese mathematicians knew it as the gougu theorem. Whether Pythagoras himself proved it is unknown — no writings by him survive. The first proof we still have is in Euclid's Elements. Read the whole story in the history of the Pythagorean theorem.
Explore everything
Every page is written to answer one question completely, with diagrams you can watch and numbers you can check.
- LearnA guided course from "what is a hypotenuse?" to n dimensions.
- CalculatorsHypotenuse, missing side, triangle solver, distance and more.
- ProofsAnimated proofs from Euclid to 2023.
- PracticeExamples, word problems, quizzes and worksheets.
- TriplesWhole-number right triangles and how to generate them.
- HistoryBabylon, India, China, Greece and beyond.
- For teachersLesson plan, activities, standards and assessment ideas.
- GlossaryEvery term, defined in plain English.
Frequently asked questions
What is the Pythagorean theorem in simple words?
In a right triangle, if you square the two shorter sides and add them, you get the square of the longest side. For a triangle with sides 3, 4 and 5: 32 + 42 = 9 + 16 = 25 = 52.
What is the formula for the Pythagorean theorem?
a2 + b2 = c2, where a and b are the legs and c is the hypotenuse. Rearranged, c = √a2 + b2 and a = √c2 − b2.
Does the Pythagorean theorem work for all triangles?
No — only for right triangles. For other triangles the law of cosines, c2 = a2 + b2 − 2abcosC, takes its place; when C = 90° the extra term is zero and you get the Pythagorean theorem back.
Who discovered the Pythagorean theorem?
Nobody knows. Babylonian scribes used Pythagorean triples around 1800 BCE, more than a thousand years before Pythagoras, and the rule was also known in ancient India and China. It carries Pythagoras' name because later Greek writers credited him or his followers with the first proof.
How do you find the hypotenuse?
Square each leg, add the squares and take the square root. For legs 9 and 40: √81 + 1600 = √1681 = 41. The hypotenuse calculator shows the working for any numbers.
Why is the Pythagorean theorem important?
It is the basis of how we measure distance. The distance formula, the length of vectors in physics, distances in 3D graphics and the trigonometric identity sin2θ + cos2θ = 1 are all the Pythagorean theorem in disguise.