What Is the Pythagorean Theorem?

Quick answer: The Pythagorean theorem says that in a right-angled triangle, a² + b² = c², where c is the hypotenuse — the side opposite the right angle — and a and b are the two legs. With a = 3 and b = 4, c = √25 = 5.

A Pythagorean theorem calculator solves right-angled triangles: give it any two sides and it finds the third. The theorem is one of the oldest results in mathematics still in daily use, and its statement fits in one line — the square on the hypotenuse equals the sum of the squares on the other two sides. That one line is behind the distance formula, GPS positioning, the diagonal sizes of every screen you own, and the builder's trick of checking a corner is square with a tape measure. The two shorter sides are called legs; the longest side, always opposite the 90-degree corner, is the hypotenuse.

This page does more than return the missing side. It shows the substitution step by step, so you can follow and reproduce the arithmetic; it computes the two acute angles with trigonometry, because a solved triangle is more useful than a solved side; and it reports the area and perimeter, the figures most real problems actually ask for next. Choose which side is missing — a leg or the hypotenuse — enter the two you know, and the workbench does the rest, in whichever unit you measured in, so long as all sides share it.

The Formula and Its Rearrangements

Quick answer: Hypotenuse: c = √(a² + b²). Missing leg: a = √(c² − b²) or b = √(c² − a²). Finding the hypotenuse adds the squares; finding a leg subtracts them — and the hypotenuse must always be the longest side.

There are three forms of the theorem, one for each side that might be missing. To find the hypotenuse, square both legs, add, and take the square root: c = √(a² + b²). To find a leg, the algebra rearranges: a = √(c² − b²). The subtraction is the point students most often miss — they add out of habit, producing a leg longer than the hypotenuse, which is geometrically impossible and the fastest self-check in the topic: any leg longer than the hypotenuse signals an error, guaranteed. The calculator picks the right rearrangement from the mode you select, so the habit it teaches is choosing the form deliberately rather than reaching for the familiar one.

Why squares at all? Because the theorem is a statement about areas before it is a statement about lengths: the square built on the hypotenuse has exactly the area of the two squares built on the legs combined. That is the form in which the ancient proofs work — rearranging four copies of the triangle inside a larger square — and it explains the units: lengths enter squared, areas come out in square units, and the square root at the end returns the answer to a length. Keep that picture in mind and the formula stops being a rhyme to memorise and becomes a fact you can re-derive.

Worked Example: a = 3, b = 4, c = 5

Quick answer: a = 3, b = 4: c = √(9 + 16) = √25 = 5. The angles are 90°, 36.87° opposite the side of length 3, and 53.13° opposite the side of length 4. The area is 3 × 4 ÷ 2 = 6, and the perimeter is 12.

Here is the example built into the calculator, done entirely by hand. The legs are 3 and 4. Square them: 3² = 9 and 4² = 16. Add: 9 + 16 = 25. Take the square root: √25 = 5. The hypotenuse is 5 — no rounding, no remainder, which is why 3-4-5 is the most famous triangle in mathematics. Now the angles: the angle opposite the side of length 3 has tangent 3 ÷ 4 = 0.75, and arctan(0.75) ≈ 36.87°. The other acute angle is arctan(4 ÷ 3) ≈ 53.13°. Check: 36.87 + 53.13 + 90 = 180°, the angle sum of every triangle. The area treats the legs as base and height, since they meet at right angles: 3 × 4 ÷ 2 = 6 square units. The perimeter is 3 + 4 + 5 = 12.

Run the same numbers in the leg mode to see the rearrangement work: enter hypotenuse 5 and leg 4, and the calculator returns √(25 − 16) = √9 = 3. The example also demonstrates the converse of the theorem: because 9 + 16 = 25 exactly, any triangle with sides 3, 4 and 5 must contain a right angle — the fact builders exploit when they stretch a 3-4-5 triangle of rope or tape across a foundation corner and adjust until the diagonal reads exactly 5.

Common Pythagorean Triples: Reference Table

Triples are whole-number solutions of the theorem, and they are worth recognising on sight: when a problem's numbers form a triple, the answer is exact and no rounding is hiding anywhere. The table lists the standard primitive triples — those with no common factor — together with their angles and areas, all computed with this page's own method.

Leg aLeg bHypotenuse cAngle opposite aArea
34536.87°6
5121322.62°30
8151728.07°60
7242516.26°84
20212943.60°210
9404112.68°180
12353718.92°210
11606110.39°330

Multiples count too: doubling 3-4-5 gives 6-8-10, tripling gives 9-12-15, and each keeps the same angles with the area scaled by the square of the factor. The 5-12-13 triple is the second most useful in practice — it appears in ladder, ramp and roof problems constantly — and 20-21-29 is the connoisseur's favourite, because the legs are so close in length that the triangle is nearly isosceles while staying exactly whole.

Solving for a Leg: The Subtraction Form

Finding a leg is the version of the theorem that real problems ask for most. A ladder of known length leans on a wall: the ladder is the hypotenuse, its distance from the wall is one leg, and the height it reaches is the other. A television's diagonal and width are known; its height is a leg. In each case the known hypotenuse and one leg give the other by subtraction under the root: leg = √(c² − known²). The calculator's leg modes exist because this rearrangement, simple as it is, is where examination marks go to die — students add instead of subtract, or subtract the wrong way round and meet a negative number under the root.

That negative is information, not a glitch: it means the supposed leg exceeds the hypotenuse, which no right triangle allows. If you enter a hypotenuse of 5 and a leg of 6, the calculator refuses in words, because √(25 − 36) is not a real length. Check which side is truly the hypotenuse — it is always opposite the right angle and always the longest — and check for mixed units, the other classic cause. A diagonal measured in inches against sides in centimetres has produced more impossible triangles than any algebra slip.

Angles, Area and Perimeter

A triangle is not finished when its sides are known. The two acute angles come from the tangent ratio: the angle opposite leg a satisfies tan(angle) = a ÷ b, so the angle is arctan(a ÷ b), and the other acute angle is its complement to 90°. The calculator reports both to two decimal places. Angles are what turn side lengths into directions — a ramp's steepness, a roof's pitch, a bearing — and they are also a free consistency check, since the three angles of any triangle sum to exactly 180°.

The area of a right triangle is the friendliest area formula in geometry: half the product of the legs, because the legs are perpendicular and so serve as base and height simultaneously. The persistent error is using the hypotenuse as one of the factors — the hypotenuse is a side, not a height, and the result overstates the area every time. The perimeter is simply the sum of the three sides. Together, sides, angles, area and perimeter are the complete description of the triangle, and the workbench reports all of them from your two inputs, so the figure you need is present whichever form the question takes.

How to Solve by Hand, Step by Step

Step one: identify the hypotenuse. It is opposite the right angle and is the longest side; label it c before touching a number. Step two: choose the form. Missing the hypotenuse means add the squares; missing a leg means subtract the known leg's square from the hypotenuse's square. Step three: square carefully. Squaring is not doubling: 6² is 36, not 12 — the single most common arithmetic slip in the whole topic. Step four: add or subtract, then take the square root. The root is part of the method, not an optional garnish; an answer of 25 for the 3-4-5 hypotenuse means the last step was skipped. Step five: sanity-check. The hypotenuse must be longer than either leg but shorter than their sum; the angles must total 180°.

A second example with decimals shows nothing changes: legs 2.5 and 6. Squares: 6.25 and 36. Sum: 42.25. Root: 6.5 exactly — a scaled 5-12-13 in disguise. And an example with no exact answer: legs 2 and 3 give c = √13 ≈ 3.6056. Most real triangles are like the last one; the exact triples are the exceptions that make good teaching examples. The calculator keeps full precision internally and rounds only the display, to four decimal places for sides, so √13 reports as 3.6056 rather than a truncated 3.6.

Pythagorean Triples and the 3-4-5 Rule

A Pythagorean triple is three whole numbers satisfying the theorem exactly. The primitive triples — 3-4-5, 5-12-13, 8-15-17, 7-24-25 and the rest of the table above — have no common factor, and every other triple is a multiple of one of them. There are infinitely many, generated by a formula known since Euclid: for any two whole numbers m greater than n, the triple (m² − n², 2mn, m² + n²) works. With m = 2 and n = 1 that gives (3, 4, 5); with m = 3, n = 2 it gives (5, 12, 13). The calculator needs no such machinery — it solves decimals just as happily — but recognising a triple in the wild tells you instantly that an exact answer exists.

The 3-4-5 triple escaped the classroom centuries ago. Egyptian rope-stretchers are said to have laid out right angles with a knotted rope of 12 equal segments folded into 3, 4 and 5; carpenters and bricklayers still square foundations, decks and tile layouts the same way today, measuring 3 units along one edge and 4 along the other and adjusting until the diagonal is exactly 5. It works because of the converse of the theorem: if the squares add up, the angle is right — no protractor required, and accuracy limited only by the tape.

Common Pythagorean Mistakes

Mistake one: adding when finding a leg. c² − b², not c² + b² — and the impossible result, a leg longer than the hypotenuse, is the tell. Mistake two: forgetting the square root. a² + b² is the square of the answer, not the answer; 25 is not the hypotenuse of the 3-4-5 triangle, 5 is. Mistake three: squaring the sum instead of summing the squares. (3 + 4)² = 49 is a different number from 3² + 4² = 25, and only the second is the theorem. Mistake four: applying the theorem to triangles without a right angle. The theorem is exactly as strong as its condition: no right angle, no a² + b² = c². Non-right triangles belong to the law of cosines.

Mistake five: mixed units. A hypotenuse in feet with legs in inches produces confident nonsense; convert everything to one unit first. Mistake six: using the hypotenuse in the area. Area is half the product of the legs, full stop. Mistake seven: rounding mid-calculation. Rounding √13 to 3.6 and then squaring it back gives 12.96, not 13, and chained rounding is how small errors grow teeth. Keep full precision until the final figure — as this calculator does — and round once, at the end.

Where the Theorem Is Used Every Day

Construction and DIY: squaring foundations and formwork with the 3-4-5 rule, checking that a room's diagonals match (equal diagonals mean true corners), cutting rafters from rise and run, and working out ladder reach — a 5-metre ladder footed 1.5 metres from a wall tops out at √(25 − 2.25) ≈ 4.77 metres. Screens and displays: the advertised size of every phone, monitor and television is its diagonal, the hypotenuse of its width and height, which is why a 16:9 screen's dimensions come straight from this theorem. Navigation: the straight-line distance between two points on a map grid is a hypotenuse, and GPS trilateration is the theorem's three-dimensional descendant.

In the rest of mathematics the theorem is the distance formula in disguise — the Slope Calculator uses it for the distance between two points — and it underlies trigonometry, vectors and the geometry of circles. In sport: a football pitch's diagonal, a baseball diamond's throw from home to second base (the diamond is a square, so the throw is its diagonal, side × √2), and a snooker table's long pot are all hypotenuse problems. Whenever a shortest straight distance crosses a corner — across a field, a room, a screen — the theorem is the tool, which is why it has survived three thousand years of curriculum reform untouched.

What This Calculator Cannot Do

This calculator solves right-angled triangles only. If your triangle has no right angle, the theorem does not apply and this page will not pretend otherwise: the law of cosines and the law of sines are the tools for general triangles, and they are not implemented here. It cannot prove a triangle is right-angled from a drawing or a photograph — the converse test needs all three side lengths measured, which the leg modes can check numerically but no page can measure for you. It does not convert units, draw the triangle to scale, or handle the three-dimensional version (the space diagonal of a box needs the theorem applied twice, which you can do with two passes through this page).

It also cannot rescue impossible inputs. A leg longer than the hypotenuse describes no triangle, and the page says so in words rather than returning the square root of a negative number dressed up as a length. Angles are computed for the solved right triangle only — this is not a general trigonometry solver, and inverse problems such as finding a side from an angle and one side belong to a trigonometry tool. For general arithmetic the Scientific Calculator is the companion, and for proportional scaling of triangles and other quantities the Ratio Calculator covers the neighbouring ground.

Sources & References

Every figure in this guide was calculated with this page's own method — square, add or subtract, take the root, and round only for display — so you can reproduce each one exactly above.