Pythagorean Theorem Calculator
Solve the hypotenuse or a missing leg with a² + b² = c²: squares, angles, area, and perimeter included.
Details
Hypotenuse (c)
5
This finds the missing side of a right-angled triangle. Enter any two sides and it returns the third.
It also gives all three sides together and the area of the triangle, and shows each step of the squaring, adding and square-rooting.
What is the Pythagorean theorem?
The Pythagorean theorem is a rule about right-angled triangles: the two short sides, squared and added, always equal the longest side squared.
The longest side is called the hypotenuse. It is always the one opposite the right angle, and always the longest of the three.
So if you know any two sides, you can always work out the third. That is the whole point, and it is why the rule has been used for building work for thousands of years.
c is always the side opposite the right angle. a and b are the two sides that meet at the right angle, and it does not matter which one you call a.
What to enter
- Solve for
- Choose whether you are looking for the hypotenuse (you know both short sides) or a short side (you know one short side and the hypotenuse).
- Leg a / Leg b
- The two sides that meet at the right angle. Order does not matter.
- Hypotenuse c
- The long side opposite the right angle. It must be larger than either short side, or the triangle cannot exist.
What this assumes
The triangle has a genuine right angle. Without one, this rule simply does not apply.
All three sides use the same unit.
How to calculate a missing side of a right triangle
Square, add or subtract, then take the square root. The only thing to get right is which side you are missing.
- a, b
- The two short sides
- c
- The hypotenuse, opposite the right angle
Identify the hypotenuse. Find the right angle, then look straight across from it. That side is c.
Square what you know. Multiply each known side by itself.
Add or subtract. Looking for the long side, add. Looking for a short side, subtract the smaller square from the larger one.
Take the square root. That undoes the squaring and leaves the actual length. You can check any root on the square root calculator.
See a worked example: sides of 3 and 4 — the classic triangle
- Leg a
- 3
- Leg b
- 4
Square both: 3 × 3 = 9, and 4 × 4 = 16.
Add them: 9 + 16 = 25.
Take the square root of 25, which is 5.
So the triangle is 3, 4, 5. Because all three sides are whole numbers, builders use this one constantly to check a corner is square.
The hypotenuse is 5
Frequently asked questions
Find the right angle, then look directly opposite it. That side is the hypotenuse, and it is always the longest of the three.
If your answer comes out with a short side longer than the hypotenuse, you have labelled them the wrong way round.
A quick way to check a corner is truly square without a set square. Measure 3 units along one wall, 4 along the other, and the diagonal between those marks should be exactly 5.
If it is not, the corner is not 90°. Any multiple works too, so 6-8-10 or 30-40-50 is often easier on a real site.
No, only right-angled ones. This is the most common mistake with it.
For a triangle with no right angle you need the law of cosines instead, which the triangle calculator handles.
Sets of three whole numbers that fit the rule exactly, with no decimals. 3-4-5, 5-12-13 and 8-15-17 are the common ones.
They are worth recognising because they turn up constantly in exam questions, and spotting one saves you the arithmetic.
Yes, and it is one of the most useful everyday applications. The diagonal of any rectangle is the hypotenuse of the two triangles inside it.
For a room 3 m by 4 m, the longest straight line across the floor is 5 m. Handy for checking whether furniture will fit through a doorway.
Problems people actually run into
Adding when you should subtract
When you already know the hypotenuse and want a short side, the arithmetic reverses: you subtract rather than add.
The tell is that your answer is larger than the hypotenuse, which is impossible. If that happens, you added instead of subtracting.
Results are estimates for general information only and are not professional financial, medical, or legal advice. Read our full disclaimer.
Last updated: August 29, 2026