In a right triangle, the square of the hypotenuse equals the sum of the squares of the legs: c² = a² + b². Attributed to Greek mathematician Pythagoras (~570–495 BC).
Enter two sides of a right triangle and calculate the third using a²+b²=c².
The Pythagorean theorem states that in any right triangle the square of the hypotenuse (the side opposite the right angle, and always the longest) equals the sum of the squares of the legs: a² + b² = c². This tool takes exactly two of the three sides and computes the missing one by isolating the unknown: to find the hypotenuse it does c = √(a² + b²); to find a leg it does b = √(c² − a²) or a = √(c² − b²). When computing a leg, the hypotenuse you enter must be larger than the known leg, otherwise no real right triangle exists, and the tool warns you. Every answer shows the equation with the values substituted plus a full step-by-step, from a² + b² = c² down to the final root, great for checking work or studying. Sides can be integers or decimals (period or comma), and the computation uses a 64-bit floating-point square root. Everything runs locally in your browser.
The theorem is a single relation, a² + b² = c², where a and b are the legs (the sides forming the 90° angle) and c is the hypotenuse. Since the equation links three quantities, knowing any two is enough to find the third: just isolate the unknown and take the square root.
If you have both legs, the hypotenuse is c = √(a² + b²). If you have the hypotenuse and one leg, the other leg follows by subtraction: b = √(c² − a²). Note that in this case the hypotenuse must be larger than the known leg, otherwise c² − a² would be negative and there would be no real root, the tool detects this and refuses the computation.
Example 1, find the hypotenuse: legs a = 3 and b = 4. Then c² = 3² + 4² = 9 + 16 = 25, so c = √25 = 5. This is the famous 3-4-5 triangle, the smallest Pythagorean triple.
Example 2, find a leg: hypotenuse c = 13 and leg a = 5. Since we know the hypotenuse and one leg, b² = c² − a² = 13² − 5² = 169 − 25 = 144, so b = √144 = 12. The sides 5, 12 and 13 form another Pythagorean triple.
The theorem only holds for right triangles. For a general triangle, use the law of cosines, c² = a² + b² − 2ab·cos(C); Pythagoras is the special case where C = 90° and the cosine term vanishes. The converse is handy too: if three sides satisfy a² + b² = c² (with c the longest), the triangle is right-angled; if a² + b² > c², it is acute, and if a² + b² < c², it is obtuse.
In practice the theorem is everywhere: builders use the 3-4-5 method to square corners, the distance between two points in the plane is a direct application (d = √((x₂−x₁)² + (y₂−y₁)²)), and it solves screen and lot diagonals, ramp heights and ladders leaning against walls.
Paste the code into your HTML and the tool shows up on your page, without J-Kit's navigation and ads. It still runs in the browser of whoever visits your site.
<iframe
src="https://jkit.tools/embed/en-US/pythagorean-theorem-calculator"
width="100%"
height="600"
style="border:0"
loading="lazy"
title="Pythagorean Theorem Calculator"
></iframe>These references help contextualize formulas, standards, APIs and limitations used on this page. They do not replace professional validation when a result has legal, financial, medical or operational impact.
In a right triangle, the square of the hypotenuse equals the sum of the squares of the legs: c² = a² + b². Attributed to Greek mathematician Pythagoras (~570–495 BC).
Fill in two of the three fields. The third will be calculated automatically.
All calculations stay in your browser. No data is sent to any server.