Calculators PlanetCalculators Planet
HomeFinancialMathHealthOtherBlogAboutContact
Calculators PlanetCalculators Planet

Fast, accurate, and user-friendly online calculators for all your needs.

Financial

  • Mortgage Calculator
  • Amortization Calculator
  • Mortgage Payoff Calculator
  • House Affordability Calculator
  • Rent Calculator

Math

  • Decimal to Fraction Calculator
  • Significant Figures Calculator
  • Percentage Calculator
  • Fraction Calculator
  • Ratio Calculator

Health

  • BMI Calculator
  • Ideal Weight Calculator
  • Body Fat Calculator
  • Calorie Calculator
  • Macro Calculator

Other

  • Age Calculator
  • Date Calculator
  • Time Calculator
  • Hours Calculator
  • Time Card Calculator

2026 Calculators Planet. All rights reserved.

BlogAboutContactPrivacy PolicyCookie PolicyTerms of ServiceDisclaimer
Calculators PlanetCalculators Planet
HomeFinancialMathHealthOtherBlogAboutContact
HomeMathPythagorean Theorem Calculator

Pythagorean Theorem Calculator

Solve for the missing side of any right triangle using a² + b² = c². Find the hypotenuse or either leg, plus the triangle area, perimeter, and both acute angles.

Share:
Pythagorean Theorem Calculator

a² + b² = c²

c = hypotenuse (longest side)

Hypotenuse (c)

5

c = √(3² + 4²) = √25

Triangle Area

6

square units

Perimeter

12

units

Angles
Angle A (opposite leg a)36.8699°
Angle B (opposite leg b)53.1301°
Right Angle C90°
Sum of Angles180.00°

Introduction

Carlos, a carpenter in San Antonio, is building a deck and needs to make sure the corners are perfectly square. He measures 3 feet along one side and 4 feet along the adjacent side. If the diagonal between those two points measures exactly 5 feet, the corner is a perfect right angle. This is the 3-4-5 rule, and it is the most practical application of the Pythagorean theorem in construction. Carlos learned it from his father, who learned it from his grandfather. None of them needed to know the formal proof, but they all relied on the theorem every day.

The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. The formula is a squared plus b squared equals c squared. While attributed to the Greek philosopher Pythagoras (circa 570-495 BCE), the relationship was known to Babylonian mathematicians over a millennium earlier. The Plimpton 322 tablet, dating to around 1800 BCE, contains a table of 15 Pythagorean triples, showing that the Babylonians understood and used this relationship long before Pythagoras gave it his name.

The theorem is used in construction, navigation, engineering, physics, and computer graphics. According to Wolfram MathWorld, it is one of the most frequently applied theorems in all of mathematics. Any time you need to find the length of an unknown side of a right triangle, the Pythagorean theorem provides the answer.

Inputs Required

  • Find hypotenuse: Given both legs a and b, calculate the hypotenuse c
  • Find leg a: Given leg b and hypotenuse c, calculate leg a
  • Find leg b: Given leg a and hypotenuse c, calculate leg b

Outputs Provided

  • Missing side: The calculated length of the unknown side
  • Triangle area: Half the product of the two legs
  • Perimeter: Sum of all three sides
  • Both acute angles: Calculated using inverse tangent

How the Calculation Works

The Core Formula

a² + b² = c²

Where a and b are the two legs of the right triangle and c is the hypotenuse. To solve for each unknown:

Finding the Hypotenuse

c = √(a² + b²)

Finding a Missing Leg

a = √(c² - b²)

b = √(c² - a²)

The hypotenuse must always be longer than either leg. If c is not longer than both a and b, the inputs do not form a valid right triangle.

Calculating the Angles

Angle A = arctan(a / b)

Angle B = arctan(b / a)

Angle C = 90°

The three angles of any triangle always sum to 180°. In a right triangle, one angle is always 90°, so the other two must sum to 90°.

How to Use the Calculator

  1. Select what you want to find: the hypotenuse or one of the legs
  2. Enter the two known side lengths
  3. The missing side, area, perimeter, and angles calculate instantly
  4. Ensure the hypotenuse is longer than either leg to get a valid result

Example Calculations

Example 1: The 3-4-5 Triangle

The most well-known right triangle has legs of 3 and 4. Hypotenuse = √(9 + 16) = √25 = 5. This triple (3, 4, 5) is commonly used in construction to verify right angles because all three sides are whole numbers. Area = (3 x 4) / 2 = 6 square units. Perimeter = 3 + 4 + 5 = 12 units. Angle A = arctan(3/4) = 36.87°. Angle B = arctan(4/3) = 53.13°.

Example 2: Diagonal of a Screen

A monitor is 48 cm wide and 27 cm tall. The diagonal = √(48² + 27²) = √(2,304 + 729) = √3,033 = 55.07 cm. Screen sizes are typically measured diagonally, making this a practical everyday application. A 24-inch monitor has a diagonal of 24 inches, but the actual width and height depend on the aspect ratio. For a 16:9 monitor with a 24-inch diagonal, the width is 24 x 16/√(16² + 9²) = 20.9 inches and the height is 24 x 9/√(16² + 9²) = 11.7 inches.

Real-World Scenarios

Construction and Carpentry

Builders use the 3-4-5 rule to square up corners. If a corner has legs of 3 and 4 feet and the diagonal measures exactly 5 feet, the corner is a perfect right angle. This check is standard practice when laying foundations, framing walls, and building decks. For larger structures, builders scale up the triple: 6-8-10, 9-12-15, or any multiple of 3-4-5. Carlos, the carpenter from San Antonio, uses a 6-8-10 measurement with his tape measure on every deck he builds.

Navigation and Surveying

When navigating, the straight-line distance between two points can be calculated from their horizontal and vertical displacement. A hiker walks 3 miles north and then 4 miles east. The straight-line distance back to the starting point is √(3² + 4²) = 5 miles. GPS calculations and map routing rely on this principle, extended to three dimensions for altitude differences. For more complex distance calculations on a coordinate plane, use our Distance Calculator.

Computer Graphics and Gaming

In 2D and 3D rendering, the distance between two points is calculated using the Pythagorean theorem. Collision detection, pathfinding algorithms like A*, and camera positioning all rely on distance calculations that extend this formula to two and three dimensions. A game developer calculating whether two objects are within 50 pixels of each other computes √((x2-x1)² + (y2-y1)²) and compares it to 50. For calculating the area of triangular shapes in design, see our Area Calculator or our Triangle Calculator.

Why This Calculation Matters

The Pythagorean theorem connects length, distance, and angles in a simple and universally applicable formula. It is one of the few theorems that appears equally in pure mathematics, applied engineering, and everyday problem-solving. The Babylonians used it 4,000 years ago. Euclid proved it around 300 BCE. Today, it powers everything from GPS navigation to video game physics engines. A reliable calculator makes these computations instant and error-free.

Common Mistakes to Avoid

  • Applying the theorem to non-right triangles: The Pythagorean theorem only applies to right triangles. For other triangles, use the law of cosines instead
  • Confusing legs and hypotenuse: The hypotenuse is always the longest side and is always opposite the right angle. Mixing this up leads to incorrect input and negative values under the square root
  • Entering a hypotenuse shorter than a leg: This is mathematically impossible. If c is not greater than both a and b, the inputs do not form a valid right triangle
  • Mixing units: All three sides must be measured in the same unit. A triangle with legs in feet and a hypotenuse in meters will give an incorrect result

Limitations of This Calculator

This calculator applies the Pythagorean theorem to right triangles only. It cannot solve for sides of obtuse or acute triangles, which require the law of cosines or law of sines. The calculator assumes Euclidean geometry, meaning it does not account for spherical or hyperbolic spaces where the theorem does not hold. For triangles on a sphere (such as navigation across the Earth's surface), spherical trigonometry is required. The angle calculations use inverse tangent, which is accurate for all valid right triangles but may show rounding errors for very small or very large side length ratios.

Frequently Asked Questions

What is a right triangle?
A right triangle is a triangle that contains one angle of exactly 90 degrees. The side opposite the right angle is the hypotenuse, which is always the longest side. The other two sides are called legs. The Pythagorean theorem only applies to right triangles. If a triangle has no 90-degree angle, you need the law of cosines or law of sines instead.
What is a Pythagorean triple?
A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a squared plus b squared equals c squared. The most well-known example is (3, 4, 5). Other common triples include (5, 12, 13), (8, 15, 17), and (7, 24, 25). Any multiple of a triple is also a triple: (6, 8, 10), (9, 12, 15), and so on. Pythagorean triples are used in construction to verify right angles quickly. The Babylonian Plimpton 322 tablet, dating to around 1800 BCE, contains a table of 15 Pythagorean triples, showing this knowledge predates Pythagoras by over a millennium.
Who proved the Pythagorean theorem?
The theorem is attributed to Pythagoras (circa 570-495 BCE), but the earliest surviving proof is by Euclid in his Elements, written around 300 BCE. The relationship was known to Babylonian mathematicians as early as 1800 BCE, as evidenced by the Plimpton 322 tablet. Chinese mathematicians also documented a proof in the Zhou Bi Suan Jing, dating to around 100 BCE. There are now over 400 known proofs of the theorem, including one by Albert Einstein at age 12 and one by US President James Garfield.
Can I use the Pythagorean theorem in three dimensions?
Yes. For a 3D box with dimensions l, w, and h, the length of the internal diagonal is the square root of (l squared plus w squared plus h squared). This is an extension of the theorem applied twice: first to find the floor diagonal, then again to include the height. The same principle extends to any number of dimensions, which is why it appears in machine learning distance metrics and multidimensional optimization.
How does this calculator find the angles of the triangle?
The calculator uses the inverse tangent (arctan) function. For angle A, it computes arctan(a / b), which is the angle whose tangent equals the ratio of the opposite side to the adjacent side. Angle B is computed similarly as arctan(b / a). The results are converted from radians to degrees by multiplying by 180 divided by pi. The two acute angles always sum to 90 degrees in a right triangle.
Does the Pythagorean theorem work for all triangles?
No. The theorem only applies to right triangles. For any other triangle, the correct relationship between sides and angles is described by the law of cosines: c squared equals a squared plus b squared minus 2ab times cos(C), where C is the angle opposite side c. When C equals 90 degrees, cos(90 degrees) equals 0 and the law of cosines reduces to the Pythagorean theorem. For non-right triangles, use our Triangle Calculator instead.
What is the 3-4-5 rule in construction?
The 3-4-5 rule is a practical application of the Pythagorean theorem used by carpenters and builders to check that corners are square. If you measure 3 feet along one wall and 4 feet along the adjacent wall, the diagonal between those two points should measure exactly 5 feet if the corner is a perfect right angle. Builders scale this up for larger structures: 6-8-10 for rooms, 9-12-15 for foundations. The rule works because (3, 4, 5) is a Pythagorean triple.

Related Calculators

Area Calculator

Calculate area of any geometric shape

Volume Calculator

Calculate volume of 3D shapes

Quadratic Equation Calculator

Solve quadratic equations ax² + bx + c = 0

Embed This Calculator

Pythagorean Theorem Calculator

Calculate
Reset
Calculators PlanetCalculators Planet

Fast, accurate, and user-friendly online calculators for all your needs.

Financial

  • Mortgage Calculator
  • Amortization Calculator
  • Mortgage Payoff Calculator
  • House Affordability Calculator
  • Rent Calculator

Math

  • Decimal to Fraction Calculator
  • Significant Figures Calculator
  • Percentage Calculator
  • Fraction Calculator
  • Ratio Calculator

Health

  • BMI Calculator
  • Ideal Weight Calculator
  • Body Fat Calculator
  • Calorie Calculator
  • Macro Calculator

Other

  • Age Calculator
  • Date Calculator
  • Time Calculator
  • Hours Calculator
  • Time Card Calculator

2026 Calculators Planet. All rights reserved.

BlogAboutContactPrivacy PolicyCookie PolicyTerms of ServiceDisclaimer