Pythagorean Theorem Calculator
Calculate the missing side of a right triangle using the Pythagorean theorem. Supports irrational numbers with radical and decimal display.
Calculate the missing side of a right triangle using the Pythagorean theorem. Supports irrational numbers with radical and decimal display.
Please provide exactly two sides to calculate the third.
Pythagorean Theorem Calculator
A Brief History of the Pythagorean Theorem
The Pythagorean theorem is one of the most fundamental results in mathematics, with a history spanning thousands of years. While it bears the name of the ancient Greek mathematician Pythagoras (c. 570–495 BCE) and his school, evidence suggests the relationship was known long before his time. Babylonian clay tablets dating to around 1800 BCE contain lists of Pythagorean triples, and ancient Indian and Chinese texts also describe the theorem independently.
Pythagoras and his followers are credited with providing one of the first known formal proofs of the theorem. Over the centuries, hundreds of distinct proofs have been devised — by figures as varied as Euclid, the 12th-century Indian mathematician Bhāskara II, Leonardo da Vinci, and even U.S. President James A. Garfield. Today the theorem remains a cornerstone of geometry, trigonometry, and countless real-world applications.
The Mathematical Expression
The Pythagorean theorem states that in any right triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides:
Where:
- a and b are the two legs (the sides that form the right angle)
- c is the hypotenuse (the side opposite the right angle — always the longest side)
From this single equation we can derive formulas for any missing side:
- To find the hypotenuse:
- To find a leg: or
The result may be a whole number (when the sides form a Pythagorean triple like 3-4-5) or an irrational number expressed as a square root (for example, ).
How to Use This Calculator
- Enter any two sides of a right triangle in the input fields for *a*, *b*, or *c*.
- Need to enter an irrational number? Click the √ button next to an input to switch it to radical mode. You can then type the number under the square root sign — for instance, entering 2 gives you .
- The calculator automatically determines which side is missing and computes it for you.
- Toggle between radical and decimal display using the switch above the result. Radical form shows the exact value (e.g., ), while decimal form shows the approximation (e.g., 1.4142…).
- The dynamic triangle below the inputs updates in real time to reflect the proportions of your triangle.
- The step-by-step calculation section walks you through the algebra so you can follow — or verify — every step.
What Makes This Calculator Different
- True radical support — enter and display irrational numbers like or exactly, not just decimal approximations.
- Radical ↔ Decimal toggle — instantly switch between exact and approximate representations to deepen your understanding of irrational numbers.
- Live triangle visualization — watch the triangle reshape itself as you change the inputs, making the geometric relationship tangible.
- Step-by-step LaTeX rendering — every calculation step is typeset with LaTeX for crystal-clear mathematical notation.
FAQ
What is a Pythagorean triple?
A Pythagorean triple is a set of three positive integers that satisfy . Common examples include , , and . Any multiple of a Pythagorean triple is also a triple — for example, .
Can the result be an irrational number?
Yes. When the squared sum (or difference) under the square root is not a perfect square, the result is irrational. For example, if and , then . Our calculator shows both the exact radical form and the decimal approximation.
Does this calculator work for non-right triangles?
No. The Pythagorean theorem only applies to right triangles (triangles with one 90° angle). For other types of triangles you would need the Law of Cosines: .
Related Calculators
Explore more math tools
Square Root Calculator
Calculate the square root of any positive number with detailed results including perfect square detection and simplified radical forms.
Trigonometry Calculator
Instantly calculate sine, cosine, tangent, and their inverses. Switch seamlessly between degrees and radians.