Pythagorean Theorem Calculator
Solve a² + b² = c² for any side of a right triangle. Detects Pythagorean triples, suggests the nearest triple, and draws the triangle.
Right Triangle
Solve for
Equation: a² + b² = c²
✓ Pythagorean triple — all three sides are integers satisfying a² + b² = c².
Sides & metrics
Side c
5
a (leg)
3
b (leg)
4
c (hypotenuse)
5
Area (½·a·b)
6
Perimeter (a + b + c)
12
∠A (opposite a)
36.87°
∠B (opposite b)
53.13°
Triangle
Show your work
Given
- a² + b² = c²solve for c
- Substitute legsc² = 3² + 4²= c² = 9 + 16 = 25
- Area = ½ · a · b½ · 3 · 4= 6
- Perimeter = a + b + c3 + 4 + 5= 12
- Angle A (opposite a) via arctan(a/b)∠A = arctan(3 / 4) = arctan(0.75)= 36.87°
- Angle B (opposite b) via arctan(b/a)∠B = arctan(4 / 3) = arctan(1.3333)= 53.13° (check: ∠A + ∠B = 90°, remaining angle = 90°)
Take the square root
5
c = √25
The Pythagorean theorem in one line
For any right triangle with legs a and b and hypotenuse c (the side opposite the right angle):
a² + b² = c²
Rearranged, that lets you solve for any missing side:c = √(a² + b²) a = √(c² − b²) b = √(c² − a²)
Pythagorean triples — integer solutions to a² + b² = c²
A Pythagorean triple is a set of three positive integers that fit a² + b² = c² exactly. The most famous: 3-4-5. Any multiple (6-8-10, 9-12-15, 15-20-25, …) is also a triple. The calculator marks these automatically.
Classic primitive triples (not multiples of smaller ones):
- 3-4-5 — the smallest and most famous
- 5-12-13
- 8-15-17
- 7-24-25
- 20-21-29
- 9-40-41
- 12-35-37
- 11-60-61
If your inputs are close to a triple (say, 3.1 and 4), the calculator will point you at 3-4-5 so you can double-check your measurements.
What else this calculator gives you
- Both non-right angles — using arctan. For 3-4-5, ∠A ≈ 36.87° and ∠B ≈ 53.13° (and the right angle C = 90°).
- Area = ½ · a · b — a right triangle's two legs act like the rectangle's sides.
- Perimeter = a + b + c.
- Triangle visual — drawn to scale so you can sanity-check the geometry.
Real-world uses
- Construction — the 3-4-5 rule lets you square corners without a protractor. A rope knotted at those three lengths is a foolproof right angle.
- Navigation / trip planning — straight-line (“as the crow flies”) distance between two points is a Pythagorean problem once you convert lat/long to flat coordinates.
- Physics — combining perpendicular vectors (force, velocity) uses a² + b² = c² to get the resultant magnitude.
- Screen diagonals — a 16:9 screen with a 16-unit width and 9-unit height has a diagonal of √(16² + 9²) ≈ 18.36 units.
Common mistakes to avoid
- Mistaking a leg for the hypotenuse. The hypotenuse is always the side opposite the right angle — and always the longest. If you're solving for a leg and the “hypotenuse” you entered is shorter than the known leg, this calculator errors out.
- Forgetting to square-root at the end. a² + b² = c² gives you c squared, not c. The final step is √.
- Applying it to a non-right triangle. The theorem only works when one angle is exactly 90°. For general triangles, use the law of cosines: c² = a² + b² − 2ab·cos(C).