Click to show tips
Try an Example
Pick a scenario to see how the calculator works, then adjust the values
Ladder Against Wall
A 10-foot ladder leans against a wall with the base 6 feet away. How high does it reach?
Key values: Leg a = 6 ft · Hypotenuse c = 10 ft · Solve for leg b
TV Screen Diagonal
Find the diagonal of a TV with a 16:9 aspect ratio (width 40", height 22.5").
Key values: Width = 40 in · Height = 22.5 in · Find diagonal
Classic 3-4-5 Triangle
Verify that sides 3, 4, and 5 form a right triangle (the most famous Pythagorean triple).
Key values: Sides: 3, 4, 5 · Right triangle · Primitive triple
What Is the Pythagorean Theorem?
The Pythagorean theorem is one of the most fundamental relationships in all of mathematics. It states that in any right triangle, the square of the hypotenuse (the side opposite the 90-degree angle) equals the sum of the squares of the other two sides, called legs:
Here, and are the legs and is the hypotenuse. This identity applies only to right triangles -- for other triangles, the generalization is the Law of Cosines.
The theorem is named after the ancient Greek mathematician Pythagoras of Samos (c. 570--495 BC), though the relationship was known to Babylonian mathematicians roughly 1,300 years earlier. The Plimpton 322 clay tablet (~1800 BC) records 15 Pythagorean triples in base-60 cuneiform, and the Indian Baudhayana Shulbasutra (~800 BC) states the theorem for constructing Vedic fire altars.
Formulas
Solving for the Hypotenuse
When both legs are known:
Solving for a Leg
When the hypotenuse and one leg are known:
Note: the hypotenuse must be larger than the known leg; otherwise the expression under the radical is negative and no real solution exists.
Converse of the Pythagorean Theorem
The converse lets you classify any triangle by comparing to : equal means right, greater means acute, less means obtuse. For the full converse analysis, worked examples, and the 3-4-5 construction rule, see the Right Triangle Checker guide.
Distance Formula
The distance formula is the Pythagorean theorem applied to coordinates. For the derivation, 3D extension, and applications in navigation, graphics, and ML, see the Distance Formula Calculator guide.
Relationship to the Law of Cosines
The Pythagorean theorem is a special case of the Law of Cosines. For any triangle:
When , , and the formula reduces exactly to .
Classic Proofs
The Pythagorean theorem may have more known proofs than any other theorem in mathematics -- Elisha Loomis cataloged 370 proofs, and Cut-the-Knot has collected over 100.
Rearrangement Proof (Bhaskara's "Behold!")
Take four identical right triangles with legs and . Arrange them inside a large square of side . In one configuration they leave a tilted square of area in the center; in the other they leave two smaller squares of areas and . Since both configurations fill the same total area: .
Garfield's Trapezoid Proof (1876)
The 20th US President, James Garfield, published this proof while still a Congressman. Arrange two copies of the right triangle to form a trapezoid with parallel sides and . Computing the trapezoid area two ways and setting them equal yields .
Pythagorean Triples
A Pythagorean triple is a set of positive integers satisfying —right triangles with integer sides. The most well-known is (3, 4, 5). Euclid's formula can generate all primitive triples.
For the generating formula, a table of common triples, properties, and the connection to Fermat's Last Theorem, see the Pythagorean Triple Calculator guide.
Real-World Examples
Example 1: Construction -- Squaring a 12×16 ft Room
A contractor measures the diagonal of a room to verify right angles. With walls of 12 ft and 16 ft:
If the measured diagonal is 20 ft, the corners are square. This is a (3, 4, 5) × 4 triple -- the classic "3-4-5 method" builders use daily.
Example 2: Ladder Safety -- OSHA 4:1 Rule
A 20-ft ladder is placed with its base 5 ft from the wall. How high does it reach?
The contact angle is arctan(19.36/5) ≈ 75.5°, meeting OSHA's recommended safe angle. Correct ladder placement prevents hundreds of thousands of injuries annually.
Example 3: Screen Diagonal -- Verifying a 55-inch TV
A consumer measures the visible area of a TV as 48 in wide and 27 in tall:
The diagonal matches the marketed "55-inch" size. For 16:9 displays, width ≈ diagonal × 0.872 and height ≈ diagonal × 0.49.
Example 4: Student Homework -- Classic 5-12-13 Triangle
A right triangle has legs of 5 cm and 12 cm. Find the hypotenuse.
This is the primitive Pythagorean triple (5, 12, 13) -- the second most commonly taught triple after (3, 4, 5).
Example 5: Sports -- Home Plate to Second Base
A baseball diamond is a square with 90-foot sides. The catcher's throw to second base crosses the diagonal:
This ~127-foot throw is one of baseball's most demanding plays.
Common Misconceptions
- -- The most common error. Squaring a sum is NOT the same as summing squares. .
- Forgetting the final square root -- Students sometimes report instead of .
- Applying the theorem to non-right triangles -- The Pythagorean theorem holds only for right triangles. For other triangles, use the Law of Cosines.
- Misidentifying the hypotenuse -- The hypotenuse is always opposite the right angle and is always the longest side. When the triangle is rotated, locate the right angle first.
- Always solving for the hypotenuse -- The formula can be rearranged to solve for either leg: .
Frequently Asked Questions
How do I find the hypotenuse of a right triangle?
Use , where and are the two legs. Square each leg, add the results, and take the square root.
How do I find a missing leg?
Use . Subtract the square of the known leg from the square of the hypotenuse, then take the square root.
Does the Pythagorean theorem work for all triangles?
No. It applies only to right triangles (those with a 90-degree angle). For other triangles, use the Law of Cosines: .
What is a Pythagorean triple?
A set of three positive integers that satisfy . Examples include (3, 4, 5), (5, 12, 13), and (8, 15, 17). A triple is primitive if the three numbers share no common factor.
Can I use the Pythagorean theorem in 3D?
Yes. The space diagonal of a rectangular box with dimensions , , and is . This applies the theorem twice in succession.
Who discovered the Pythagorean theorem?
While named after Pythagoras (~570--495 BC), the theorem was known to Babylonian mathematicians at least 1,300 years earlier (Plimpton 322 tablet, ~1800 BC) and independently by Indian mathematicians in the Baudhayana Shulbasutra (~800 BC) and Chinese mathematicians in the Zhoubi Suanjing.
References
- Wolfram MathWorld. "Pythagorean Theorem." https://mathworld.wolfram.com/PythagoreanTheorem.html
- Encyclopaedia Britannica. "Pythagorean theorem." https://www.britannica.com/science/Pythagorean-theorem
- Cut-the-Knot. "Pythagorean Theorem and its many proofs." https://www.cut-the-knot.org/pythagoras/
- Wikipedia. "Shulba Sutras." https://en.wikipedia.org/wiki/Shulba_Sutras
- Conrad, K. "Pythagorean Triples." University of Connecticut. https://kconrad.math.uconn.edu/blurbs/ugradnumthy/pythagtriple.pdf
Disclaimer
This calculator is provided for educational and reference purposes. While we strive for accuracy, always verify critical measurements independently. For construction, engineering, or safety applications (such as ladder placement), consult professional guidelines and relevant safety standards (e.g., OSHA regulations). The calculator uses standard IEEE 754 floating-point arithmetic, which may produce minor rounding differences for very large or very small numbers.
Specialized Calculators
Choose from 5 specialized versions of this calculator, each optimized for specific use cases and calculation methods.
Application
2 CalculatorsFeature
2 CalculatorsRelated Calculators
6 CalculatorsMore Math calculators