Find any side of a right triangle instantly
The Pythagorean theorem is one of the most useful and widely known results in all of mathematics. For any right triangle — a triangle with one angle equal to exactly 90 degrees — the square of the hypotenuse equals the sum of the squares of the other two sides. This calculator lets you find any one of the three sides when you know the other two.
Navigation and dead reckoning
Before satellite positioning existed, navigators relied on dead reckoning — calculating a current position from a known starting point, heading, speed and elapsed time. A ship or aircraft travelling north and east simultaneously covers a diagonal path, and finding the straight-line distance actually covered from the separate north and east components is a direct, practical application of the same theorem used here.
The formula
The classic statement is a² + b² = c², where a and b are the two shorter sides (called legs) and c is the hypotenuse — the side opposite the right angle and always the longest side. To find the hypotenuse: c = √(a² + b²). To find a leg: a = √(c² − b²).
How to use the calculator
Enter any two of the three values — side a, side b, and hypotenuse c — and leave the third blank. The tool detects which value is missing and computes it automatically. For example, enter 3 in side a and 4 in side b, and the calculator instantly returns 5 for the hypotenuse, confirming the famous 3-4-5 right triangle. Or enter 5 in the hypotenuse and 3 in side a, and it returns 4 for side b.
Why it only works for right triangles
The theorem's restriction to right triangles is not a minor technicality — it is the entire reason the relationship is so clean. For any other triangle, the relationship between the three sides involves the cosine of one of the angles, a more general result called the law of cosines, which reduces to the simple Pythagorean formula only in the special case where that angle is exactly 90 degrees and its cosine is therefore zero. This is worth knowing before trying to apply this calculator to a triangle that is not actually a right triangle, since doing so will silently produce a meaningless number rather than a helpful warning.
Practical applications
Construction and carpentry: Ensuring a corner is square (a true right angle) is one of the most common uses of the Pythagorean theorem in physical work. The classic 3-4-5 method — measuring 3 units along one wall, 4 units along the adjacent wall, and checking that the diagonal measures 5 units — has been used by builders for thousands of years. The calculator generalises this to any measurements.
Screen and display sizes: When manufacturers advertise a television or monitor by diagonal screen size, they are giving the hypotenuse of the rectangle formed by the screen's width and height. If you know the diagonal and the aspect ratio, the Pythagorean theorem lets you find the actual width and height.
Distance calculations: On a flat surface, the straight-line distance between two points with coordinates (x₁, y₁) and (x₂, y₂) is √((x₂−x₁)² + (y₂−y₁)²), a direct application of the theorem.
Engineering and surveying: Calculating the length of a diagonal brace, a sloped roof line, or a cable run between two points at different heights all reduce to the same right-triangle relationship, making the theorem one of the most frequently used tools in structural planning.
Screen sizes, worked example
When a manufacturer advertises a "55-inch television," that number is the diagonal — the hypotenuse of the rectangle formed by the screen's width and height — not the width or height alone, which is a common source of confusion for first-time buyers. Combined with the display's aspect ratio, typically 16:9 for modern televisions, the Pythagorean theorem lets you recover the actual width and height: for a 16:9 screen, the width and height are in the same 16:9 proportion, so a 55-inch diagonal works out to roughly 48 inches wide and 27 inches tall, figures worth checking against your available wall or cabinet space before buying rather than assuming the diagonal alone tells the whole story.
Historical context
The theorem is named after Pythagoras of Samos, the ancient Greek mathematician and philosopher who lived around 570–495 BCE, though the relationship was known to Babylonian and Indian mathematicians centuries earlier. Babylonian tablets from around 1800 BCE list Pythagorean triples — sets of three whole numbers satisfying the theorem — long before Pythagoras was born.
Pythagorean triples
Some sets of three whole numbers satisfy a² + b² = c² exactly, with no rounding at all, and these are called Pythagorean triples. The 3-4-5 triangle is the smallest and most famous, but there are infinitely many others: 5-12-13, 8-15-17 and 7-24-25 are all equally valid whole-number right triangles. Multiplying every side of a known triple by the same factor produces another valid triple — 3-4-5 scaled by 2 gives 6-8-10 — which is exactly why the classic 3-4-5 carpentry method still works at any scale, whether you are squaring a small shelf or the corner of an entire building.
Private and instant
All calculations run entirely in your browser, so the missing side appears the instant you enter the other two and no measurements you type are ever sent to a server, logged or shared, and it works offline once the page has loaded.
Pythagorean theorem FAQ
- What is the Pythagorean theorem?
- For a right triangle with legs a and b and hypotenuse c, the theorem states that a² + b² = c². The hypotenuse is always the side opposite the right angle and is always the longest side.
- Can I find a leg if I know the hypotenuse and the other leg?
- Yes. If you know c and a, then b = √(c² − a²). Enter values in c and a and leave b blank.
- What units can I use?
- Any consistent unit: metres, feet, centimetres, inches. The result is in the same unit as the inputs.