Pythagorean Theorem and Right Triangle Calculator
Enter any two sides of a right triangle to find the missing side, angles, area, perimeter, altitude, inradius, and circumradius.
Pythagorean theorem formulas
For a right triangle with legs a and b and hypotenuse c, the Pythagorean theorem is a²+b²=c². The missing side formulas are:
- c=√(a²+b²) when both legs are known.
- a=√(c²−b²) when b and c are known.
- b=√(c²−a²) when a and c are known.
The acute angles are A=atan(a/b) and B=90°−A. Area is ab/2, perimeter is a+b+c, altitude to the hypotenuse is ab/c, inradius is (a+b−c)/2, and circumradius is c/2.
Checked examples
| Known sides | Missing side | Area | Acute angles |
|---|---|---|---|
| a=3, b=4 | c=5 | 6 | 36.8699°, 53.1301° |
| a=5, b=12 | c=13 | 30 | 22.6199°, 67.3801° |
| a=8, b=15 | c=17 | 60 | 28.0725°, 61.9275° |
| a=6, c=10 | b=8 | 24 | 36.8699°, 53.1301° |
| b=24, c=25 | a=7 | 84 | 16.2602°, 73.7398° |
| a=1, b=1 | c=√2≈1.41421 | 0.5 | 45°, 45° |
| a=0.3, b=0.4 | c=0.5 | 0.06 | 36.8699°, 53.1301° |
| a=9, b=40 | c=41 | 180 | 12.6804°, 77.3196° |
How to use the calculator
- Select a length unit or leave the generic “units” option.
- Enter exactly two known sides in the same unit.
- Leave the side you want to calculate blank.
- Select Solve right triangle and review the complete geometry and Pythagorean check.
Limits and interpretation
- All entered sides must be positive and use the same unit.
- The hypotenuse must be longer than either known leg.
- Each side may be no greater than 1e100.
- The missing-leg calculation uses √((c−leg)(c+leg)) to reduce precision loss when the leg is close to the hypotenuse.
- Displayed values use approximately 14 significant digits and JavaScript double-precision arithmetic.
- This calculator assumes a 90° angle. It is not a general oblique-triangle solver.
Frequently asked questions
How do I identify the hypotenuse?
It is the side opposite the right angle and is always the longest side of a right triangle.
Can I calculate a missing leg?
Yes. Enter the hypotenuse and the other leg, then leave the unknown leg blank.
Does the unit change the formula?
No. Use one consistent length unit for all sides. The area result uses the corresponding square unit.
Is every set of three sides a right triangle?
No. A right triangle must satisfy a²+b²=c² with c as its longest side. This tool asks for two sides and constructs the matching right triangle.
Related calculators
Use the Square Root Calculator to simplify radicals, the Ramp Calculator for rise, run, slope and ramp length, or the Square Footage Calculator for rectangular areas.