# Pythagorean Theorem Calculator

> Free pythagorean theorem calculator. Find the hypotenuse or missing leg of a right triangle using a squared plus b squared. Step-by-step solutions, area.

**URL:** https://calculators.im/pythagorean-theorem-calculator  
**Category:** math  
**Last updated:** 2026-07-03  

Solve the Pythagorean theorem (a² + b² = c²) instantly. Find the hypotenuse, missing leg, or compute the 2D distance between two points with step-by-step working, area, perimeter, and angles.

The Pythagorean theorem is the cornerstone of right-triangle geometry: for any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs (a² + b² = c²). This calculator solves for any missing side — hypotenuse or either leg — and also doubles as a 2D distance calculator using the same identity. It shows full step-by-step algebra, computes triangle area (½ab), perimeter, the acute angles via arctangent, and flags exact Pythagorean triples like 3-4-5, 5-12-13, 8-15-17, 7-24-25, and 9-40-41. Useful for homework, carpentry and framing, squaring a foundation, navigation, physics vector magnitudes, screen-diagonal sizing, and any engineering task that reduces to a right triangle.

## Formula

```
a² + b² = c²
```

**Variables:**

- **a, b** — The two legs (shorter sides) of the right triangle
- **c** — The hypotenuse — the side opposite the right angle

Rearrange to solve for the unknown: c = √(a² + b²), a = √(c² − b²), or b = √(c² − a²). When solving for a leg, the hypotenuse must be larger than the known leg.

## Worked Example

### Example: Classic 3-4-5 Right Triangle

With legs a=3 and b=4: c = √(3² + 4²) = √(9 + 16) = √25 = 5. Area = ½ × 3 × 4 = 6. Perimeter = 3 + 4 + 5 = 12. This is the most famous Pythagorean triple.

## Pro Tips

- The hypotenuse is always the longest side — it's opposite the 90° angle.
- Common Pythagorean triples: 3-4-5, 5-12-13, 8-15-17, 7-24-25, 9-40-41, 20-21-29.
- Any multiple of a triple is also a triple (e.g., 6-8-10, 9-12-15).
- To verify a right angle on-site, measure 3 ft, 4 ft, and 5 ft — if the diagonal is exactly 5, the corner is square.
- The theorem extends to 3D: d = √(x² + y² + z²) for diagonals of a box.
- Distance between two points (x₁,y₁) and (x₂,y₂): d = √((x₂−x₁)² + (y₂−y₁)²).

## Frequently Asked Questions

### What is the Pythagorean theorem?

For any right triangle, a² + b² = c², where a and b are the legs (the two sides forming the right angle) and c is the hypotenuse (the longest side, opposite the right angle).

### How do I find the hypotenuse of a right triangle?

Square both legs, add them, then take the square root: c = √(a² + b²). For example, with legs 6 and 8: c = √(36 + 64) = √100 = 10.

### How do I find a missing leg?

Rearrange the theorem: a = √(c² − b²). The hypotenuse c must be greater than the known leg b — otherwise no real triangle exists.

### What is a Pythagorean triple?

Three positive integers (a, b, c) that satisfy a² + b² = c². The smallest is 3-4-5. Others include 5-12-13, 8-15-17, 7-24-25. Any integer multiple of a triple is also a triple.

### Can the Pythagorean theorem be used for distance?

Yes. The 2D distance formula d = √((x₂−x₁)² + (y₂−y₁)²) is a direct application: the horizontal and vertical differences form the two legs of a right triangle whose hypotenuse is the straight-line distance.

### How do I verify a triangle is a right triangle?

Check whether the square of the longest side equals the sum of squares of the other two. If a² + b² = c² exactly, it's a right triangle; if a² + b² > c², it's acute; if a² + b² < c², it's obtuse.

### Does the theorem work in 3D?

Yes — the space diagonal of a rectangular box with edges x, y, z is d = √(x² + y² + z²), obtained by applying the theorem twice.

### What is the formula to find the hypotenuse?

c = √(a² + b²). Square both legs, add them, then take the square root. For legs of 6 and 8, c = √(36 + 64) = √100 = 10. The hypotenuse is always the longest side of a right triangle.

### How do I find the diagonal of a rectangle?

A rectangle's diagonal is the hypotenuse of the right triangle formed by its length and width: d = √(length² + width²). A 16 × 9 rectangle has a diagonal of √(256 + 81) = √337 ≈ 18.36 units. This is also how screen sizes are measured.

### How is a TV screen size measured?

Screen size is the diagonal length, calculated from the width and height with the Pythagorean theorem: diagonal = √(width² + height²). A panel 47.6 in wide and 26.8 in tall measures √(47.6² + 26.8²) ≈ 54.6 in, marketed as a 55-inch TV.

### How do builders use the 3-4-5 rule to square a corner?

Measure 3 units along one edge and 4 units along the perpendicular edge. If the diagonal between those two marks is exactly 5 units, the corner is a perfect 90° angle. Scaling to 6-8-10 or 9-12-15 improves accuracy over longer walls.

### What is the distance formula and how is it related?

The 2D distance formula d = √((x₂−x₁)² + (y₂−y₁)²) is the Pythagorean theorem applied to coordinates. The horizontal and vertical differences are the legs; the distance is the hypotenuse. From (1,2) to (4,6): d = √(9 + 16) = 5.

### Why must the hypotenuse be larger than each leg?

Because c² = a² + b², the hypotenuse squared is the sum of two positive squares, so c is always greater than either leg individually. When solving for a leg with a = √(c² − b²), the hypotenuse c must exceed the known leg b, or the value under the root is negative and no real triangle exists.

## Deep Dive

Solve any right triangle in seconds. Enter two sides, pick the unknown, and get the missing side along with area, perimeter, angles, and a full step-by-step solution. Also handles 2D distance between two points.

### When to use the Pythagorean theorem

**Anytime you have a right triangle** and know two of the three sides.

Common real-world uses include:

- squaring building foundations
- finding the diagonal of a TV or monitor
- computing straight-line travel distance on a map
- deriving vector magnitudes in physics

### Pythagorean triples

**Integer solutions to a² + b² = c².**

The primitive triples include:

- 3-4-5
- 5-12-13
- 8-15-17
- 7-24-25
- 20-21-29
- 9-40-41

Any scalar multiple is also a valid triple, which is why 6-8-10 and 9-12-15 work too.

### How to Find the Hypotenuse of a Right Triangle

The **hypotenuse** is the longest side of a right triangle, opposite the 90° angle, and you find it with **c = √(a² + b²)**. Square each leg, add the two squares, then take the square root.

For legs of 6 and 8: c = √(6² + 8²) = √(36 + 64) = √100 = 10. For legs of 5 and 12: c = √(25 + 144) = √169 = 13. The result is always larger than either leg but smaller than their sum.

Set the calculator mode to 'Hypotenuse c (given legs a and b)', enter both legs in the same unit, and it returns c plus the triangle's area, perimeter, and acute angles.

This is the most common use of the theorem — squaring a corner, sizing a diagonal brace, or finding a ramp's slope length from its rise and run.

### How to Find a Missing Leg With the Pythagorean Theorem

When you know the hypotenuse and one leg, rearrange the theorem to solve for the **missing leg: a = √(c² − b²)**. Subtract the known leg's square from the hypotenuse's square, then take the square root.

For a hypotenuse of 13 and a leg of 5: a = √(13² − 5²) = √(169 − 25) = √144 = 12. The hypotenuse must always be larger than the known leg — if c ≤ b, no real right triangle exists and the calculator will flag it.

Choose the 'Leg a' or 'Leg b' mode, enter the hypotenuse and the known leg, and the tool returns the missing side with the full c² − b² working shown step by step.

This is how you find a ladder's safe base distance from its length and the wall height it reaches.

### Distance Between Two Points Calculator

The **2D distance formula d = √((x₂ − x₁)² + (y₂ − y₁)²)** is the Pythagorean theorem in disguise: the horizontal gap (x₂ − x₁) and vertical gap (y₂ − y₁) are the two legs of a right triangle, and the straight-line distance is the hypotenuse.

From (1, 2) to (4, 6): d = √((4−1)² + (6−2)²) = √(9 + 16) = √25 = 5. Switch the calculator to 'Distance between two 2D points', enter the four coordinates, and it returns the exact distance.

This underpins:

- map navigation
- computing how far apart two GPS-style coordinates are on a plane
- finding vector magnitudes in physics
- measuring pixel distances in graphics and game development

### Right Triangle Area and Perimeter

Once all three sides are known, a right triangle's **area and perimeter** follow immediately. Because the two legs meet at 90°, they act as base and height, so the area is simply **½ × a × b** — no trigonometry needed.

A 3-4-5 triangle has area ½ × 3 × 4 = 6 square units and perimeter 3 + 4 + 5 = 12. A 6-8-10 triangle has area ½ × 6 × 8 = 24 and perimeter 24.

This calculator reports area, perimeter, and both acute angles (found with arctangent, e.g. angle A = arctan(a/b)) alongside the missing side, giving a complete solution of the triangle from just two inputs. For a triangle that has no right angle, our triangle calculator solves the same area, perimeter, and angles using the law of sines and cosines.

### Real-World Uses: Diagonals, TV Screens, and Squaring Corners

The theorem turns two everyday measurements into a diagonal.

**A TV or monitor's screen size** is its diagonal: a screen 1.21 m wide and 0.68 m tall measures √(1.21² + 0.68²) ≈ 1.39 m, about a 55-inch TV.

A **rectangle's diagonal** is the hypotenuse of the triangle formed by its length and width, so a 16:9 frame's corner-to-corner length is √(16² + 9²) ≈ 18.36 units.

Carpenters **square a foundation or deck** with the 3-4-5 method: measure 3 ft along one edge, 4 ft along the perpendicular edge, and if the diagonal between those marks is exactly 5 ft, the corner is a true right angle. Scaling up to 6-8-10 or 9-12-15 gives more accuracy over longer walls.

### The Converse and the 3D Diagonal

The **converse of the Pythagorean theorem** lets you test whether a triangle has a right angle:

- if a² + b² = c² exactly, the triangle is right-angled
- if a² + b² > c², it is acute
- if a² + b² < c², it is obtuse

This is how you confirm a corner is square from three measured lengths alone.

The theorem also extends into three dimensions: the **space diagonal** of a rectangular box with edges x, y, and z is d = √(x² + y² + z²), derived by applying the theorem twice — first across the base, then up to the opposite corner.

A 3 × 4 × 12 box has a space diagonal of √(9 + 16 + 144) = √169 = 13 units, useful for checking whether a long item fits diagonally inside a carton.

### How to Solve the Pythagorean Theorem Step by Step

- **Step 1:** Identify which side is missing — the hypotenuse (the longest side, opposite the right angle) or one of the two legs.
- **Step 2:** Choose the right form of the equation: c = √(a² + b²) for the hypotenuse, or a = √(c² − b²) for a leg.
- **Step 3:** Square the known sides.
- **Step 4:** Add the squares (for the hypotenuse) or subtract (for a leg).
- **Step 5:** Take the square root of the result.

Worked example for a hypotenuse: legs 9 and 12 → 9² + 12² = 81 + 144 = 225 → c = √225 = 15.

Worked example for a leg: hypotenuse 25, leg 7 → 25² − 7² = 625 − 49 = 576 → a = √576 = 24.

The calculator displays each of these steps so you can follow or check the algebra by hand.

## Related Calculators

- [triangle-calculator](https://calculators.im/triangle-calculator)
- [distance-calculator](https://calculators.im/distance-calculator)
- [area-calculator](https://calculators.im/area-calculator)
- [perimeter-calculator](https://calculators.im/perimeter-calculator)

## Authoritative Sources

- [Wolfram MathWorld — Pythagorean Theorem](https://mathworld.wolfram.com/PythagoreanTheorem.html) — Formal statement, proofs, and generalizations.
- [Khan Academy — Pythagorean Theorem](https://www.khanacademy.org/math/geometry/hs-geo-trig/hs-geo-pyth-theorem/a/pythagorean-theorem-review) — Worked examples and practice problems.
- [Wolfram MathWorld - Pythagorean Theorem](https://mathworld.wolfram.com/PythagoreanTheorem.html) — Statement, proofs, and generalizations
- [Khan Academy - Pythagorean Theorem](https://www.khanacademy.org/math/geometry) — Tutorials and worked examples

---

*Source: https://calculators.im/pythagorean-theorem-calculator — calculators.im, 299+ free online calculators.*
