Enter any two sides of a right triangle and the theorem hands you the third, together with the area, perimeter, both acute angles, a scaled drawing, and a checker that tests whether any three sides form a right triangle at all.
In any right triangle, the square of the longest side equals the squares of the other two sides added together. That is the whole statement, and everything on this page flows from it:
a2 + b2 = c2
a and b the legs that meet at the right angle · c the hypotenuse opposite it
The classic example makes it concrete. Legs of 3 and 4 give 3² + 4² = 9 + 16 = 25, and since the hypotenuse squared is 25, the hypotenuse is √25 = 5. The 3-4-5 triangle is the most famous of the Pythagorean triples, whole-number sets that satisfy the equation exactly, and rope stretches of 3-4-5 knots were used to mark square corners thousands of years before anyone wrote the theorem down.
The equation rearranges just as happily in the other direction. When the hypotenuse and one leg are known, subtract instead of add:
b = √(c2 - a2)
equivalently a = √(c² - b²), whichever leg is missing
Worked example: a hypotenuse of 5 and a leg of 3 give b = √(25 - 9) = √16 = 4. The subtraction is why the hypotenuse must be the larger number: if c were smaller than a, the quantity under the root would turn negative, and a real triangle cannot have a side shorter than the one it must outstretch.
The theorem also runs in reverse. If three side lengths satisfy a² + b² = c², the triangle containing them must have a right angle between the two shorter sides. That is the converse of the theorem, and it is how carpenters and surveyors check squareness: mark three lengths, pull the tape, and let the arithmetic decide.
The test rejects impostors cleanly. Sides 3, 4 and 6 give 3² + 4² = 25 but 6² = 36, and 25 ≠ 36, so no right angle is present: that triangle is obtuse, because its longest side stretches further than a right angle would allow. Sides shorter than perfect would signal an acute triangle. The checker mode of this calculator runs exactly this test and reports the two squared totals side by side.
The hypotenuse is the side opposite the right angle, and in every right triangle it is the longest side. Two facts follow that are worth keeping in mind when using any calculator like this one. First, the hypotenuse is always greater than either leg but always less than their sum, because a triangle's sides must close: for legs 3 and 4, c sits strictly between 4 and 7. Second, doubling every side doubles the hypotenuse, so a 6-8-10 triangle is just a scaled-up 3-4-5. Every multiple of a triple is a triple, which is why the table in the results shows the scaled versions alongside each primitive one.
The distance formula from coordinate geometry looks like a separate piece of mathematics, but it is this theorem wearing coordinates. The horizontal separation between two points and the vertical separation form the legs of a right triangle; the straight-line distance is its hypotenuse:
d = √[(x2 - x1)2 + (y2 - y1)2]
each squared difference is one leg squared
Points (1, 2) and (4, 6) differ by 3 across and 4 up, so the distance is √(9 + 16) = 5, the same 3-4-5 triangle shifted onto a grid. The same idea powers GPS range estimates, game hit detection and every "as the crow flies" distance you have ever been shown on a map.
Most right triangles are not triples. Legs of 1 and 1 give c = √2 = 1.4142135..., a number whose decimals run forever without repeating. This is not a rounding failure; the theorem genuinely produces irrational lengths, and legend has it their discovery so troubled the Pythagoreans that they tried to keep it secret. In practice, decide the precision your task needs before you round: a carpenter works in sixteenths of an inch, a surveyor in hundredths of a foot, and this calculator displays two decimals by default while computing at full precision internally.
One proof in a sentence: four copies of any right triangle tile a big square of side a + b, leaving a tilted square of side c in the middle; rearranging the same four triangles leaves two squares of sides a and b instead, and since nothing was added or removed, the tilted square's area c² must equal a² + b². Hundreds of other proofs exist, more than for any other theorem in mathematics.
The mathematics is far older than its name. A Babylonian clay tablet known as Plimpton 322, dated around 1800 BC, lists a column of Pythagorean triples including some with four-digit sides, which means Babylonian scribes understood the relationship a millennium before Pythagoras lived. Chinese and Indian texts of similar age contain the same rule, the Chinese one stated as "the gou multiplied by itself, the gu multiplied by itself, added together, open the square and take the hypotenuse".
Pythagoras of Samos, teaching around 500 BC, is credited with the first general proof, and his school's discovery that √2 cannot be written as any fraction broke their number-based worldview and opened the door to irrational numbers. Euclid's Elements devoted an entire book, Book I Proposition 47, to a rigorous geometric proof, and the theorem has since been re-proven hundreds of times, by a young Albert Einstein among many others. It remains the most proven statement in all of mathematics.
In a right triangle, the longest side squared equals the two shorter sides squared and then added: a² + b² = c². Equivalently, the square drawn on the hypotenuse has exactly the same area as the two squares drawn on the legs combined, which is how the Greeks pictured it.
Yes. The equation holds exactly when one angle is 90 degrees. For other triangles the law of cosines generalizes it: c² = a² + b² - 2ab·cos C, and the theorem is the special case where the angle C is 90 degrees so the correction term vanishes.
Because c² equals a² + b², which is strictly more than a² alone or b² alone whenever both legs are positive, so c beats each leg. If you find your computed "hypotenuse" is shorter than a leg, a swapped entry or a typo is the cause, and the calculator will flag the negative value under the square root.
It is a set of three whole numbers that satisfies the theorem exactly, like 3-4-5 or 5-12-13. Multiplying any triple by a whole number gives another triple, so 6-8-10 and 9-12-15 are scaled copies of the first. The results panel generates the small primitive triples live so you can pick one that fits your measurements.
Square the two shorter sides and add them, then square the longest side and compare. Equal totals mean a right triangle. For 3, 4, 6 the sums are 25 and 36, so it is not right. Use the "Check a triangle" mode and the two totals appear side by side with the verdict.
Because most square roots are irrational, meaning their decimals never end or repeat. Only triples produce whole-number hypotenuses; everything else, like the √2 that comes from 1-1 legs, is an exact number that decimal notation can only approximate. The calculator computes at full precision and rounds the display, so downstream calculations stay accurate.
Twice, actually. Apply it once to collapse two coordinates into a flat diagonal, then once more with the third coordinate to get the space diagonal: d² = x² + y² + z². A box of 2 by 3 by 6 has a space diagonal of √49 = 7, which is the theorem applied to the face diagonal and the remaining edge.
No. Every calculation runs in your browser. Nothing is stored or transmitted.