Two boxes filled solves the third. Three boxes filled runs the converse: the page tells you whether the corner is exactly 90°, and if not, whether the triangle is acute or obtuse and by how much the longest side misses.
All 16 primitive Pythagorean triples with a hypotenuse up to 100
Whole number sides with no common factor, each generated by Euclid's formula from the pair m and n shown. Every multiple of a row is also a triple, so 6, 8, 10 and 9, 12, 15 are the first row scaled. Press Draw to load any row into the calculator.
| Sides a, b, c | Euclid m and n | Area | Inradius | Smallest angle | Shape | Load |
|---|---|---|---|---|---|---|
| 3, 4, 5 | 2 and 1 | 6 | 1 | 36.87° | Middle | |
| 5, 12, 13 | 3 and 2 | 30 | 2 | 22.62° | Middle | |
| 8, 15, 17 | 4 and 1 | 60 | 3 | 28.07° | Middle | |
| 7, 24, 25 | 4 and 3 | 84 | 3 | 16.26° | Slender | |
| 20, 21, 29 | 5 and 2 | 210 | 6 | 43.60° | Close to 45° | |
| 12, 35, 37 | 6 and 1 | 210 | 5 | 18.92° | Slender | |
| 9, 40, 41 | 5 and 4 | 180 | 4 | 12.68° | Slender | |
| 28, 45, 53 | 7 and 2 | 630 | 10 | 31.89° | Middle | |
| 11, 60, 61 | 6 and 5 | 330 | 5 | 10.39° | Slender | |
| 16, 63, 65 | 8 and 1 | 504 | 7 | 14.25° | Slender | |
| 33, 56, 65 | 7 and 4 | 924 | 12 | 30.51° | Middle | |
| 48, 55, 73 | 8 and 3 | 1,320 | 15 | 41.11° | Close to 45° | |
| 13, 84, 85 | 7 and 6 | 546 | 6 | 8.80° | Slender | |
| 36, 77, 85 | 9 and 2 | 1,386 | 14 | 25.06° | Middle | |
| 39, 80, 89 | 8 and 5 | 1,560 | 15 | 25.99° | Middle | |
| 65, 72, 97 | 9 and 4 | 2,340 | 20 | 42.08° | Close to 45° |
Three patterns hold in every row. One leg is divisible by 3 and one leg by 4, and one of the three sides is divisible by 5, so the product of the three sides is always a multiple of 60. The hypotenuse is always odd. The area is always a whole number divisible by 6 and the inradius is always a whole number, equal to n times the difference of m and n. The shape badge groups the rows by their smallest angle: close to 45° when it is 40° or more, middle from 20° to 40°, and slender below 20°. That is the column to read when you want a triple that matches the proportions of a real layout rather than the smallest numbers.
The right triangle formulas behind every answer
Legs a and b meet at the right angle, c is the hypotenuse opposite it, angle A faces side a and angle B faces side b.
- The theorema² + b² = c²
- Hypotenuse from two legsc = √(a² + b²)
- A leg from the hypotenusea = √(c² − b²)
- The converse test, c the longest sidea² + b² = c² right, > acute, < obtuse
- Law of cosines, any trianglec² = a² + b² − 2ab cos C
- AreaA = ab ÷ 2
- AnglesA = arctan(a ÷ b), B = 90° − A
- Height to the hypotenuseh = ab ÷ c
- Inradius and circumradiusr = (a + b − c) ÷ 2, R = c ÷ 2
- Euclid's formula for triplesm² − n², 2mn, m² + n²
The law of cosines is the theorem with a correction term. When C is 90°, cos C is zero, the term 2ab cos C vanishes and a² + b² = c² is all that remains. When C is smaller than 90° the correction is subtracted and c² comes out less than a² + b², which is exactly why the converse test reads a larger sum as acute and a smaller one as obtuse.
The right triangle, forwards and backwards
Solving for a missing side, testing a corner with the converse, and the triples, ladders and foundations where the theorem does real work.
A Pythagorean theorem calculator earns its keep in two directions. Forwards, it takes any two sides of a right triangle and returns the third through a² + b² = c². Backwards, it takes three measured sides and tells you whether the corner between the two shorter ones really is 90 degrees. Most tools stop at the first job. This one does both, draws the triangle to scale with the square on each side, and when the answer to the second question is no, says how far off you are and in which direction.
Two sides in, the third side out
The two legs, a and b, meet at the right angle. The hypotenuse, c, sits opposite it and is always the longest side. With both legs known, square them, add, and take the square root: legs of 7 and 9 give 49 + 81 = 130, and √130 is 11.40 to two places. With the hypotenuse and one leg known, the sum turns into a subtraction: a hypotenuse of 10 and a leg of 6 give 100 - 36 = 64, so the missing leg is 8. That subtraction is why the calculator refuses a hypotenuse shorter than or equal to the leg you typed. The difference would be zero or negative, and no real length squares to a negative number, which is the arithmetic way of saying the hypotenuse must be the longest side.
Where the squared answer is a whole number but not a perfect square, the page also prints the exact radical. Legs of 3 and 6 give c² = 45, and √45 simplifies to 3√5 because 45 is 9 times 5. A decimal such as 6.7082 is rounded; 3√5 is not, which matters when the answer feeds a later step of a homework problem or a proof. Two equal legs of 1 give the diagonal of a unit square, √2, about 1.4142.
Three sides in: the converse, graded rather than yes or no
The converse of the Pythagorean theorem says that if the two shorter sides squared add up to the longest side squared, the angle opposite the longest side is a right angle. Euclid proved the theorem as Proposition 47 of Book I of the Elements and the converse as Proposition 48, around 300 BC. It is the converse, not the theorem, that a builder uses, because on site the angle is the unknown and the lengths are what the tape measures.
The same comparison also sorts every other triangle. If the two shorter sides squared add to more than the longest squared, every angle is under 90 degrees and the triangle is acute. If they add to less, the largest angle is over 90 degrees and the triangle is obtuse. Sides of 8, 15 and 17 pass, since 64 + 225 = 289 = 17². Sides of 8, 15 and 16 fail, because 289 is more than 256, so the triangle is acute. Enter 3, 4 and 6 and the page reports an obtuse triangle whose largest angle is 117.28 degrees and whose longest side is a full unit, or 20 percent, longer than the 5 a right angle needs. Enter 3, 4 and 4.9 and it reports an acute triangle, largest angle 87.64 degrees, 2 percent short. If three lengths cannot close at all, because the two shorter ones add up to no more than the longest, it says so instead of drawing something impossible.
Squaring a foundation with 3 4 5
The 3 4 5 rule is the converse in work boots. From the corner, measure 3 units along one string line and 4 along the other, mark both, and adjust until the diagonal between the marks reads exactly 5. Any multiple works, and larger multiples are better: ConBros lists 6-8-10 for small decks and patios, 9-12-15 for garages and room additions, 12-16-20 for house foundations and 15-20-25 for large foundations, with the diagonals agreeing to within 1/8 inch for most residential work. The reason bigger is better shows up in the converse. A 1/8 inch miss on a 3-4-5 laid out in feet (36, 48 and 60.125 inches) is a corner of 90.25 degrees. The same 1/8 inch on 12-16-20 (144, 192 and 240.125 inches) is 90.06 degrees, four times closer to square for the same tape error.
For the whole rectangle rather than one corner, the diagonal is the check. A 24 by 36 foot foundation has a diagonal of √(576 + 1,296) = √1,872, about 43.27 feet or roughly 43 feet 3 3/16 inches, and when both diagonals measure the same the rectangle is square. Type the length and width as the two legs above to get that figure for any footprint, then switch the unit to feet.
Ladder reach and the 4 to 1 rule
A ladder leaning on a wall is a right triangle with the ladder as the hypotenuse. The United States construction standard, OSHA 29 CFR 1926.1053(b)(5)(i), asks for the foot of a non-self-supporting ladder to sit about one quarter of the working length out from the top support, which works out at roughly 75.5 degrees. The theorem supplies the reach. A ladder with 20 feet of working length stands 5 feet out, and the top support is √(400 - 25) = √375, about 19.36 feet up, not the full 20. The loss is always the same fraction, because the reach is the working length times √15 ÷ 4, or about 96.8 percent of it. The same standard wants the side rails to extend at least 3 feet above an upper landing, so a ladder chosen for access needs that allowance on top of the height it has to reach. The classic textbook version runs the other way: a 13 metre ladder with its foot 5 metres out reaches 12 metres, the 5, 12, 13 triple.
Everything else one right triangle gives you
Once all three sides are known, the rest follows. The area of a right triangle is half the product of the legs, because the legs are a base and its perpendicular height. The two acute angles come from arctan(a ÷ b) and its complement, so 3, 4, 5 has angles of 36.87 and 53.13 degrees. The height dropped from the right angle to the hypotenuse is ab ÷ c, 2.4 for the 3, 4, 5 triangle, and it splits the hypotenuse into pieces of a² ÷ c and b² ÷ c, which are 1.8 and 3.2. The inradius is (a + b - c) ÷ 2 and the circumradius is exactly half the hypotenuse, because the hypotenuse is a diameter of the circle through all three corners. The readout beside the diagram lists each of these, and the working panel shows the squares being added or subtracted line by line.
Pythagorean triples, and why the table has sixteen rows
A Pythagorean triple is three whole numbers that satisfy a² + b² = c². A primitive triple has no common factor, so 3, 4, 5 is primitive and 9, 12, 15 is the same triangle scaled by 3. Euclid's formula produces every primitive triple: pick whole numbers m greater than n, coprime and not both odd, and the sides are m² - n², 2mn and m² + n². There are exactly 16 primitive triples with a hypotenuse of 100 or less, and the reference table above lists all of them with their m and n. Every one shows the same fingerprints: one leg divisible by 3, one leg divisible by 4, one side divisible by 5, so the product of the three sides is always a multiple of 60. The hypotenuse is always odd, the area is a whole number divisible by 6 and the inradius is a whole number. The shape column is there because a layout seldom wants the smallest triple; it wants one whose proportions match the job, and 20, 21, 29 or 65, 72, 97 are the ones to reach for when the corner sits near 45 degrees.
Much older than Pythagoras
The name is a credit, not a history. A Babylonian clay tablet known as Plimpton 322, written around 1800 BC and now held at Columbia University, carries 15 rows that read as the sides of right triangles, including the triple 12709, 13500, 18541. The Baudhayana Shulba Sutra, dated between the 8th and 5th centuries BC, states the rule in India, and in China it is the Gougu theorem. Euclid gave the oldest surviving axiomatic proof. Proofs have multiplied since: Elisha Loomis collected 370 of them in The Pythagorean Proposition, and James Garfield published one in the New-England Journal of Education in 1876, while he was a congressman from Ohio, by working out the area of a trapezoid built from three right triangles in two different ways.
Where this page stops
The theorem holds only when one angle is exactly 90 degrees. For any other triangle the general rule is the law of cosines, c² = a² + b² - 2ab cos C, which collapses back to a² + b² = c² when C is 90 degrees because cos 90° is zero. The straight line distance between two points on a grid is the same theorem applied to coordinates, and it has its own tool in the distance calculator. Rise over run, grade and pitch belong to the slope calculator, and the area of shapes other than a right triangle is covered by the area calculator.
Frequently Asked Questions
When I enter three sides, does it matter which one goes in the hypotenuse box?
No. For the converse test the calculator sorts the three lengths first and compares the longest one squared against the other two squared, so 5, 4, 3 and 3, 4, 5 get the same verdict. What the boxes do change is the labelling on the drawing: the angle marked at each corner is the one opposite the side of the same letter, so if the longest length is typed into box a, the right angle appears opposite a rather than between a and b.
My corner measures 3, 4 and 5.02. Is that close enough to square?
Probably, but the theorem cannot say so on its own, because it is exact and tape measures are not. Entered as three sides, 3, 4 and 5.02 comes out as an obtuse triangle with a largest angle of 90.48 degrees, the diagonal 0.02 or 0.4 percent longer than a true right angle needs. Whether that passes is a trade tolerance, not a mathematical one. ConBros gives 1/8 inch on matching diagonals as the usual residential standard. The better fix is to measure a bigger triangle, such as 12, 16, 20, where the same tape error moves the angle far less.
Why do builders lay out 6, 8, 10 or 12, 16, 20 instead of 3, 4, 5?
Because the same small measuring error matters less over a longer diagonal. A 1/8 inch miss on a 3, 4, 5 laid out in feet leaves the corner at 90.25 degrees, while the same 1/8 inch on 12, 16, 20 leaves it at 90.06 degrees. Every multiple of 3, 4, 5 is still a right triangle, so the only cost of going bigger is a longer tape. ConBros suggests 6, 8, 10 for decks and patios, 9, 12, 15 for garages and room additions, 12, 16, 20 for house foundations and 15, 20, 25 for large ones.
How far from the wall should the foot of a ladder go, and how high will it reach?
The OSHA construction rule for non-self-supporting ladders puts the foot about one quarter of the working length out from the top support, an angle of roughly 75.5 degrees. Treat the working length as the hypotenuse and the distance out as one leg, and the theorem gives the height: a 20 foot working length sits 5 feet out and reaches about 19.36 feet. Enter 20 as c and 5 as a to see it drawn. If the ladder is for climbing onto a roof or platform, the rails also need to extend at least 3 feet above that landing.
How can I tell from three side lengths whether a triangle is acute or obtuse?
Square all three and compare the longest one against the sum of the other two. Equal means a right triangle. A larger sum means every angle is under 90 degrees, an acute triangle. A smaller sum means one angle is over 90 degrees, an obtuse triangle. Sides of 8, 15 and 16 give 289 against 256, so they are acute; 3, 4 and 6 give 25 against 36, so they are obtuse with a largest angle of 117.28 degrees. The calculator runs this test whenever all three boxes are filled.
Why does the answer sometimes come with an exact value like 3√5?
When the sides you enter are whole numbers, the squared answer is a whole number too, and if it is not a perfect square the root can be simplified rather than rounded. Legs of 3 and 6 give c² = 45, which is 9 times 5, so c = 3√5 exactly, about 6.7082. The exact form is what a textbook or exam usually wants, and it avoids carrying rounding error into the next step. When the square is perfect, as with 3 and 4, there is nothing to simplify and only the whole number is shown.
How do I make my own Pythagorean triples?
Use Euclid's formula. Choose two whole numbers m and n with m larger than n; the sides m² - n², 2mn and m² + n² always form a right triangle. With m = 2 and n = 1 you get 3, 4, 5; with m = 3 and n = 2 you get 5, 12, 13. If m and n share no common factor and are not both odd, the triple is primitive, and multiplying any triple by a whole number gives another. The table on this page lists all 16 primitive triples with a hypotenuse up to 100 and the m and n behind each.
Did Pythagoras really discover the theorem?
Almost certainly not first. The Babylonian tablet Plimpton 322, from around 1800 BC, lists 15 rows that read as the sides of right triangles, more than a thousand years before Pythagoras. The rule also appears in India's Baudhayana Shulba Sutra and in China, where it is called the Gougu theorem. His school is credited with an early proof, but the oldest proof that survives is Euclid's, Proposition 47 of Book I of the Elements, around 300 BC.
What is the height from the right angle to the hypotenuse, and what is it good for?
It is the perpendicular dropped from the right angle onto the hypotenuse, and its length is the product of the legs divided by the hypotenuse, ab ÷ c. For the 3, 4, 5 triangle that is 2.4. It cuts the hypotenuse into two pieces of a² ÷ c and b² ÷ c, here 1.8 and 3.2, and it splits the original triangle into two smaller ones with the same angles as the whole. It is also the height to use if you want the area with the hypotenuse as the base, since half of 5 times 2.4 is the same 6 as half of 3 times 4.