Math · Live
Pythagorean Theorem Calculator,
solve for any side of a right triangle.
Enter any two sides of a right triangle and instantly find the third, hypotenuse or either leg. See a proportional diagram, full angle calculations, area, perimeter, and a step-by-step solution using a² + b² = c².
Inputs
Right triangle sides
Formula
a² + b² = c²
c = √(a² + b²)
Pythagorean triples
- a
- 3
- b
- 4
- c (hypotenuse)
- 5
- Area
- 6
- Perimeter
- 12
Hypotenuse c
a² + b² = c²
c = √(3² + 4²) = √25
Triangle diagram
Proportional right triangle
Leg a
3
Leg b
4
Hypotenuse c
5
Angle α (at A)
53.1301°
Between a and c
Angle β (at B)
36.8699°
Between b and c
Right angle
90.000000°
Between a and b
Area
6
½ · a · b
Perimeter
12
a + b + c
Step by step
Full solution walkthrough
- 1
Write the theorem
a² + b² = c²
- 2
Substitute values
3² + 4² = c²
- 3
Compute squares
9 + 16 = c²
- 4
Add
25 = c²
- 5
Take the square root
c = √25 = 5
- 6
Verify
3² + 4² = 25 ≈ 25 = 5² ✓
- 7
Angles
α = arctan(b/a) = 53.1301°, β = arctan(a/b) = 36.8699°, γ = 90°
- 8
Area
A = ½ × a × b = ½ × 3 × 4 = 6
- 9
Perimeter
P = a + b + c = 3 + 4 + 5 = 12
Geometry guide
The Pythagorean theorem: what it says and why it works.
The Pythagorean theorem is one of the oldest and most widely applied results in all of mathematics. It states that in any right triangle, a triangle containing exactly one 90° angle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the two legs:
where a and b are the legs and c is the hypotenuse. This relationship holds for every right triangle, regardless of its shape or size.
The three solve cases
The theorem can be rearranged to solve for any of the three sides:
- Find the hypotenuse c (given both legs):
c = √(a² + b²) - Find leg a (given b and c):
a = √(c² − b²)(valid only when c > b) - Find leg b (given a and c):
b = √(c² − a²)(valid only when c > a)
The constraint that c must exceed either leg follows directly from the theorem: if c ≤ b then c² − b² ≤ 0, and the square root of a non-positive number is not a real number. In geometric terms, the hypotenuse is always the longest side.
Pythagorean triples: exact integer solutions
A Pythagorean triple is a set of three positive integers (a, b, c) satisfying the theorem exactly, no irrational numbers involved. The most famous is 3–4–5:
Every Pythagorean triple can be generated from two positive integers m > n > 0 using Euclid’s formula:
Common Pythagorean triples you will encounter:
| Triple (a, b, c) | Verification | Common use |
|---|---|---|
| 3, 4, 5 | 9 + 16 = 25 | Carpentry, tiling |
| 5, 12, 13 | 25 + 144 = 169 | Surveying |
| 8, 15, 17 | 64 + 225 = 289 | Engineering |
| 7, 24, 25 | 49 + 576 = 625 | Navigation |
| 20, 21, 29 | 400 + 441 = 841 | Architecture |
| 9, 40, 41 | 81 + 1600 = 1681 | Advanced geometry |
| 6, 8, 10 | 36 + 64 = 100 | Scaled 3–4–5 |
| 5, 12, 13 | 25 + 144 = 169 | Surveying |
Deriving the angles
Once all three sides are known, the two non-right angles follow from basic trigonometry:
The two acute angles always sum to exactly 90° because all three angles of a triangle sum to 180°, and one angle is already 90°. This means knowing one acute angle instantly gives you the other: β = 90° − α.
For the classic 3–4–5 right triangle:
- α = arctan(4/3) ≈ 53.13°
- β = arctan(3/4) ≈ 36.87°
- 53.13° + 36.87° = 90° ✓
Area and perimeter of a right triangle
Because the two legs of a right triangle are perpendicular, one leg serves as the base and the other as the height. This simplifies the area formula to:
The perimeter is simply the sum of all three sides:
Proofs of the theorem
The Pythagorean theorem has over 350 known proofs, more than any other theorem in mathematics. The most elegant is the geometric proof attributed to Euclid:
Draw a square on each side of the right triangle. The area of the square on the hypotenuse equals the combined area of the squares on the two legs. This can be verified by rearranging the smaller squares to exactly fill the larger one, a visual proof that requires no algebra.
A second classic proof uses the fact that the right triangle can be divided into two smaller triangles that are both similar to the original. Since similar triangles have proportional sides, the relationships between their areas lead directly to a² + b² = c².
Real-world applications
- Construction and carpentry: Checking whether a corner is square (90°) using the 3–4–5 rule. Measure 3 feet along one wall, 4 feet along the adjacent wall; if the diagonal is 5 feet, the corner is a perfect right angle.
- Navigation: Finding the straight-line distance between two points given their horizontal and vertical offsets.
- Screen diagonals: A 16:9 monitor with a 27-inch diagonal has width ≈ 23.5 in and height ≈ 13.2 in because 23.5² + 13.2² ≈ 27².
- Physics: velocity and force vectors: When two perpendicular components are known, the resultant magnitude is the hypotenuse of the right triangle they form.
- 3D distance: The distance between two points in 3D space is extended Pythagorean theorem:
d = √(Δx² + Δy² + Δz²).
The theorem in higher dimensions
The Pythagorean theorem extends naturally to any number of dimensions. In two dimensions (the plane), the distance between points (x₁, y₁) and (x₂, y₂) is:
In three dimensions, add a third term under the radical. In n dimensions, the distance between two points is the square root of the sum of the squares of all coordinate differences: the Euclidean distance formula, which is the direct generalisation of the Pythagorean theorem to n-dimensional space.
Worked examples
Find the hypotenuse: a = 9, b = 12. c = √(81 + 144) = √225 = 15. (This is 3 × the 3–4–5 triple.)
Find a leg: One leg = 7, hypotenuse = 25. other leg = √(625 − 49) = √576 = 24. (The 7–24–25 triple.)
Non-integer example: a = 1, b = 1. c = √2 ≈ 1.41421. This is the diagonal of a unit square — and one of the earliest proofs that irrational numbers exist.