About the Pythagorean Theorem Calculator
The Pythagorean theorem relates the three sides of a right triangle: the squares of the two legs sum to the square of the hypotenuse. It is probably the most widely applied result in mathematics, underlying distance calculations, construction squaring, and coordinate geometry.
The formula
a² + b² = c²a and b are the legs adjoining the right angle, c the hypotenuse opposite it. Rearranging lets you find any side from the other two.
How to use this calculator
- 1Enter your Side A. The field starts at
3, which you can overwrite. - 2Enter your Side B. The field starts at
4, which you can overwrite. - 3Read the result straight away — it recalculates as you type, so there is no button to press. Use Share to copy a link that reopens the page with your exact numbers filled in.
Worked example
| Input | Value |
|---|---|
| Side A | 3 |
| Side B | 4 |
Result
Hypotenuse (c): 5.0000
Area: 6.0000
Perimeter: 12.0000
Angle A: 36.87°
Angle B: 53.13°
a² + b² = c²: 3² + 4² = 25.0 ✓
Those are the values the page loads with, so you can reproduce this result yourself and then change one field at a time to see what drives the outcome.
Understanding your result
The theorem is genuinely about areas. Build a square on each side of a right triangle and the two smaller squares together have exactly the area of the largest. That geometric statement is why the relationship holds only for right triangles — the law of cosines adds a correction term for any other angle.
It also generalises to distance in coordinate space, which is where most modern use comes from. The distance between two points is the hypotenuse of the right triangle formed by their horizontal and vertical separation, and the same idea extends to three dimensions as √(x² + y² + z²) and to the standard deviation formula in statistics.
Things worth knowing
- It applies only to right triangles. For others, use the law of cosines.
- The converse is a useful test: if a² + b² = c², the triangle must be right-angled.
- The 3-4-5 triangle is the builder's standard for checking that a corner is square.
- To find a leg rather than the hypotenuse, subtract: a = √(c² − b²).
- The distance formula in coordinate geometry is the Pythagorean theorem applied to differences in x and y.
Frequently asked questions
What is the Pythagorean theorem?+
In a right triangle, the squares of the two shorter sides sum to the square of the hypotenuse: a² + b² = c². It lets you find any side from the other two.
Does it work for non-right triangles?+
No. For other triangles use the law of cosines, c² = a² + b² − 2ab·cos C, which adds a term that vanishes only when the angle is 90 degrees.
How do I find a leg instead of the hypotenuse?+
Subtract rather than add: a = √(c² − b²). With a hypotenuse of 13 and one leg of 5, the other is √(169 − 25) = 12.
Why do builders use a 3-4-5 triangle?+
Because 3² + 4² = 5² exactly, so measuring 3 units along one wall and 4 along the other should give a diagonal of exactly 5 if the corner is truly square. Any multiple works equally well.