Skip to content
CalculatorPro — Free Online Calculators

Pythagorean Theorem Calculator — Free Triangle Solver

Find the hypotenuse or a missing leg of a right triangle using the Pythagorean theorem. Enter two known sides and get the third side instantly.

ByEditorial Team, Math Updated Jun 7, 20262026 verified Methodology
Side aSide bHypotenuse c

5.0000

Formula & Method

Pythagorean Theorem Formula

In any right-angled triangle on a Euclidean plane, the square of the hypotenuse length (c, opposite the 90° angle) equals the sum of the squares of the two perpendicular legs (a and b).

Mathematical Equation
c = √(a² + b²) | a² + b² = c²

Where:

a
Side a (Leg 1) (units)

Length of the first perpendicular leg adjacent to the right angle.

b
Side b (Leg 2) (units)

Length of the second perpendicular leg adjacent to the right angle.

c
Hypotenuse (c) (units)

Longest side of the right triangle, opposite the 90° angle.

✓

Example: Finding Hypotenuse for Legs 6 and 8

Calculate the exact hypotenuse of a right triangle when perpendicular legs Side a = 6 and Side b = 8.

Given Values:
Side a: 6
Side b: 8
1
Square Both Perpendicular Legs
a² = 6² = 36 and b² = 8² = 64
= 36 and 64
2
Sum Squared Leg Lengths
a² + b² = 36 + 64 = 100
= c² = 100
3
Take Positive Square Root for Hypotenuse
c = √100 = 10
= Hypotenuse (c) = 10.0000
Final Result
Legs of length 6 and 8 form a classic 6-8-10 Pythagorean triple with hypotenuse c = 10.0000 units.

Key Insights:

  • • Any scaled multiple of common integer triples — 3-4-5, 5-12-13, or 8-15-17 — solves to an exact whole-number hypotenuse without rounding.
  • • To find a missing leg instead of the hypotenuse, rearrange the equation to a = √(c² - b²); the hypotenuse c must always exceed either leg.

About this calculator

Pythagorean Theorem Calculator

Comprehensive Guide to Pythagorean Theorem Calculator

The Pythagorean Theorem Calculator evaluates hypotenuse lengths, adjacent/opposite leg dimensions, perimeter, area, and interior acute angles for any right-angled triangle. Attributed to the ancient Greek mathematician and philosopher Pythagoras of Samos (c. 570–495 BCE) and documented across Babylonian, Indian, and Chinese mathematical texts (such as the Zhoubi Suanjing), the theorem states that in any right triangle, the square of the length of the hypotenuse ($c$) equals the sum of the squares of the lengths of the two legs ($a$ and $b$):

a² + b² = c²

From civil engineering, land surveying, and carpentry (such as using the 3-4-5 rule to establish square $90^\circ$ foundation footings) to computer graphics, 3D game physics, GPS satellite triangulation, and linear algebra vector norms ($L_2$), the Pythagorean theorem is the fundamental geometric equation of flat Euclidean space.


How to Use the Pythagorean Theorem Calculator

  1. Select Target Variable: Choose which side you need to solve for:
    • Hypotenuse ($c$): The longest side opposite the $90^\circ$ right angle.
    • Leg $a$: Solve for leg $a$ using hypotenuse $c$ and adjacent leg $b$.
    • Leg $b$: Solve for leg $b$ using hypotenuse $c$ and adjacent leg $a$.
  2. Enter Known Side Lengths: Input positive real numbers for your two known dimensions.
  3. Select Measurement Units: Standardize input units (inches, feet, yards, meters, centimeters, millimeters).
  4. Inspect Exact Radical vs. Decimal Output: View the hypotenuse in simplified square root radical form (e.g., $5\sqrt{2}$) alongside high-precision decimal approximations.
  5. Review Interior Trigonometric Metrics: Inspect the acute angles ($\alpha, \beta$), triangle perimeter, and surface area.

The Calculator Formulas

The Pythagorean equation, radical extractions, and trigonometric identities:

1. The Pythagorean Theorem:
   a² + b² = c²

2. Solving for the Hypotenuse (c):
   c = √(a² + b²)

3. Solving for Legs (a and b):
   a = √(c² - b²)   (where c > b)
   b = √(c² - a²)   (where c > a)

4. Three-Dimensional (3D) Space Diagonal:
   d = √(x² + y² + z²)

5. Area and Perimeter of a Right Triangle:
   Area = (1/2) × a × b
   Perimeter = a + b + c

6. Interior Acute Angles (Trigonometry):
   α = arcsin(a / c) = arctan(a / b)
   β = arcsin(b / c) = arctan(b / a) = 90° - α

7. Euclid's Formula for Primitive Pythagorean Triples:
   For integers m > n > 0 with gcd(m, n) = 1 and opposite parity:
   a = m² - n²
   b = 2mn
   c = m² + n²

Practical Examples

Example 1: Carpentry Foundation Squaring (The 3-4-5 Rule)

A carpenter framing a deck wants to ensure the corner forms an exact $90^\circ$ right angle. They measure $15\text{ feet}$ along one rim joist and $20\text{ feet}$ along the perpendicular joist. What must the diagonal measurement be to guarantee square framing?

Parameters: Leg a = 15 feet, Leg b = 20 feet

Formula: c = √(a² + b²)

Step 1: Square Both Legs:
a² = 15² = 225
b² = 20² = 400

Step 2: Sum the Squares:
a² + b² = 225 + 400 = 625

Step 3: Extract the Square Root:
c = √625 = 25 feet

Result: The diagonal must measure exactly 25.0 feet. Because 15-20-25 is a 5× scaled multiple of the primitive 3-4-5 Pythagorean triple, the corner is confirmed square.

Example 2: OSHA Ladder Placement Safety

An electrician places a $20\text{ foot}$ extension ladder against an exterior wall. OSHA workplace safety standards mandate a $4:1$ slope ratio, requiring the ladder base to be positioned $5\text{ feet}$ away from the wall foundation. What vertical height does the ladder reach?

Parameters: Hypotenuse c = 20 feet, Base Leg b = 5 feet

Formula: a = √(c² - b²)

Step 1: Square Hypotenuse and Known Leg:
c² = 20² = 400
b² = 5² = 25

Step 2: Subtract the Squares:
c² - b² = 400 - 25 = 375

Step 3: Extract the Square Root:
a = √375 = √(25 × 15) = 5√15 ≈ 19.3649 feet (19 feet, 4.4 inches)

Result: The ladder reaches a vertical height of approximately 19.36 feet up the wall.

Key Concepts & Essential Terminology

The Pythagorean Theorem: Geometric Area Proof (a² + b² = c²)The sum of the square areas built on legs a and b equals the square area built on hypotenuse ca² = 9b² = 16c² = 25a = 3b = 4c = 5Pythagorean Metric Identities• Theorem: a² + b² = c²• Hypotenuse: c = √(a² + b²)• Solving Legs: a = √(c² - b²), b = √(c² - a²)• 3D Space Diagonal: d = √(x² + y² + z²)Classic Pythagorean Triples• 3 - 4 - 5 (Carpentry foundation squaring)• 5 - 12 - 13• 8 - 15 - 17• 7 - 24 - 25• Euclid: a = m² - n², b = 2mn, c = m² + n²

Figure: Geometric dissection proof of the Pythagorean theorem illustrating area preservation on right triangle sides.

Understanding right triangles requires mastering key geometric properties and triples:

  • Hypotenuse: The longest side of a right triangle, situated directly opposite the $90^\circ$ right angle.
  • Legs (Catheti): The two shorter sides ($a$ and $b$) that meet perpendicularly to form the right angle.
  • Pythagorean Triple: A set of three positive integers $(a, b, c)$ that satisfy $a^2 + b^2 = c^2$.
  • Primitive Pythagorean Triple: A triple where $a, b,$ and $c$ are coprime ($gcd(a, b, c) = 1$). For example, $(3, 4, 5)$ and $(5, 12, 13)$ are primitive, while $(6, 8, 10)$ is a composite multiple.
  • Special Right Triangles:
    • $45^\circ-45^\circ-90^\circ$ (Isosceles Right Triangle): Leg ratio is $1 : 1 : \sqrt{2}$. The hypotenuse is always leg $\times \sqrt{2}$.
    • $30^\circ-60^\circ-90^\circ$ Triangle: Side ratio is $1 : \sqrt{3} : 2$. The hypotenuse is exactly twice the shortest leg.

Primitive Pythagorean Triples Reference Matrix (Hypotenuse < 100)

The table below catalogs all primitive Pythagorean integer triples with hypotenuse under 100:

Primitive Triple (a, b, c) Euclid Parameters (m, n) Triangle Perimeter (P) Triangle Area (A) Inradius r = (a+b-c)/2
(3, 4, 5) $m = 2, n = 1$ 12 6 1
(5, 12, 13) $m = 3, n = 2$ 30 30 2
(8, 15, 17) $m = 4, n = 1$ 40 60 3
(7, 24, 25) $m = 4, n = 3$ 56 84 3
(20, 21, 29) $m = 5, n = 2$ 70 210 6
(12, 35, 37) $m = 6, n = 1$ 84 210 5
(9, 40, 41) $m = 5, n = 4$ 90 180 4
(28, 45, 53) $m = 7, n = 2$ 126 630 10
(11, 60, 61) $m = 6, n = 5$ 132 330 5
(16, 63, 65) $m = 8, n = 1$ 144 504 7
(33, 56, 65) $m = 7, n = 4$ 154 924 12
(48, 55, 73) $m = 8, n = 3$ 176 1,320 15
(13, 84, 85) $m = 7, n = 6$ 182 546 6
(36, 77, 85) $m = 9, n = 2$ 198 1,386 14
(39, 80, 89) $m = 8, n = 5$ 208 1,560 15
(65, 72, 97) $m = 9, n = 4$ 234 2,340 20

Special Right Triangles & Exact Geometric Ratios

Standardized right triangles provide closed-form algebraic ratios:

Triangle Classification Interior Angles Side Ratio ($a : b : c$) Hypotenuse Relationship Common Engineering Application
Isosceles Right Triangle $45^circ - 45^circ - 90^circ$ $1 : 1 : sqrt{2}$ $c = asqrt{2} approx 1.414a$ Square diagonals, 45-degree pipe elbows
Scalene Half-Equilateral $30^circ - 60^circ - 90^circ$ $1 : sqrt{3} : 2$ $c = 2a$ (Short leg doubled) Hexagonal bolts, A-frame roof trusses
Kepler Triangle $approx 51.8^circ - 38.2^circ - 90^circ$ $1 : sqrt{Phi} : Phi$ Side ratio based on Golden Ratio $Phi approx 1.618$ Great Pyramid of Giza geometry
3-4-5 Integer Standard $36.87^circ - 53.13^circ - 90^circ$ $3 : 4 : 5$ Exact whole integer hypotenuse Carpentry framing, layout surveying

How Pythagorean Theorem Works

The theorem balances geometric area preservation and metric tensor analysis:

1. James A. Garfield's Trapezoid Proof

In 1876, U.S. Congressman (and later 20th U.S. President) James A. Garfield published an elegant algebraic proof using a single trapezoid composed of three right triangles:

  • Two identical right triangles with legs $a$ and $b$, and hypotenuse $c$.
  • One isosceles right triangle with legs $c$ and $c$, enclosing area $ rac{1}{2}c^2$.

The area of the complete trapezoid is:

Area = (1/2) × (Base₁ + Base₂) × Height = (1/2) × (a + b) × (a + b) = (1/2) × (a² + 2ab + b²)

Equating this to the sum of the three triangular pieces:

(1/2)(a² + 2ab + b²) = (1/2)ab + (1/2)ab + (1/2)c²
(1/2)(a² + 2ab + b²) = ab + (1/2)c²
(1/2)a² + ab + (1/2)b² = ab + (1/2)c²
(1/2)a² + (1/2)b² = (1/2)c²
a² + b² = c²

2. Generalization to Non-Right Triangles (Law of Cosines)

If the angle $C$ between sides $a$ and $b$ is not $90^\circ$, the Pythagorean theorem generalizes into the Law of Cosines:

c² = a² + b² - 2ab × cos(C)

When $C = 90^\circ$, $\cos(90^\circ) = 0$, causing the correction term $-2ab\cos(C)$ to vanish, simplifying back to $a^2 + b^2 = c^2$.


Common Pythagorean Theorem Mistakes to Avoid

  1. Applying the Theorem to Non-Right Triangles: Using $a^2 + b^2 = c^2$ on acute or obtuse triangles. The theorem holds strictly for $90^\circ$ triangles.
  2. Adding Legs Directly without Squaring: Assuming $a + b = c$ (e.g., $3 + 4 = 7$ instead of $\sqrt{3^2 + 4^2} = 5$).
  3. Adding Instead of Subtracting When Solving for a Leg: Calculating $a = \sqrt{c^2 + b^2}$ instead of $a = \sqrt{c^2 - b^2}$.
  4. Forgetting to Take the Square Root: Leaving the answer as $c^2$ rather than evaluating $\sqrt{c^2}$.
  5. Mixing Incompatible Measurement Units: Combining inches with feet without converting first.

Frequently Asked Questions

Can the Pythagorean theorem be used on any triangle?

No. The Pythagorean theorem applies strictly to right-angled triangles (triangles containing one 90° angle). For acute or obtuse triangles, you must use the Law of Cosines: c² = a² + b² - 2ab cos(C).

What is the 3-4-5 rule in carpentry and construction?

The 3-4-5 rule is a practical method builders use to create or verify perfect 90° square corners. By measuring 3 feet along one wall and 4 feet along the other, the diagonal distance between the marks must measure exactly 5 feet if the corner is square.

What is a primitive Pythagorean triple?

A primitive Pythagorean triple is a set of three whole numbers (a, b, c) that satisfy a² + b² = c² where the numbers share no common divisor other than 1 (they are coprime). For example, 3-4-5 is primitive, but 6-8-10 is not because all numbers can be divided by 2.

How do you find the distance between two 2D points using the Pythagorean theorem?

The distance formula d = √[(x₂ - x₁)² + (y₂ - y₁)²] is derived directly from the Pythagorean theorem. The horizontal delta (x₂ - x₁) represents leg a, the vertical delta (y₂ - y₁) represents leg b, and the straight-line distance d is the hypotenuse c.

How do you calculate the 3D diagonal of a room or box?

Extend the Pythagorean theorem into three dimensions: d = √(length² + width² + height²). First compute the floor diagonal √(l² + w²), then treat that diagonal as the base leg of a vertical right triangle with height h.

Why is the hypotenuse always the longest side of a right triangle?

In geometry, the largest side of any triangle is always opposite the largest angle. Since the angles of a triangle must sum to 180°, and a right angle is 90°, the other two acute angles must sum to 90°, making each strictly less than 90°. Thus, the hypotenuse opposite the 90° angle is always the longest side.


Conclusion

The Pythagorean Theorem Calculator provides exact evaluation of right triangle hypotenuses, leg dimensions, interior acute angles, and 3D spatial diagonals. By understanding geometric area preservation and primitive triple symmetries, architects, builders, surveyors, and students can resolve spatial measurements with absolute mathematical precision.



Sources & References

Technical & General Calculation Disclaimer

This calculation tool applies standard mathematical, scientific, or engineering formulas. While designed for precision, output values are estimates and should be independently verified for commercial, structural, or safety-critical applications.

Comments

Sign in to leave a comment.

Loading comments…