Pythagorean Theorem Calculator

Solve any missing side of a right triangle with a² + b² = c²

Fill in any two sides and leave the third empty. Enter all three and the calculator checks whether the triangle is right-angled instead of solving.

Missing side

How to Use

  1. 1Identify the hypotenuse. It is always the side opposite the right angle, and always the longest.
  2. 2Type the two sides you know and clear the third box.
  3. 3Read the answer, the working and the scaled diagram.
  4. 4Fill all three boxes instead to check whether a triangle is right-angled.

The Formulas

  • The theorema² + b² = c²
  • Hypotenusec = √(a² + b²)
  • A lega = √(c² − b²)
  • Areaa · b / 2
  • Angle Aarctan(a / b)

Quick Examples

Tap an example to load it above.

Guide

Everything about the Pythagorean Theorem

The one piece of geometry that turns up in every trade and every exam.

The Pythagorean theorem says that in any right-angled triangle the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². This calculator solves for whichever side you leave blank, shows the working, and draws the triangle to scale.

It only applies to right triangles. The right angle is the whole reason the relationship holds, and c is always the side opposite it, the longest side, called the hypotenuse.

The most common mistake: using the theorem to find a leg but adding instead of subtracting. To find the hypotenuse you add the squares; to find a leg you subtract the known leg's square from the hypotenuse's. If a "leg" comes out longer than the hypotenuse, you have added by mistake.

Pythagorean triples

A few right triangles have three whole-number sides. These triples come up constantly in exam questions because they avoid awkward decimals, and builders use the first one to square a corner.

TripleCheckWhere you meet it
3 : 4 : 59 + 16 = 25Squaring corners on site
5 : 12 : 1325 + 144 = 169Textbook favourite
8 : 15 : 1764 + 225 = 289Exam questions
7 : 24 : 2549 + 576 = 625Exam questions
6 : 8 : 1036 + 64 = 100The 3-4-5 triple doubled

Any multiple of a triple is also a triple, which is why the 3-4-5 rule scales to 6-8-10 or 9-12-15, handy when you need a bigger reference triangle than a tape measure's first few feet. The calculator tells you when your sides form a triple and whether it is primitive or a multiple of a smaller one.

Where you actually use it

  1. 1Squaring a corner

    Measure 3 units along one wall and 4 along the other. If the diagonal between those marks is exactly 5, the corner is a true right angle. This is the oldest practical use of the theorem and still the fastest.

  2. 2Ladder and ramp lengths

    A ladder base 3 m from a wall reaching 4 m up must be 5 m long. Solve for the hypotenuse whenever you know a horizontal run and a vertical rise.

  3. 3Screen and TV sizes

    A screen is measured on the diagonal, which is the hypotenuse of its width and height. A 16:9 screen 32 inches wide and 18 inches tall is a 36.7-inch TV.

  4. 4Distance between two points

    The distance formula is the theorem in disguise: the horizontal and vertical gaps are the two legs, and the straight-line distance is the hypotenuse.

Reading the extra results

Beyond the missing side the calculator gives the area (half the product of the legs, because a right triangle is exactly half of a rectangle), the perimeter, both acute angles from the arctangent of the legs, and the altitude to the hypotenuse, the perpendicular height from the right angle, which is what you need for roof pitches and truss work.

What if the triangle is not right-angled?

Enter all three sides and the calculator checks a² + b² against c² instead of solving. If they do not match it tells you what c would have to be for the angle to be exactly 90°. For triangles that genuinely are not right-angled you need the law of cosines instead, because the Pythagorean theorem is simply its special case where the angle is 90° and the cosine term vanishes. For areas of other shapes, see the volume calculator or the slope calculator for gradients.

FAQ

Frequently Asked Questions

What is the Pythagorean theorem?

In a right-angled triangle, the square of the hypotenuse equals the sum of the squares of the other two sides, so a² + b² = c². The hypotenuse c is the side opposite the right angle and is always the longest side. It works for every right triangle and only for right triangles.

How do I find the hypotenuse?

Square both legs, add them, then take the square root: c = √(a² + b²). For legs of 3 and 4 that is √(9 + 16) = √25 = 5. Enter the two legs above and leave the c box empty to see the full working.

How do I find a leg when I know the hypotenuse?

Subtract rather than add: a = √(c² − b²). With a hypotenuse of 10 and one leg of 6, the other leg is √(100 − 36) = √64 = 8. If your answer comes out larger than the hypotenuse you have added by mistake, because no leg can be longer than the hypotenuse.

What is a Pythagorean triple?

Three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. A triple is called primitive when the three numbers share no common factor; 6-8-10 is not primitive because it is simply 3-4-5 doubled. This calculator tells you which kind you have entered.

Can I use the theorem on a triangle that is not right-angled?

No. The right angle is what makes the relationship true. For any other triangle you need the law of cosines, c² = a² + b² − 2ab·cos(C). The Pythagorean theorem is just that formula when C is 90°, because cos(90°) is zero and the last term disappears.

How do I check whether a corner is square?

Use the 3-4-5 method: measure 3 units along one edge, 4 along the other, and check the diagonal between those two marks. If it measures exactly 5 the corner is a true right angle. Any units work as long as you use the same one throughout, and scaling up to 6-8-10 gives a more accurate check on a large layout.

Why does the calculator draw the triangle?

Because the picture is drawn to the real proportions of your numbers, it catches mistakes a bare answer hides. A triangle that should be nearly square looks nearly square, and one with a typo in it looks obviously wrong, long and flat when you expected it not to be.

Which units does this calculator use?

Any you like, because it is unit-agnostic. Enter centimetres and every result is in centimetres, enter feet and it is in feet. The only rule is that all three sides must use the same unit. Note that the area is in those units squared.