HomeCalculatorsMathPythagorean Theorem Calculator

Pythagorean Theorem Calculator

Math

Solve the Pythagorean theorem to find any missing side of a right triangle. Enter two known sides to calculate the third with step-by-step working.

Reviewed by the thecalcu.com team · Last updated July 19, 2026

Find Side
Leg a
0.1500
Leg b
0.1500

Hypotenuse (c)

0

Area

6

Perimeter

12

Right Triangle

abc
Leg a3
Leg b4
Hypotenuse c5

c² = a² + b² → 3² + 4² = 5²

What is a Pythagoras?

The Pythagorean Theorem Calculator finds any missing side of a right-angled triangle when two sides are known, and additionally computes the triangle's area and perimeter. Select whether you want to find the hypotenuse (c) or one of the legs (a or b), enter the two known dimensions, and the result appears instantly with full step-by-step working.

The Pythagorean theorem, stated as c² = a² + b², where c is the hypotenuse, is one of the oldest and most verified results in mathematics, with more than 370 known proofs. It applies exclusively to right-angled triangles, where one interior angle is exactly 90°. The two shorter sides (legs a and b) are perpendicular to each other, and the hypotenuse is always opposite the right angle and always the longest side.

In Indian education, the theorem appears as early as Class 7 and forms a cornerstone of the Class 10 CBSE 'Triangles' chapter, where students must both apply and prove it. Beyond academics, the theorem is embedded in everyday construction: checking that walls meet at right angles using the 3-4-5 method, calculating the length of a staircase riser, finding the diagonal of a rectangular plot, or determining the reach of a ladder leaned against a wall.

For triangles that are not right-angled, the Triangle Calculator uses the law of cosines to solve all sides and angles from any three known values. For computing the area of a right triangle (which equals ½ × leg_a × leg_b), the Area Calculator provides additional shape options including rectangles, circles, and trapezoids.

Why Use a Pythagorean Theorem Calculator?

The arithmetic in Pythagoras is simple in principle, square two numbers, add or subtract, then take a square root, but the square root step rarely produces a clean integer unless the inputs are a Pythagorean triple (like 3-4-5 or 5-12-13). When legs are 7.3 m and 9.6 m, computing √(53.29 + 92.16) = √145.45 ≈ 12.06 by hand is slow and error-prone under exam or site conditions.

This calculator eliminates the arithmetic burden: enter the two known values, read the result to six significant figures, and check the step-by-step working to confirm you set up the problem correctly (finding hypotenuse vs. finding a leg are different rearrangements of the formula and a common source of errors).

The perimeter output is useful when buying timber, fencing, or moulding for a right-triangular frame, the total material length is a + b + c without needing a separate sum. The area output is used directly for flooring, painting, or land measurement of right-triangular sections.

Who Should Use This Calculator?

Students preparing for board examinations (CBSE Class 10, ICSE, state boards) who encounter Pythagoras problems in 'Triangles', trigonometry, and coordinate geometry chapters. The step-by-step display helps students check their manual working rather than just copying a final answer.

Construction workers and civil engineers verifying squareness on site using the 3-4-5 method, or calculating rafter lengths, diagonal cable lengths, or bracing dimensions. Quick, reliable computation on a mobile phone during fieldwork prevents costly errors.

Architects and interior designers calculating diagonal clearances, for example, whether a 2.1 m sofa can navigate around a 90° corner in a corridor, which requires the Pythagorean diagonal of the sofa's length and the corridor width.

Competitive exam aspirants (JEE Foundation, NTSE, Olympiad) who frequently encounter Pythagorean triple recognition questions and need to verify derived values quickly. Pair with the Slope Calculator for coordinate geometry problems where the distance between two points is the hypotenuse of a right triangle formed by the coordinate differences.

What Insights Does the Pythagoras Calculator Give You?

Missing Side (Result), the primary output showing the computed side to six significant figures. If you selected "Find Hypotenuse", this is c = √(a² + b²). If you selected "Find Leg a" or "Find Leg b", the formula rearranges accordingly. A result of zero indicates an impossible triangle (hypotenuse shorter than a leg), check that the hypotenuse value is greater than both legs.

Triangle Area, computed as ½ × leg_a × leg_b. This is exact because the two legs of a right triangle are perpendicular, making one the base and the other the height. The area updates as soon as you adjust any side.

Perimeter, the sum a + b + c (all three sides). This directly tells you the total boundary length of the right triangle, useful for purchasing perimeter materials such as skirting, fencing, or picture frame moulding.

The triangle SVG visual below the result scales with your input values and labels all three sides, so you can visually verify that the computed side is indeed the longest (hypotenuse) or shorter (leg) as expected. Cross-check using Vieta's property: for any right triangle, the hypotenuse must satisfy c > a and c > b, if the computed hypotenuse is shorter than a known leg, re-examine the problem setup.

How to use this Pythagoras calculator

  1. Select Find Side, choose which side you want to calculate: Hypotenuse (c) if you know both legs, Leg a if you know leg b and the hypotenuse, or Leg b if you know leg a and the hypotenuse. The input fields update immediately to show the two known sides.

  2. Enter the two known values, type the length of each known side into the input boxes or use the sliders. Use consistent units (all in metres, or all in centimetres), the calculator does not convert units.

  3. Read the Missing Side result, the primary result card shows the computed side. The step-by-step breakdown below shows the squared values, their sum or difference, and the final square root.

  4. Check Area and Perimeter, the secondary result card shows the triangle area (½ × a × b) and perimeter (a + b + c). Use area for material coverage estimation and perimeter for boundary material estimation.

  5. Verify using the visual, the right triangle diagram labels a, b, and c, with the right angle marker at the corner between the two legs. Confirm visually that the hypotenuse is the diagonal side opposite the right angle.

Formula & Methodology

Finding the hypotenuse:c = √(a² + b²)

Finding leg a:a = √(c² − b²)

Finding leg b:b = √(c² − a²)

Area of right triangle:Area = ½ × a × b

Perimeter:P = a + b + c

Variable definitions:
- c, hypotenuse (side opposite the right angle; always the longest side)
- a, leg 1 (one of the two shorter sides forming the right angle)
- b, leg 2 (the other shorter side forming the right angle)

Worked example, calculating rafter length for a roof:

A construction site in Pune has a roof span (width) of 8 m and a rise (height from ceiling to ridge) of 3 m. The rafter runs from the eave (bottom edge of the roof) to the ridge (top), forming the hypotenuse of a right triangle where one leg is half the span and the other is the rise.

Half-span = 8 / 2 = 4 mRise = 3 m

Rafter length c = √(4² + 3²) = √(16 + 9) = √25 = 5 m

This is the classic 3-4-5 Pythagorean triple scaled by 1. Each rafter needs 5 m of material plus an overhang allowance.

Perimeter of the right triangle = 4 + 3 + 5 = 12 mArea = ½ × 4 × 3 = 6 sq m (cross-sectional area of the triangular roof section)

Assumption: The theorem applies only to flat (Euclidean) geometry and only when the angle between legs a and b is exactly 90°. On a sloped or uneven surface, the actual path length may differ from the geometric calculation.

Frequently Asked Questions

The Pythagorean theorem states that in any right-angled triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: c² = a² + b². It is attributed to the ancient Greek mathematician Pythagoras and is one of the most fundamental results in Euclidean geometry, with applications spanning construction, navigation, and physics.
Select which side you want to find, the hypotenuse (c) or one of the legs (a or b), then enter the two known sides. The calculator applies the Pythagorean theorem to compute the missing side, and also displays the triangle's area (½ × a × b) and perimeter (a + b + c). Step-by-step working is shown below the result so you can follow the calculation.
The hypotenuse is the longest side of a right-angled triangle and always lies opposite the right angle (90°). Its length is always greater than either of the two legs. In the classic 3-4-5 right triangle, the hypotenuse is 5 units. Given legs a and b, the hypotenuse is c = √(a² + b²).
Rearrange the formula to isolate the unknown leg: a = √(c² − b²) or b = √(c² − a²). The hypotenuse must be longer than the other known side for a valid triangle; if c ≤ b, the difference c² − b² is non-positive and no real triangle exists. Our calculator flags this automatically and shows zero for invalid inputs.
Pythagorean triples are sets of three positive integers (a, b, c) satisfying a² + b² = c². The most commonly used triples in Indian school mathematics are (3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25), and (9, 40, 41). Multiples of these also work, for example, (6, 8, 10) is a multiple of (3, 4, 5). These triples appear frequently in CBSE Class 10 and competitive exam problems.
The Pythagorean theorem is used to verify that corners are square (right-angled) in construction, the '3-4-5 method' involves measuring 3 units along one wall, 4 units along the adjacent wall, and checking that the diagonal is exactly 5 units. It also calculates rafter lengths for roofs, diagonal bracing lengths for structural frames, and cable lengths for towers. In India, civil engineers and masons routinely apply this method on building sites.
The Pythagorean theorem applies only to right-angled triangles and gives c² = a² + b². The law of cosines generalises this to any triangle: c² = a² + b² − 2ab cos(C), where C is the angle between sides a and b. When C = 90°, cos(90°) = 0 and the formula reduces to the Pythagorean theorem. Use the [Triangle Calculator](/triangle-calculator/) for non-right-angled triangles where the law of cosines is needed.
The area of a right triangle is ½ × leg_a × leg_b, since the two legs are perpendicular and serve as base and height. Once you know both legs (using the theorem if one was unknown), the area calculation is straightforward. For example, a right triangle with legs 3 m and 4 m has area = ½ × 3 × 4 = 6 sq m. Our calculator computes and displays this area automatically.
Yes, the Pythagorean theorem is covered in the CBSE Class 10 Mathematics syllabus under the chapter 'Triangles' (Chapter 6), specifically as Theorem 6.8 (Pythagoras' theorem) and its converse (Theorem 6.9). It is also a prerequisite concept for trigonometry and coordinate geometry chapters. Students should be able to prove the theorem as well as apply it to find missing sides.
Yes, the converse of the Pythagorean theorem states that if a² + b² = c² for the three sides of a triangle, then the triangle is right-angled at the vertex opposite side c. This is used in surveying and construction to verify squareness. If a² + b² > c², the angle opposite c is acute; if a² + b² < c², the angle is obtuse.
The diagonal of a rectangle with length l and width w is d = √(l² + w²), since the diagonal and two sides form a right triangle. For a room 8 m long and 6 m wide, the diagonal = √(64 + 36) = √100 = 10 m. This calculation is useful in carpentry (cutting diagonal braces), interior design (checking furniture fits through diagonal space), and construction. See the [Area Calculator](/area-calculator/) to also compute the floor area of the same room.
Also known as
Pythagorean theoremhypotenuse calculatorright triangle calculatora squared plus b squared