Pythagorean Theorem

Need to solve a right triangle? Our free Pythagorean Theorem Calculator makes it easy to find any missing side. Whether you're calculating the hypotenuse from two legs, finding a missing leg from the hypotenuse and one side, or working with coordinates to find distance, this tool provides instant, accurate results. Perfect for students learning geometry, carpenters squaring corners, builders calculating diagonal measurements, engineers analyzing structures, or anyone who needs to solve right triangles. The calculator handles Pythagorean triples, special triangles (45-45-90 and 30-60-90), and shows both exact answers (with square roots) and decimal approximations. All calculations happen instantly in your browser with clear step-by-step work shown. No signups, no limits, completely free.

What is Pythagorean Theorem?

The Pythagorean theorem is one of the most important principles in geometry, describing the fundamental relationship between the three sides of a right triangle. In mathematical terms, if a right triangle has legs of lengths 'a' and 'b', and a hypotenuse of length 'c', then a² + b² = c². This means the area of the square built on the hypotenuse equals the sum of the areas of the squares built on the two legs. Our calculator implements this relationship precisely, allowing you to solve for any missing side. The calculator handles various input scenarios: Finding the hypotenuse when both legs are known (c = √(a² + b²)), Finding a missing leg when the hypotenuse and one leg are known (a = √(c² - b²)), Working with coordinate points to find distances using the distance formula (which is derived from the Pythagorean theorem), and Identifying Pythagorean triples and special right triangles (45-45-90 and 30-60-90). The calculator validates inputs to ensure they form valid triangles and provides both exact symbolic answers and numerical approximations.

Key features

Our calculator finds any missing side of a right triangle (hypotenuse or leg), provides both exact answers with radicals and decimal approximations, automatically identifies Pythagorean triples (3-4-5, 5-12-13, etc.), recognizes special right triangles (45-45-90 and 30-60-90), includes coordinate distance formula calculation, validates inputs to ensure valid right triangles exist, and shows step-by-step calculation work for educational use.

How it works

Using the Pythagorean Theorem Calculator is simple: First, select what you want to calculate. Choose from finding the hypotenuse (when both legs are known), finding a missing leg (when hypotenuse and one leg are known), or calculating distance between two coordinate points. Next, enter your known values. Input the side lengths or coordinates in the appropriate fields. The calculator accepts decimal numbers and validates that inputs are positive and form valid triangles. Then click Calculate. The calculator applies the Pythagorean theorem formula: For hypotenuse: c = √(a² + b²), For missing leg: a = √(c² - b²), For coordinate distance: d = √[(x₂-x₁)² + (y₂-y₁)²]. The tool performs the calculations with high precision and displays the results. Finally, review your results. The calculator shows: The exact answer (with square roots when applicable), Decimal approximation to multiple decimal places, Step-by-step calculation work, Identification of Pythagorean triples if applicable, Recognition of special triangles (45-45-90 or 30-60-90). Copy any result with one click for use in homework, projects, or professional work.

Common use cases

Geometry students apply the Pythagorean theorem to solve right triangle problems in homework and exams. Carpenters and construction workers calculate diagonal measurements and ensure corners are square. Architects and engineers verify right angles in structural design and blueprints. Surveyors measure distances and heights using triangulation methods. Physics students calculate vector magnitudes and distances in coordinate systems. Computer graphics developers calculate distances between points in 2D and 3D space. Navigation applications compute shortest distances between GPS coordinates.

Why use Pythagorean Theorem

Instant Accurate Results - No need for manual calculation or expensive calculators. Get precise answers in milliseconds with step-by-step work shown. Exact and Approximate Answers - The calculator provides both exact symbolic answers (with radicals) and decimal approximations, useful for different contexts (exact form for math homework, decimals for construction). Input Validation - The calculator checks that your inputs form valid right triangles. If you enter a hypotenuse shorter than a leg, it alerts you immediately that no such triangle can exist. Special Triangle Recognition - Automatically identifies Pythagorean triples (like 3-4-5) and special right triangles (45-45-90 and 30-60-90), providing exact ratios and additional properties. Coordinate Distance - Built-in distance formula calculation derived from the Pythagorean theorem, useful for coordinate geometry problems. Educational Value - Students can verify their manual calculations, understand the step-by-step process, and learn to recognize patterns in right triangles. Professional Applications - Carpenters, builders, and engineers can quickly calculate diagonal measurements, verify corners are square, and solve structural problems. Free & Accessible - No software installation or expensive graphing calculator needed. Access professional-grade right triangle solving from any device with a web browser.

Who should use this tool

Students - Middle school through college students studying geometry, algebra, and trigonometry use this tool for homework, exam preparation, and concept mastery. Great for checking work and understanding the Pythagorean theorem. Math Teachers & Tutors - Create lesson materials, generate practice problems, and demonstrate Pythagorean theorem applications. Verify student solutions and illustrate geometric principles. Carpenters & Woodworkers - Essential for ensuring corners are square using the 3-4-5 method, calculating diagonal measurements for cabinets and furniture, and determining rafter lengths for roofing projects. Builders & Contractors - Calculate foundation diagonals to ensure rectangular layouts, determine staircase dimensions, and solve various right triangle problems in construction. Engineers - Civil, mechanical, and structural engineers use right triangle calculations for force analysis, vector components, structural design, and measurement problems. Architects - Calculate roof pitches, stair angles, bracing requirements, and spatial relationships in building design. DIY Enthusiasts & Homeowners - Plan home improvement projects, calculate material needs, ensure corners are square when laying tile or building decks. Surveyors & Navigators - Calculate distances and angles in land surveying and navigation problems. Computer Graphics & Game Developers - Calculate distances between points, collision detection, and 3D positioning using the principles underlying this calculator. Test Prep Students - SAT, ACT, GRE, and other standardized tests feature Pythagorean theorem problems. Practice with instant feedback and step-by-step solutions.

How to get started

Enter two known sides of your right triangle—either both legs (a and b) or one leg and the hypotenuse. Input the known lengths as positive numbers in any consistent unit (inches, meters, etc.). Leave the third side field blank or marked as unknown. Click Calculate to solve for the missing side using a² + b² = c². Review the step-by-step calculation showing the theorem applied to your values. The result appears with the formula breakdown and square root calculation. Check that your answer is reasonable—hypotenuse should be longer than either leg. Useful for right triangle verification, measurements, and math problems.

Best practices

Always verify you are working with a right triangle (90° angle) before applying the theorem. Use consistent units for all sides—convert all measurements to the same unit first. Double-check your inputs to ensure you have not swapped leg and hypotenuse values. Round final answers appropriately based on your measurement precision. For exact answers, leave in radical form when the result is not a perfect square. Verify your answer with the reverse calculation to check accuracy. Remember the triangle inequality theorem for validity checking.

Limitations to keep in mind

The Pythagorean theorem applies only to right triangles (triangles with a 90° angle). It will not work for acute or obtuse triangles—use the Law of Cosines instead. Input values must be positive lengths; negative numbers are not valid for geometric lengths. Very large or very small numbers may have floating-point precision limitations. This calculator is for 2D Euclidean geometry; it does not directly apply to spherical or hyperbolic geometry. Complex extension problems (distance in 3D space) require additional formulas beyond a² + b² = c².

Frequently asked questions

What is the Pythagorean theorem?

The Pythagorean theorem is a fundamental principle in geometry that describes the relationship between the three sides of a right triangle. The theorem states that in a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides (called legs). The formula is: a² + b² = c², where 'a' and 'b' are the lengths of the two legs, and 'c' is the length of the hypotenuse. For example, if a right triangle has legs of length 3 and 4, then: 3² + 4² = c² → 9 + 16 = c² → 25 = c² → c = 5. This theorem is named after the ancient Greek mathematician Pythagoras (c. 570-495 BCE), though the relationship was known to Babylonian and Indian mathematicians earlier. The theorem has been proven in hundreds of different ways and is one of the most important results in elementary geometry. It serves as the foundation for trigonometry, the distance formula in coordinate geometry, and has countless practical applications in construction, navigation, physics, and engineering.

How do I use the Pythagorean theorem to find the hypotenuse?

Finding the hypotenuse using the Pythagorean theorem is straightforward when you know both legs: Step 1 - Square each leg: a² and b². Step 2 - Add the squares: a² + b². Step 3 - Take the square root of the sum: c = √(a² + b²). Example: Find the hypotenuse of a right triangle with legs 6 and 8. Step 1: 6² = 36, 8² = 64. Step 2: 36 + 64 = 100. Step 3: c = √100 = 10. The hypotenuse is 10 units long. Special Case - 45-45-90 Triangle: For an isosceles right triangle (two equal legs), the hypotenuse equals leg × √2. If legs are both 5, hypotenuse = 5√2 ≈ 7.07. Using Our Calculator: Enter the two known leg lengths, select 'Find Hypotenuse', click Calculate, and get instant results with the calculation steps shown. The calculator handles any positive real numbers and provides exact answers (with radicals when applicable) and decimal approximations.

How do I find a missing leg when I know the hypotenuse and one leg?

When you know the hypotenuse and one leg, rearrange the Pythagorean theorem to solve for the missing leg: Rearranged Formula: a² = c² - b², therefore a = √(c² - b²). Or b² = c² - a², therefore b = √(c² - a²). Steps: Step 1 - Square the hypotenuse: c². Step 2 - Square the known leg: a² (or b²). Step 3 - Subtract: c² - a². Step 4 - Take the square root: b = √(c² - a²). Example: Find the missing leg when hypotenuse is 13 and one leg is 5. Step 1: 13² = 169. Step 2: 5² = 25. Step 3: 169 - 25 = 144. Step 4: √144 = 12. The missing leg is 12 units. Important: The hypotenuse must be longer than either leg. If c ≤ a (or c ≤ b), the triangle cannot exist, and you'll get an error or imaginary result. Our calculator automatically validates this - if you enter a hypotenuse shorter than a leg, it alerts you that no such right triangle can exist.

What are Pythagorean triples?

Pythagorean triples are sets of three positive integers (a, b, c) that satisfy the Pythagorean theorem: a² + b² = c². These represent right triangles with integer side lengths. Common Primitive Triples (where a, b, c share no common factors): 3-4-5 (9 + 16 = 25), 5-12-13 (25 + 144 = 169), 8-15-17 (64 + 225 = 289), 7-24-25 (49 + 576 = 625), 20-21-29 (400 + 441 = 841). Multiples of Triples: Any multiple of a Pythagorean triple is also a triple: 6-8-10 (2× 3-4-5), 9-12-15 (3× 3-4-5), 10-24-26 (2× 5-12-13). Generating Triples: For any positive integers m > n: a = m² - n², b = 2mn, c = m² + n². This generates all primitive triples. Why They Matter: Memorizing common triples speeds up problem-solving. Recognizing a 3-4-5 triangle lets you instantly know the hypotenuse is 5 without calculation. Construction: Builders use multiples like 6-8-10 or 9-12-15 to ensure corners are square. Our calculator recognizes when your inputs form a Pythagorean triple and highlights this special property.

What are real-world applications of the Pythagorean theorem?

The Pythagorean theorem has countless practical applications: Construction & Carpentry: Ensuring corners are square (90°) using the 3-4-5 method. Measuring diagonal bracing for stability. Calculating rafter lengths for roofs. Determining staircase dimensions. Ladder safety: How high will a ladder reach? Navigation & Mapping: Calculating straight-line distance between two points (distance formula). GPS systems use triangulation based on this principle. Aviation flight planning uses it for course calculations. Computer Graphics & Gaming: Calculating distances between objects in 2D and 3D space. Determining collision detection. Rendering graphics and animations. Physics & Engineering: Calculating vector components and resultants. Analyzing forces in structures. Optics and wave propagation calculations. Electrical engineering for impedance calculations. Everyday Life: TV/monitor size calculations (diagonal measurement). Finding the shortest path (diagonal across a rectangular field). Carpet and flooring measurements. Wallpaper and construction material estimates. The theorem is so fundamental that it appears in virtually every field involving measurement, space, or distance.

What is the converse of the Pythagorean theorem?

The converse of the Pythagorean theorem states: If a triangle has sides of length a, b, and c, and a² + b² = c², then the triangle is a right triangle with the right angle opposite side c. This converse is useful for: Testing if a triangle is right: Given three sides, check if they satisfy a² + b² = c². If yes, it's a right triangle. Determining if an angle is 90°: Without measuring angles, you can verify a corner is square by measuring the three sides and checking the relationship. Classifying triangles: If a² + b² > c², the triangle is acute (all angles < 90°). If a² + b² < c², the triangle is obtuse (one angle > 90°). Practical Example: A builder wants to check if a corner is square. They measure 3 feet from the corner along one wall, 4 feet along the other wall, and measure the diagonal between these points. If the diagonal is exactly 5 feet, the corner is perfectly square (90°). Our calculator can verify this: Enter sides 3, 4, and 5, and it confirms this forms a right triangle.

How does the Pythagorean theorem relate to the distance formula?

The distance formula is a direct application of the Pythagorean theorem in coordinate geometry. The Distance Formula: Given two points (x₁, y₁) and (x₂, y₂), the distance d between them is: d = √[(x₂ - x₁)² + (y₂ - y₁)²]. Connection to Pythagorean Theorem: Imagine a right triangle formed by: Horizontal leg: (x₂ - x₁) - the difference in x-coordinates. Vertical leg: (y₂ - y₁) - the difference in y-coordinates. Hypotenuse: d - the straight-line distance between points. Applying a² + b² = c²: (x₂ - x₁)² + (y₂ - y₁)² = d². Solving for d gives the distance formula. Example: Find distance between (1, 2) and (4, 6). Horizontal leg: 4 - 1 = 3. Vertical leg: 6 - 2 = 4. Distance: √(3² + 4²) = √25 = 5. 3D Extension: For points (x₁, y₁, z₁) and (x₂, y₂, z₂): d = √[(x₂-x₁)² + (y₂-y₁)² + (z₂-z₁)²]. This extends the Pythagorean theorem to three dimensions. Our calculator includes coordinate distance calculation, showing how the Pythagorean theorem applies in coordinate geometry.

What are special right triangles?

Special right triangles have fixed angle measures and consistent side ratios, making calculations easier: 45-45-90 Triangle (Isosceles Right Triangle): Angles: 45°, 45°, 90°. Side ratios: 1 : 1 : √2 (leg : leg : hypotenuse). If legs = 1, hypotenuse = √2 ≈ 1.414. If legs = 5, hypotenuse = 5√2 ≈ 7.07. Properties: Two legs are equal, hypotenuse = leg × √2. Common in squares (diagonal divides square into two 45-45-90 triangles). 30-60-90 Triangle: Angles: 30°, 60°, 90°. Side ratios: 1 : √3 : 2 (short leg : long leg : hypotenuse). If short leg = 1, long leg = √3 ≈ 1.732, hypotenuse = 2. If short leg = 4, long leg = 4√3 ≈ 6.928, hypotenuse = 8. Properties: Hypotenuse = 2 × short leg, long leg = short leg × √3. Short leg is opposite the 30° angle. Common in equilateral triangles (altitude divides it into two 30-60-90 triangles). Using Our Calculator: Enter any side of a special triangle, and the calculator recognizes the pattern and fills in all other values using the exact ratios, giving both exact forms (with radicals) and decimal approximations.

Related tools