Current for 2026As of: July 2026

Pythagorean Theorem Calculator c² = a² + b².

Calculate the missing side of a right triangle – hypotenuse or leg

FreeNo sign-upGDPR-compliant

Pythagorean Theorem Calculator

Calculate the missing side of a right triangle: c² = a² + b²

0.1 100
0.1 100

Hypotenuse c

5

Missing side of the right triangle

a=3b=4c=5

Leg a

3

Leg b

4

Hypotenuse c

5

The Pythagorean theorem – basics and applications

Right triangles, Pythagorean triples and practical use

The Pythagorean theorem (c² = a² + b²) is one of the best-known theorems in geometry. It applies exclusively to right triangles: the hypotenuse c (the side opposite the right angle) is always the longest side. The legs a and b form the right angle. Conversely: if three side lengths satisfy the formula a² + b² = c², the triangle necessarily has a right angle.

The best-known Pythagorean triple is (3, 4, 5): 3² + 4² = 9 + 16 = 25 = 5². The ancient Egyptians already used this triple with a rope with 12 knots (3 + 4 + 5 = 12) to mark right angles when building the pyramids. Other integer triples: (5, 12, 13), (8, 15, 17), (7, 24, 25). These triples remain useful in trades and construction to this day.

In computer graphics and game development, the Pythagorean theorem is everywhere: the Euclidean distance between two points (x₁, y₁) and (x₂, y₂) is calculated as d = √((x₂−x₁)² + (y₂−y₁)²). This distance is used for collision detection, pathfinding and rendering. In three dimensions, this becomes d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²) by applying the theorem twice.

Our Pythagorean theorem calculator covers all three use cases: calculating the hypotenuse c from legs a and b, leg a from b and c, or leg b from a and c. Enter the two known sides and select the value you want to find. The calculator returns the missing side as well as all three side lengths accurate to six decimal places.

Calculation examples

Hypotenuse: a=3, b=4 → c=5

Hypotenuse: a=3, b=4 → c=5
ItemAmount
Leg a3
Leg b4
c = √(3² + 4²)√(9 + 16) = √25
Hypotenuse c5

Leg: a=3, c=5 → b=4

Leg: a=3, c=5 → b=4
ItemAmount
Leg a3
Hypotenuse c5
b = √(5² − 3²)√(25 − 9) = √16
Leg b4

Frequently asked questions about the Pythagorean theorem calculator

Formulas, triples and application examples

The Pythagorean theorem applies to right triangles: in a right triangle, the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the two legs: c² = a² + b². It follows that: c = √(a² + b²), a = √(c² − b²) and b = √(c² − a²). The theorem was already known to the Babylonians, but is named after the Greek mathematician Pythagoras.

Pythagorean triples are integer solutions of the equation a² + b² = c². The best-known triple is (3, 4, 5): 9 + 16 = 25 ✓. Other triples: (5, 12, 13), (8, 15, 17), (7, 24, 25), (20, 21, 29). These triples are useful in practice because they produce right angles without measurement errors. In construction, the 3-4-5 triple is used to check right angles.

The hypotenuse c is the longest side of a right triangle, opposite the right angle. Formula: c = √(a² + b²). Example: a = 3, b = 4 → c = √(9 + 16) = √25 = 5. In our calculator, select the "Calculate hypotenuse c" mode and enter the two legs a and b.

If the hypotenuse c and one leg are known, the other leg can be calculated: b = √(c² − a²) or a = √(c² − b²). Important: the hypotenuse must be greater than the leg (c > a and c > b). Example: a = 3, c = 5 → b = √(25 − 9) = √16 = 4.

The Pythagorean theorem is used everywhere: in architecture to check right angles (3-4-5 method). In road construction to calculate gradients. In navigation to determine distances. In sports for long jump or ball-throw trajectories. In computer graphics to calculate distances between points: distance = √((x₂−x₁)² + (y₂−y₁)²). The Pythagorean theorem is one of the most widely used mathematical formulas of all.

For business

Calculators for your website or app

Integrate our GDPR-compliant calculators as a widget or use our API. Perfect for HR portals, career pages and financial applications.

  • 100% GDPR-compliant - no cookies, no data storage
  • White-label - your branding, your colors
  • REST API for your own applications
  • Built by HEADON.pro - your digital agency
Learn more about HEADON.pro →

Request without obligation

Receive an individual quote from HEADON.pro

Your data will only be used to get in touch with you.
Privacy