Pythagorean Theorem
Relates the two legs a and b of a right triangle to the hypotenuse c.
a² + b² = c²
The hypotenuse is c = √(a² + b²). Some triangles, like 3-4-5, have whole-number sides.
The distance formula on the coordinate plane comes from this theorem.
Calculator
Change a value and the result and picture update instantly.
Result
Hypotenuse c
Animated picture
The picture follows your values. Some points and shapes can be dragged.
Use in game development
Every distance check — player to enemy, attack range, movement speed — uses it.
Code example (JavaScript)
const dist = Math.hypot(dx, dy); // √(dx² + dy²)
What the symbols mean
| Symbol | Meaning |
|---|---|
a | Leg a |
b | Leg b |
c | Hypotenuse c |
More formulas in this category
- Area and Circumference of a Circle
- Area of a Triangle
- Area of a Trapezoid
- Area and Arc Length of a Sector
- Interior Angles of a Polygon
- Volume and Surface Area of a Cuboid
- Volume and Surface Area of a Cylinder
- Volume and Surface Area of a Cone
- Volume and Surface Area of a Sphere
Frequently asked questions
- What is the formula for Pythagorean Theorem?
- The formula for Pythagorean Theorem is a² + b² = c². Relates the two legs a and b of a right triangle to the hypotenuse c.
Math Formula Quiz Geometry (Area & Volume)
Sources
Checked: 2026-11-29