Pythagorean Theorem Calculator
a² + b² = c² with every step: exact surds, the converse, box diagonals and triples.
Try before you buy.
- Free preview: the missing side in full, with the first step of the working, the first rows of the triples and a watermarked drawing; every other figure is hidden.
- Locked until you unlock it: download and copy.
- Unlock: Pro pass, ₹179 for 30 days or ₹79 for 1 week, a one-time payment unless you choose automatic renewal. Unlock: Pro pass, $5.99 for 30 days or $2.99 for 1 week, a one-time payment unless you choose automatic renewal.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
Result
This is the last result worked out. Fix the input above to update it.
Step by step
Triples
| a | b | c | Primitive | m, n, k |
|---|
As the hypotenuse
| a | b | c | Primitive | m, n, k |
|---|
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
About the Pythagorean Theorem Calculator
Type two sides of a right triangle and get the third with the Pythagorean theorem, a² + b² = c², worked step by step. The answer comes as a simplified surd as well as a decimal — legs of 4 and 6 give a hypotenuse of √52 = 2√13 ≈ 7.2111 — and it stays exact when you type fractions or roots such as 1/3 or √2. You also get the triangle’s angles, area, perimeter and the height to the hypotenuse, with a drawing that can show the squares on the three sides.
Three more modes use the same idea. Check a triangle applies the converse: for any three lengths it compares the square of the longest side with the sum of the other two squares, and tells you whether the triangle is right-angled, acute or obtuse. Box diagonal finds the diagonals of a box or room in two Pythagoras steps. Pythagorean triples lists every whole-number triple up to a size, builds one from Euclid’s formula, or finds all the triples that contain a number you choose.
Without a pass, the free preview shows the missing side in full, with the first step of the working, the first rows of a list of triples and the drawing marked as a preview; the other figures, the rest of the working and the triples, Copy and Download need a Pro pass.
How to use it
- Choose “Find a side”, type the two sides you know, and leave the one you want empty — the hypotenuse c is the side opposite the right angle.
- Read the missing side as an exact surd and as a decimal; the steps show the squares being added (or subtracted for a leg).
- To test three lengths, choose “Check a triangle”; for a box or room, “Box diagonal”; for whole-number triples, “Pythagorean triples”.
- Choose the unit and decimal places, then copy or download the working, or download the list of triples as CSV — with a pass, or after unlocking this result.
Examples
a = 3, b = 4
c = 5
c² = 3² + 4² = 9 + 16 = 25, so c = √25 = 5.
a = 2, b = 3
c = √13 ≈ 3.6056
2² + 3² = 13, which is not a perfect square, so c stays √13.
a = 7, c = 10
b = √51 ≈ 7.1414
b² = c² − a² = 100 − 49 = 51.
6, 8, 10 · 4, 5, 6 · 2, 3, 4
right · acute · obtuse
10² = 100 = 36 + 64; 6² = 36 < 16 + 25; 4² = 16 > 4 + 9.
2 × 3 × 6
D = 7
Floor diagonal d² = 2² + 3² = 13; then D² = 13 + 6² = 49.
m = 5, n = 2
21, 20, 29
m² − n² = 21, 2mn = 20, m² + n² = 29, and 21² + 20² = 841 = 29².
Common uses
- Checking right-triangle homework, with exact surd answers as textbooks give them.
- Finding the length of a ladder, ramp, roof rafter or diagonal brace from the rise and the run.
- Testing whether a corner is square on site with the 3-4-5 rule (or 6-8-10 for larger corners).
- Working out whether a long object fits in a box, car boot or room (the space diagonal).
The theorem and its converse
In a right triangle the square on the hypotenuse equals the sum of the squares on the other two sides: a² + b² = c² (Euclid, Elements I.47). The converse is also true (I.48): if three lengths satisfy a² + b² = c², the angle opposite c is a right angle. Comparing c² with a² + b² for the longest side c tells you more: if c² is smaller the triangle is acute, if it is larger the triangle is obtuse. For triangles that are not right-angled, the law of cosines c² = a² + b² − 2ab cos C takes over.
Exact answers and simplified surds
A square root is simplified by taking out square factors: √52 = √(4 × 13) = 2√13, and √(13/36) = √13/6. The calculator does this exactly whenever the sides you type are whole numbers, decimals, fractions or square roots — decimals such as 1.5 are read as 3/2, so 1.5² + 2² = 6.25 gives exactly 2.5. In “Check a triangle” the comparison of c² with a² + b² is also exact, so 0.3, 0.4, 0.5 is reported as right-angled while 1, 1, 1.414 is (just) acute.
Pythagorean triples and Euclid’s formula
A Pythagorean triple is three whole numbers with a² + b² = c², such as 3, 4, 5. It is primitive when the three have no common factor. Euclid’s formula a = m² − n², b = 2mn, c = m² + n² (Elements X, Lemma 1 before Proposition 29) gives every primitive triple exactly once when m > n ≥ 1 have no common factor and one of them is even; every other triple is a multiple k of a primitive one. There are 16 primitive triples with a hypotenuse up to 100, and 52 triples in all.
Limitations
- The theorem holds for right triangles in flat (Euclidean) geometry. For long distances on the Earth’s surface, use a great-circle formula instead.
- Lengths must be positive and at most 10¹² in the chosen unit; decimals are rounded only for display.
- Lists of triples go up to a hypotenuse of 5,000, and the search for a given number up to 1,000,000.
Privacy
On this device: nothing is sent
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What do I get without a pass?
Without a pass, Pythagorean Theorem Calculator shows the missing side in full, with the first step of the working, the first rows of the triples and a watermarked drawing; every other figure is hidden. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment unless you choose automatic renewal, unlocks the full result. The pricing page lists the passes and their prices.
How do I find the hypotenuse of a right triangle?
Square the two legs, add them and take the square root: c = √(a² + b²). For legs 5 and 12, c = √(25 + 144) = √169 = 13. If the sum is not a perfect square, the exact answer is a surd: legs 2 and 3 give √13 ≈ 3.6056.
How do I find a missing leg?
Subtract instead of adding: a = √(c² − b²). With a hypotenuse of 13 and a leg of 12, the other leg is √(169 − 144) = √25 = 5. The hypotenuse must be the longest side, otherwise there is no such triangle.
How can I tell whether a triangle has a right angle?
Square the longest side and compare it with the sum of the squares of the other two. Equal means a right angle (6, 8, 10: 100 = 36 + 64). If the longest side’s square is smaller the triangle is acute; if larger, obtuse. This is the converse of the Pythagorean theorem.
What is the 3-4-5 rule?
Builders check that a corner is square by measuring 3 units along one side and 4 along the other: if the diagonal between the marks is exactly 5, the corner is 90°, because 3² + 4² = 5². Any multiple works too — 6-8-10 or 30-40-50 cm for bigger corners.
What are primitive Pythagorean triples?
Triples whose three numbers share no common factor, such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25. Triples such as 6-8-10 are multiples of a primitive one. In a primitive triple one leg is even and the other leg and the hypotenuse are odd.
Does a² + b² = c² work for any triangle?
Only for right triangles, with c the side opposite the right angle. For other triangles use the law of cosines, c² = a² + b² − 2ab cos C, which reduces to Pythagoras when C = 90° because cos 90° = 0.