Pythagorean Theorem Calculator
: Solve a right triangle from two sides, a side and an angle, or as a 45-45-90 or 30-60-90 triangle, with the exact root, the angles and the working- Hypotenuse c
- 5
- c = √(a² + b²): the side opposite the right angle, always the longest.
- Working
- c² = a² + b² = 3² + 4² = 9 + 16 = 25 c = √25 = 5
- Sides
- a = 3, b = 4, c = 5
- Legs a and b meet at the right angle; the hypotenuse c is opposite it. Angle A is opposite leg a.
- Angle A
- ≈ 36.869898°
- ≈ 0.643501 rad. arctan(a ÷ b): the angle opposite leg a.
- Angle B
- ≈ 53.130102°
- ≈ 0.927295 rad. arctan(b ÷ a), or 90° - A: the angle opposite leg b.
- Area
- 6
- a × b ÷ 2: half the rectangle on the two legs.
- Perimeter
- 12
- a + b + c.
- Altitude to the hypotenuse
- 12/5 = 2.4
- h = a × b ÷ c: from the right angle, at right angles to the hypotenuse.
- Hypotenuse segments
- 9/5 = 1.8 and 16/5 = 3.2
- The altitude cuts c into a² ÷ c (next to leg a) and b² ÷ c (next to leg b); they add up to c.
- Inradius
- 1
- r = (a + b - c) ÷ 2: the radius of the circle that touches all three sides.
- Circumradius
- 5/2 = 2.5
- R = c ÷ 2: the hypotenuse is a diameter of the circle through the three corners.
- Triple
- (3, 4, 5), primitive
- A Pythagorean triple: three whole numbers with a² + b² = c² and no common factor.
Pythagorean Theorem Calculator
A Pythagorean theorem calculator for right triangles: give two sides and it finds the third, give all three and it checks whether they make a right angle. It works as a hypotenuse calculator and as a right triangle calculator or right triangle solver, from two sides, from a side and an angle, or for a 45-45-90 or 30-60-90 triangle. Sides can be whole numbers, decimals, fractions or roots, and the answer comes in simplest root form with a rounded decimal and the working in your own numbers.
How to use the Pythagorean theorem calculator
- Pick what you know beside
Solve from:Two or three sides,A side and an angle, or45-45-90 or 30-60-90. - For
Two or three sides, fill any two ofLeg a,Leg bandHypotenuse cto find the third, or fill all three to check for a right angle. Roots such as√2or3√5and fractions such as3/4are accepted. - For
A side and an angle, choose theKnown side, type itsLengthandAngle A(the angle opposite leg a), and setAngle into degrees or radians. For45-45-90 or 30-60-90, choose theTriangle, theKnown sideand itsLength. - Read the missing side at the top.
Workingshows the formula with your numbers; the rows below give the angles, area, perimeter, altitude to the hypotenuse, inradius and circumradius, with a drawing to scale. The Example button fills one example for the mode you are in.
Example
Legs 3 and 6: the hypotenuse, the working and the other figures the tool gives.
Solve from: Two or three sides
Leg a: 3
Leg b: 6Hypotenuse c: 3√5 ≈ 6.708204
Angle A: ≈ 26.565051°
Angle B: ≈ 63.434949°
Area: 9
Perimeter: 9 + 3√5 ≈ 15.708204
Altitude to the hypotenuse: 6√5/5 ≈ 2.683282
Inradius: 4.5 - 3√5/2 ≈ 1.145898
Circumradius: 3√5/2 ≈ 3.354102
Working:
c² = a² + b²
= 3² + 6²
= 9 + 36
= 45
c = √45 = 3√5 ≈ 6.708204Details
- The Pythagorean theorem says that in a right triangle the squares on the two legs add up to the square on the hypotenuse: a² + b² = c². The hypotenuse is the side opposite the right angle, and it is always the longest. To find it, add the squares and take the root, c = √(a² + b²). Legs 7 and 9 give c² = 49 + 81 = 130, so c = √130 ≈ 11.401754. To find a leg, subtract instead: b = √(c² - a²). With a hypotenuse of 2 and a leg of 1, b² = 4 - 1 = 3 and b = √3 ≈ 1.732051.
- Answers stay exact. The tool keeps each side as its exact square, so legs 3 and 6 give c² = 45 and c = 3√5 ≈ 6.708204, not just a decimal. You can type a side as a whole number, a decimal, a fraction (
3/4) or a root (√2,3√5,sqrt(2),1/√2), and the squares, sums and differences are worked out exactly before any rounding. - With all three sides filled, the tool applies the converse of the theorem: if a² + b² equals c² exactly, the triangle is right-angled. The longest side is taken as c even if it sits in another field, and a note says so. Sides 10, 24 and 26 give 100 + 576 = 676 = 26², so the result reads "Yes, a right triangle". Sides 8, 15 and 16 give 64 + 225 = 289, which is more than 256, so the result is "No, acute"; if the sum were smaller than c² the triangle would be obtuse. Three lengths that cannot close into a triangle are refused.
- A right triangle has one 90° angle, so the other two share the remaining 90°. From two sides the tool finds angle A, opposite leg a, as arctan(a ÷ b) and angle B as the rest: legs 3 and 6 give ≈ 26.565051° and ≈ 63.434949°. In the side-and-angle mode you give one side and angle A, and it uses sine, cosine and tangent: a hypotenuse of 10 with A = 35° gives leg a ≈ 5.735764 and leg b ≈ 8.19152. Angles of exactly 30°, 45° and 60° (also typed as π/6, π/4, π/3) are solved with exact roots; any other angle is rounded.
- A 45-45-90 triangle is half a square, so its two legs are equal and its sides are in the ratio x : x : x√2. A leg of 7 gives a hypotenuse of 7√2 ≈ 9.899495; from the hypotenuse, divide by √2 to get each leg. A 30-60-90 triangle is half an equilateral triangle, with sides in the ratio x : x√3 : 2x, where x is the short leg opposite the 30° angle. A short leg of 5 gives a long leg of 5√3 ≈ 8.660254 and a hypotenuse of 10. The mode solves either triangle from any one side, and the other modes spot these triangles from the numbers and say so.
- Below the answer, every mode lists the same figures. Area is a × b ÷ 2. Perimeter is a + b + c; when the roots do not combine it is written as its terms and rounded, such as 9 + 3√5 ≈ 15.708204. The altitude to the hypotenuse is a × b ÷ c, and the tool also gives the two pieces it cuts the hypotenuse into. The inradius is (a + b - c) ÷ 2 and the circumradius is c ÷ 2, because the hypotenuse is a diameter of the circle through the corners. For 3, 4 and 5 these are 12/5 = 2.4, 1 and 5/2 = 2.5.
- When all three sides are whole numbers the tool adds a Pythagorean triple row. 3, 4, 5 is shown as (3, 4, 5), primitive, meaning no common factor, and 6, 8, 10 as (6, 8, 10) = 2 × (3, 4, 5), a primitive triple scaled up. Sides 10, 24, 26 are the same kind: (10, 24, 26) = 2 × (5, 12, 13).
Limits
- Right triangles only. A triangle with no right angle needs the law of cosines, not the Pythagorean theorem. If you give three sides that make a triangle that is not right, the tool says acute or obtuse and gives the largest angle, but not the other figures; the Area Calculator's
Triangle: three sidesgives their area. - There are no units: use one unit for all the sides and read the area in that unit squared. It does not solve from the area or the altitude, and it does not list triples up to a limit.
- Angles come from trigonometry unless they are exactly 30°, 45° or 60°, so they are rounded to 6 decimals and marked ≈. Angle A must be more than 0° and less than 90°, and each side must be more than 0. A leg that is not shorter than the hypotenuse is refused: "Leg a must be shorter than the hypotenuse c (5): the hypotenuse is the longest side of a right triangle, opposite the right angle. A leg as long as the hypotenuse would leave the other leg 0." The Example button fills one example for the mode you are in, not the whole list.
FAQ
How do you find the hypotenuse of a right triangle?
Square both legs, add the squares and take the square root: c = √(a² + b²). For legs 3 and 4 that is √25 = 5, and for legs 3 and 6 it is √45 = 3√5 ≈ 6.708204. Leave the hypotenuse field empty and the calculator does this for you.
Why can a leg not be as long as the hypotenuse?
The hypotenuse is the longest side of a right triangle, and c² - a² has to leave something for the other leg. The tool refuses it and says: "Leg a must be shorter than the hypotenuse c (5): the hypotenuse is the longest side of a right triangle, opposite the right angle. A leg as long as the hypotenuse would leave the other leg 0."
What is a Pythagorean triple?
Three whole numbers with a² + b² = c². 3, 4, 5 is primitive, with no common factor: (3, 4, 5), primitive. Multiplying all three by the same number gives another, such as (6, 8, 10) = 2 × (3, 4, 5). The tool shows this row whenever all three sides are whole.
How do you check if a triangle is a right triangle?
Fill all three sides and compare a² + b² with c², the converse of the theorem. Sides 10, 24, 26 give yes, a right triangle; sides 8, 15, 16 give no, acute, because 289 is more than 256.
What are the sides of a 45-45-90 and a 30-60-90 triangle?
A 45-45-90 triangle has sides x, x, x√2, so a leg of 7 gives a hypotenuse of 7√2 ≈ 9.899495. A 30-60-90 triangle has sides x, x√3, 2x, so a short leg of 5 gives 5√3 ≈ 8.660254 and 10. Use the 45-45-90 or 30-60-90 mode.
Runs entirely in your browser. Nothing is uploaded.