Pythagorean Theorem Calculator

Enter any two sides of a right triangle to find the missing side, area, and perimeter.

Results

Side A -
Side B -
Side C (Hypotenuse) -
Area -
Perimeter -
Classification -

Formula: a² + b² = c²

About the Pythagorean Theorem Calculator

This free Pythagorean theorem calculator finds the missing side of any right triangle in a single step. Enter any two sides and it solves for the third, then reports the triangle's area, perimeter, and classification. Use it for homework, deck layouts, TV sizing, or any problem built on this two-thousand-year-old relationship.

What is the Pythagorean Theorem?

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides: a² + b² = c². Named after the Greek mathematician Pythagoras, it appears everywhere from construction and navigation to computer graphics.

How to Use

Enter any two side lengths and leave the third blank — the calculator detects which side to solve for and shows the result with the area and perimeter, rounded to four decimal places. Fill in all three sides and it instead checks whether a² + b² = c², classifying the triangle as right, acute, or obtuse.

The Pythagorean Theorem Formula

The theorem is written as a² + b² = c², where:

  • a — one leg of the right triangle (one of the two sides that form the 90° angle)
  • b — the other leg
  • c — the hypotenuse, the longest side, always opposite the right angle

Rearranging the formula lets you solve for whichever side is unknown:

  • Hypotenuse: c = √(a² + b²)
  • Leg a: a = √(c² − b²)
  • Leg b: b = √(c² − a²)

When solving for a leg, the hypotenuse must be longer than the known leg — otherwise no real triangle exists, and the calculator warns you.

Worked Examples

Example 1: Solving for the Hypotenuse

A right triangle has legs of 3 and 4 units. What is the hypotenuse?

Apply c = √(a² + b²): 3² = 9 and 4² = 16, so c = √(9 + 16) = √25 = 5. Enter 3 and 4 above and the calculator confirms Side C = 5.0000, with an area of 6.0000 and a perimeter of 12.0000.

Example 2: Solving for a Leg

A right triangle has a hypotenuse of 13 and one leg of 5. What is the other leg?

Apply b = √(c² − a²): 13² = 169 and 5² = 25, so b = √(169 − 25) = √144 = 12. The calculator shows Side B = 12.0000, with an area of 30.0000 and a perimeter of 30.0000 — the 5-12-13 triple from the table below.

Common Pythagorean Triples

A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c² exactly, with no rounding. Triples are worth memorizing — recognize one and you can skip the square root entirely.

Side aSide bHypotenuse cFamily
345Primitive — the smallest triple
68102 × (3-4-5)
51213Primitive
912153 × (3-4-5)
81517Primitive
72425Primitive
202129Primitive
123537Primitive

A primitive triple has no common factor among its sides. Multiplying every side of a triple by the same number gives another valid triple, which is why 6-8-10 and 9-12-15 are just scaled-up 3-4-5 triangles.

Real-World Applications

The 3-4-5 Rule for Squaring Corners

Carpenters and builders use the theorem in reverse to check that a corner is truly square. Measure 3 feet along one side of the corner and mark it, then measure 4 feet along the other side and mark that. If the diagonal between the two marks is exactly 5 feet, the corner is a perfect 90°. For bigger layouts such as decks and foundations, scale the triple up to 6-8-10 or 9-12-15 feet, since longer measurements make small errors easier to spot.

Finding the Diagonal of a Room

A room measures 12 feet by 16 feet. How long is the diagonal? Treat the rectangle as two right triangles: d = √(12² + 16²) = √(144 + 256) = √400 = 20 feet. Diagonals matter when you are checking whether a room is square, cutting flooring or carpet to length, or running cable across a space.

TV and Screen Dimensions

Screen sizes are advertised by their diagonal, but what fits on your wall depends on the width and height. A 55-inch TV with a 16:9 aspect ratio has a width-to-height-to-diagonal ratio of 16:9:√337. The width is 55 × 16/√337 ≈ 47.9 inches and the height is 55 × 9/√337 ≈ 27.0 inches (47.9367 × 26.9644 before rounding). Check the result: √(47.9367² + 26.9644²) = 55, exactly as advertised.

Does the Theorem Work for Every Triangle?

No — the Pythagorean theorem only works for right triangles, meaning triangles that contain one 90-degree angle. The relationship also runs both ways: if a² + b² = c², the triangle must have a right angle — exactly the test this calculator performs when you enter all three sides. If a² + b² is greater than c² the triangle is acute, and if it is smaller the triangle is obtuse. For triangles with no right angle, use the law of sines or law of cosines instead — our Triangle Calculator applies those rules to solve any triangle.

Frequently Asked Questions

Can this calculator solve for the hypotenuse?

Yes. Enter the two legs (Side A and Side B) and leave Side C blank. The calculator computes the hypotenuse with c = √(a² + b²) — for example, legs of 3 and 4 give a hypotenuse of exactly 5.

Can I solve for a leg if I know the hypotenuse?

Yes. Enter the hypotenuse and one leg, leaving the other leg blank. The calculator uses a = √(c² − b²). For instance, a hypotenuse of 13 with one leg of 5 gives the other leg as √(169 − 25) = √144 = 12.

What if I enter all three sides?

The calculator verifies whether a² + b² = c². If the equation holds, it classifies the triangle as a valid right triangle; if a² + b² is greater than c² the triangle is acute, and if it is smaller the triangle is obtuse.

What is a Pythagorean triple?

A Pythagorean triple is a set of three whole numbers, such as 3-4-5 or 5-12-13, that satisfy a² + b² = c² exactly with no rounding. Multiplying all three numbers by the same factor gives another triple, which is why 6-8-10 and 9-12-15 also work.

Does the Pythagorean theorem work for all triangles?

No. It only applies to right triangles — triangles that contain a 90-degree angle. For other triangles you need the law of sines or the law of cosines, which our Triangle Calculator uses to solve any triangle from known sides and angles.

How does the 3-4-5 rule square a corner?

Measure 3 units along one side of the corner and 4 units along the other. If the diagonal between those two marks is exactly 5 units, the corner is a perfect 90 degrees. Builders scale the rule up to 6-8-10 or 9-12-15 for decks, foundations, and framing.

Is this calculator free?

Yes, BestCalc's Pythagorean theorem calculator is completely free with no ads or registration required.