About this calculator
The Pythagorean Theorem Calculator finds the hypotenuse or a missing leg in a right-angled triangle. It is useful for homework, construction sketches, distance checks, diagonal measurements, and any problem where two sides of a right triangle are known.
Pythagorean theorem calculator method
The calculator uses a^2 + b^2 = c^2, where c is the hypotenuse and a and b are the two shorter sides. To find a leg, the formula is rearranged by subtracting the known leg squared from the hypotenuse squared.
- a^2 + b^2 = c^2
- c = sqrt(a^2 + b^2)
- a = sqrt(c^2 - b^2)
- b = sqrt(c^2 - a^2)
How to use the Pythagorean theorem calculator
- Choose whether you need the hypotenuse, side a, or side b.
- Enter the two known side lengths.
- Check that c is the hypotenuse if you are finding a shorter side.
- Square the known sides.
- Add or subtract the squared values as required.
- Take the square root to get the missing side.
Worked examples
Classic 3-4-5 triangle
Input: a = 3, b = 4
Calculation: c = sqrt(3^2 + 4^2) = sqrt(25)
Result: c = 5
Find a shorter side
Input: b = 12, c = 13
Calculation: a = sqrt(13^2 - 12^2) = sqrt(25)
Result: a = 5
When Pythagoras applies
Pythagoras applies only to right-angled triangles. If the triangle does not contain a 90-degree angle, use the law of cosines or the general triangle calculator instead.
Common triples
Integer triples such as 3-4-5, 5-12-13, 8-15-17, and 7-24-25 are useful because they give exact whole-number right triangles.
Common mistakes to avoid
- Using the wrong side label
- Triangle formulas depend on matching sides with their opposite angles or with the correct right-triangle role. If a result looks impossible, recheck the labels before changing the formula.
- Forgetting triangle validity
- Not every set of side lengths can form a triangle. The longest side must be shorter than the sum of the other two sides.
- Rounding too early
- Keep extra decimal places while calculating, especially when using square roots, sine, cosine, or inverse trig. Round the final answer to the precision required.
Edge cases
- A right triangle must have one angle of exactly 90 degrees.
- The hypotenuse must be the longest side in a right triangle.
- Special triangle ratios only apply to exact 30-60-90 and 45-45-90 triangles.
- The sine rule can produce an ambiguous SSA case where two triangles are possible.
Limitations
This calculator is for educational maths support. It uses standard geometry and trigonometry formulas with decimal approximations. For exams, coursework, engineering, surveying, or construction, follow the required method, units, tolerances, and checking process.
Frequently asked questions
Which triangle calculator should I use?
Use Pythagoras or the right triangle calculator for right-angled triangles, special triangle calculators for exact 30-60-90 or 45-45-90 triangles, and the sine or cosine law calculators for non-right triangles.
What do sides a, b, and c mean?
In general triangle notation, side a is opposite angle A, side b is opposite angle B, and side c is opposite angle C. Some right-triangle pages also label c as the hypotenuse.
Why do triangle angles add to 180 degrees?
In ordinary flat Euclidean geometry, the interior angles of a triangle always add to 180 degrees. That rule is used throughout these calculators.
Can the calculator handle any units?
Yes for lengths, as long as all side inputs use the same unit. Area results are in square units based on the unit entered.
Why is my result impossible?
The inputs may not form a valid triangle, the hypotenuse may not be the longest side, or a side may have been paired with the wrong angle.
Related calculators
- Right Triangle Calculator
- SOHCAHTOA Calculator
- Triangle Calculator