Pythagorean Theorem Calculator - CalcVenue

Pythagorean Theorem Calculator

Please provide any 2 values below to solve the Pythagorean equation: a² + b² = c². Each side may be entered as a whole number, a decimal, or a multiple of a square root.

Pythagorean Theorem Calculator: Solve a² + b² = c²

A Pythagorean theorem calculator finds the missing side of a right triangle when you know the other two. Enter any two of the three sides and it solves the third, but this calculator goes considerably further than a single number: it returns the answer in exact radical form where one exists, then gives both acute angles in degrees, degrees-minutes-seconds, and radians, along with the triangle's area, perimeter, and the altitude to the hypotenuse - plus a step-by-step derivation you can follow or check by hand.

The theorem is one of the oldest and most widely used results in mathematics. It underpins distance measurement, navigation, construction layout, computer graphics, and vast areas of physics and engineering. Any time you need to relate a diagonal to two perpendicular directions, you are using it - whether you are squaring up a foundation, computing the length of a roof rafter, or measuring the distance between two points on a coordinate plane.

What Is the Pythagorean Theorem?

The Pythagorean theorem, also known as Pythagoras' theorem, is a fundamental relation between the three sides of a right triangle - a triangle in which one angle is exactly 90°. It states that the area of the square formed on the longest side (the hypotenuse) equals the sum of the areas of the squares formed on the other two sides, which are called the legs.

Writing the hypotenuse as c and the two legs as a and b:

a² + b² = c²

This is known as the Pythagorean equation. Its usefulness is immediate: if any two sides of a right triangle are known, the third follows directly. Rearranged for each side:

  • c = √(a² + b²) - solve for the hypotenuse from the two legs.
  • a = √(c² − b²) - solve for a leg from the hypotenuse and the other leg.
  • b = √(c² − a²) - likewise for the other leg.

One constraint matters when solving for a leg: the hypotenuse is always the longest side, so c must be strictly greater than whichever leg you supply. If it is not, no right triangle exists with those measurements and the calculator will say so rather than return a meaningless result.

How to Use This Calculator

Each side has two boxes: a coefficient on the left and a radicand under the square-root sign on the right. This lets you enter values that a single box cannot express exactly.

  • For a plain number such as 5, type 5 in the left box and leave the radical box empty.
  • For √3, leave the left box empty and type 3 under the radical.
  • For 2√5, type 2 on the left and 5 under the radical.
  • Decimals such as 1.5 work in either box.

Fill in exactly two of the three sides and press Calculate. If you enter all three, the calculator uses the first two and solves for the remaining one, so the result is always internally consistent.

Why Exact Radical Answers Matter

Most right triangles do not have tidy whole-number sides. A triangle with legs of 1 and 1 has a hypotenuse of √2, which is irrational - its decimal expansion never terminates or repeats. Rounding it to 1.414 introduces a small error, and if that rounded value feeds into further calculations, the error compounds.

This calculator keeps the answer exact whenever it can. Legs of 2 and 4 give a hypotenuse of exactly 2√5, not merely 4.4721. Legs of 3√2 and 4√2 give exactly 5√2. The decimal is still shown alongside for practical use, but the exact form is the mathematically correct answer and the one expected in most coursework.

The calculator simplifies radicals fully, extracting any perfect-square factors: √50 becomes 5√2, and √20 becomes 2√5. It also rationalizes denominators, so the altitude of a triangle with legs 2 and 3 is reported as 6√13/13 rather than the unsimplified 6/√13.

What the Calculator Returns

The missing side, in exact form where one exists, with the decimal value alongside.

Both acute angles (α opposite side a, β opposite side b), each given in decimal degrees, in degrees-minutes-seconds, and in radians. Angles that work out to 30°, 45°, or 60° also show their exact radian value as a fraction of π. The two acute angles always sum to 90°, since the third angle takes the remaining 90°.

Area, computed as (a × b) ÷ 2. In a right triangle the two legs are perpendicular, so one serves as the base and the other as the height - no separate height measurement is needed.

Perimeter, the sum of all three sides. Where all three share a common radical the sum is given exactly; otherwise a decimal is shown, since sums of unlike radicals cannot be combined.

Altitude to the hypotenuse (h), the perpendicular distance from the right angle to the hypotenuse, equal to (a × b) ÷ c. This line divides the original triangle into two smaller triangles, each similar to the original and to each other - a relationship that underlies many geometric proofs.

Calculation steps, shown on request, laying out the substitution and simplification so you can verify the result or reproduce the method on a similar problem.

Pythagorean Triples

A Pythagorean triple is a set of three positive integers that satisfy the equation exactly. These are prized because every side comes out whole, with no radicals or rounding. The most familiar is 3, 4, 5: since 9 + 16 = 25, a triangle with legs 3 and 4 has a hypotenuse of exactly 5.

Common primitive triples (those whose three numbers share no common factor) include:

  • 3, 4, 5 - the classic, and the basis of the builder's "3-4-5 rule" for squaring corners.
  • 5, 12, 13
  • 8, 15, 17
  • 7, 24, 25
  • 20, 21, 29
  • 9, 40, 41

Any multiple of a triple is also a triple: 6-8-10, 9-12-15, and 30-40-50 are all scalings of 3-4-5 and describe triangles of the same shape at different sizes. Triples can be generated systematically with Euclid's formula: for integers m > n > 0, the values a = m² − n², b = 2mn, and c = m² + n² always form one. Taking m = 2 and n = 1 produces 3, 4, 5.

Special Right Triangles

Two right triangles appear so often that their side ratios are worth memorizing.

The 45-45-90 triangle is half of a square, cut along the diagonal. Its two legs are equal and its sides are in the ratio 1 : 1 : √2. Legs of 1 and 1 give a hypotenuse of √2, and both acute angles are 45° (π/4 radians).

The 30-60-90 triangle is half of an equilateral triangle, cut down the middle. Its sides are in the ratio 1 : √3 : 2, with the shortest side opposite the 30° angle and the hypotenuse exactly twice that length. Entering a leg of 1 and a hypotenuse of 2 returns the other leg as √3 and the angles as 30° (π/6) and 60° (π/3).

Real-World Applications

Construction and carpentry. The 3-4-5 rule is the standard field method for checking a right angle. Measure 3 units along one wall and 4 along the other; if the diagonal between those marks is exactly 5, the corner is square. Builders use multiples such as 6-8-10 or 12-16-20 for larger layouts, where the greater distances make the check more sensitive.

Roofing. A rafter forms the hypotenuse of a right triangle whose legs are the horizontal run and the vertical rise. Knowing the run and the desired rise gives the rafter length directly.

Navigation and surveying. Straight-line distance between two points with known north-south and east-west separations is exactly the hypotenuse calculation. This is also the basis of the distance formula in coordinate geometry, which is the Pythagorean theorem applied to the differences in x and y: d = √((x₂ − x₁)² + (y₂ − y₁)²).

Screen and display sizes. A television or monitor is measured diagonally, which is the hypotenuse of its width and height. A 16:9 screen 48 inches wide and 27 inches tall has a diagonal of about 55 inches.

Ladder safety. With the base a known distance from a wall and the ladder reaching a known height, the required ladder length is the hypotenuse - and conversely, a ladder of fixed length reaches a predictable height for any given base distance.

Physics and engineering. Combining perpendicular vector components - velocity, force, acceleration - into a resultant magnitude is a direct application. So is computing impedance in AC circuits from resistance and reactance.

Computer graphics. Distance between points, collision detection, lighting calculations, and normalizing vectors all rely on it, executed millions of times per second in any 3D renderer.

Proving the Theorem

The Pythagorean theorem has attracted more distinct proofs than perhaps any other result in mathematics - several hundred are catalogued, contributed by mathematicians, students, and at least one U.S. president.

A particularly clean one is the rearrangement proof. Take four identical right triangles with legs a and b and arrange them inside a square of side (a + b), leaving a tilted square of side c in the middle. The large square has area (a + b)². The four triangles together occupy 4 × (ab/2) = 2ab. So the middle square has area (a + b)² − 2ab = a² + 2ab + b² − 2ab = a² + b². Since that middle square has side c, its area is also c² - giving a² + b² = c².

Another approach uses similar triangles. Dropping the altitude from the right angle to the hypotenuse splits the triangle into two smaller ones, each similar to the original. Writing the resulting proportions and combining them yields the theorem directly - and the same construction gives the altitude formula h = ab/c that this calculator reports.

The Converse and Triangle Classification

The converse is equally useful: if a triangle's sides satisfy a² + b² = c², then the triangle is right-angled. This is what makes the 3-4-5 field check valid - it does not merely describe a known right angle, it proves one.

Comparing a² + b² against c², where c is the longest side, also classifies any triangle:

  • If a² + b² = c², the triangle is right.
  • If a² + b² > c², the triangle is acute - all three angles are less than 90°.
  • If a² + b² < c², the triangle is obtuse - one angle exceeds 90°.

For triangles that are not right-angled, the law of cosines generalizes the relationship: c² = a² + b² − 2ab·cos(C). When C is 90°, cos(C) is zero and the final term vanishes, recovering the Pythagorean theorem as a special case.

Common Mistakes

Misidentifying the hypotenuse. The hypotenuse is always opposite the right angle and always the longest side. Substituting a leg where c belongs produces a negative value under the radical and no valid triangle.

Adding when you should subtract. Use addition only when solving for the hypotenuse. Solving for a leg requires subtraction: a = √(c² − b²).

Forgetting to take the square root. The equation gives c², not c. Stopping at 25 instead of 5 is among the most frequent slips.

Applying it to non-right triangles. The theorem holds only when one angle is exactly 90°. For other triangles, use the law of cosines.

Mixing units. All three sides must be in the same unit. Combining feet with inches produces a meaningless result.

Frequently Asked Questions

Can I use this calculator if I only know one side?

No - two values are required. A single side does not determine a right triangle, because infinitely many right triangles share any given side. If you know one side and one acute angle, use trigonometry (sine, cosine, or tangent) instead.

Why does it say my values are invalid?

Most often because the value entered for c is not larger than the leg you supplied. The hypotenuse must be the longest side, so c must exceed both a and b. If c is smaller than or equal to a leg, no right triangle exists with those measurements.

How do I enter a value like 3√7?

Type 3 in the left box and 7 in the box under the radical sign. Leaving the left box empty means a coefficient of 1, so √7 alone needs only the radical box filled. Leaving the radical box empty means a radicand of 1, so a plain number needs only the left box.

What is the altitude to the hypotenuse used for?

It is the shortest distance from the right angle to the hypotenuse, and it appears throughout geometry and engineering - in clearance calculations, in similar-triangle proofs, and wherever the perpendicular distance from a point to a line is needed. It equals the product of the legs divided by the hypotenuse.

Does the theorem work in three dimensions?

Yes, in extended form. The space diagonal of a rectangular box with edges a, b, and c is √(a² + b² + c²), which comes from applying the theorem twice - once in the base plane and once vertically. The same idea extends to any number of dimensions.

Who was Pythagoras, and did he discover this?

Pythagoras was a Greek philosopher and mathematician of the 6th century BC, and the theorem carries his name because his school is credited with an early proof. The relationship itself was known considerably earlier - Babylonian tablets from around 1800 BC list Pythagorean triples, and it appears in ancient Indian, Chinese, and Egyptian mathematics as well.

Why are some answers shown as radicals and others as decimals?

An exact radical form is shown whenever one exists - that is, when the values involved work out to whole numbers under the root. If the inputs are decimals that do not produce a clean radical, only the decimal value is given, since there is no simpler exact form to display.

Disclaimer

This Pythagorean Theorem Calculator is provided for educational and general informational purposes only. Results assume an exact right triangle and the values entered. For construction, engineering, or any application where accuracy affects safety, verify measurements independently and consult a qualified professional.