Home Math & Calculator Tools Pythagorean Theorem Calculator
a²+b²
Math

Pythagorean Theorem Calculator

Solve for any side of a right triangle (a, b, or c). Shows step-by-step working, a live SVG triangle diagram that updates with your values, all triangle properties (area, perimeter, angles in degrees), unit selector, and a Pythagorean triples reference table.

📐 Solve any side📊 Live SVG diagram📐 All angles & area📋 Triples table
Switch Tool:
🔒 100% Private — All calculations run in your browser. Nothing sent to any server.

📖 How to Use the Pythagorean Theorem Calculator

  1. 1
    Enter any two sides

    Choose which side you want to find (a, b, or c/hypotenuse) and enter the other two. You can also enter just one side and the angle to calculate using trigonometry. Select your unit (cm, m, inches, feet, or custom). Decimals and whole numbers are supported.

  2. 2
    View the step-by-step solution

    The formula is shown with your values substituted: a² + b² = c². Each arithmetic step is shown explicitly. The result is given as both exact (e.g. √50 = 5√2) and decimal (≈7.071). The discriminant check confirms the triangle is valid.

  3. 3
    Read the full triangle analysis

    The live SVG triangle updates to reflect your sides. All derived values are shown: area (0.5×a×b), perimeter (a+b+c), angle α = arctan(a/b), angle β = arctan(b/a), and the altitude to the hypotenuse. A check for Pythagorean triples shows if your values are an exact integer triple (3-4-5, 5-12-13, etc.).

💡 Key Reference

Triplea² + b² = c²
(3, 4, 5)9+16=25 ✓
(5, 12, 13)25+144=169 ✓
(8, 15, 17)64+225=289 ✓
(7, 24, 25)49+576=625 ✓

Frequently Asked Questions

What is the Pythagorean theorem?

The Pythagorean theorem states that in any right-angled triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². This relationship was known to Babylonian mathematicians 1000 years before Pythagoras, but he (or his school) gave the first known proof. It holds only for right triangles; for other triangles, the more general Law of Cosines applies: c² = a² + b² − 2ab×cos(C) where C is the angle opposite side c.

What are Pythagorean triples?

Pythagorean triples are sets of three positive integers (a, b, c) satisfying a² + b² = c². The simplest is (3, 4, 5): 9+16=25. Others: (5, 12, 13), (8, 15, 17), (7, 24, 25), (20, 21, 29), (9, 40, 41). Any multiple of a triple is also a triple: (6, 8, 10), (9, 12, 15). Primitive triples (no common factor) are generated by Euclid's formula: a=m²−n², b=2mn, c=m²+n² for m>n>0, gcd(m,n)=1, m and n not both odd. There are infinitely many primitive Pythagorean triples.

How do I find angles of a right triangle?

Given sides a (opposite), b (adjacent), c (hypotenuse): angle α (opposite side a) = arctan(a/b) = arcsin(a/c) = arccos(b/c). angle β (opposite side b) = arctan(b/a) = arcsin(b/c) = arccos(a/c). The right angle γ = 90°. Check: α + β + γ = 180°. For example, sides 3, 4, 5: α = arctan(3/4) ≈ 36.87°, β = arctan(4/3) ≈ 53.13°, γ = 90°. Sum = 180° ✓.

What is the altitude to the hypotenuse?

The altitude to the hypotenuse (h) is the perpendicular line from the right angle vertex to the hypotenuse. Its length: h = (a×b)/c. For a 3-4-5 triangle: h = (3×4)/5 = 12/5 = 2.4. The altitude divides the hypotenuse into two segments p and q where p = a²/c and q = b²/c. The geometric mean relationships hold: h² = p×q, a² = p×c, b² = q×c. The altitude is also important in area calculations: Area = 0.5 × c × h = 0.5 × a × b.

What are real-world applications of the Pythagorean theorem?

Construction & carpentry: the "3-4-5 rule" checks right angles by measuring a 3-unit and 4-unit side — if the diagonal is 5 units, the corner is square (builders call this "squaring up"). Navigation: finding straight-line (Euclidean) distance between two GPS coordinates. Screen diagonal: a 1920×1080 display has diagonal √(1920²+1080²) ≈ 2203 pixels. Ladder safety: a 10m ladder leaning at a wall with base 3m from the wall reaches √(100−9) = √91 ≈ 9.54m high. Surveying: indirect measurement of inaccessible distances. 3D distance: √(Δx²+Δy²+Δz²) extends Pythagoras to three dimensions.

Does the Pythagorean theorem work in 3D?

Yes, extended to three dimensions: for a rectangular box with sides a, b, c, the space diagonal d = √(a²+b²+c²). For a point in 3D space at coordinates (x, y, z), its distance from the origin is √(x²+y²+z²). The distance formula between two 3D points (x₁,y₁,z₁) and (x₂,y₂,z₂) is √((x₂-x₁)²+(y₂-y₁)²+(z₂-z₁)²). This generalises to n dimensions: the Euclidean distance in n dimensions is the square root of the sum of squared coordinate differences — the foundation of distance metrics in machine learning and data science.