Easy CalculatorsOnline
A little less guesswork.

Geometry · EVERYDAY CLARITY

Pythagorean theorem calculator

Find the hypotenuse from two perpendicular sides.

Units & number format

Number formatting changes the display; the interface and guides are in English. Dates use calendar controls; numeric lists use decimal points and comma or space separators.

01 · CALCULATE

Work out your numbers

Your inputs stay in this browser.

Example result · using the values shown

Hypotenuse
5
a² + b²25
See visual ↓

Applies only to a right triangle. Both legs must use the same length unit.

02 · SEE THE RESULT

Your numbers, pictured

Example visualization

Your right triangle

Your right triangleThe hypotenuse is 5 units. The two entered legs meet at a right angle.34

The hypotenuse is 5 units. The two entered legs meet at a right angle.

03 · UNDERSTAND THE METHOD

How the pythagorean theorem calculator works

The Pythagorean theorem connects the three side lengths of a right triangle. This calculator takes the two legs that meet at the right angle and finds the hypotenuse opposite that angle. It is useful for understanding a rectangle’s diagonal, a perpendicular offset, or a right-triangle problem. The two supplied lengths must use the same unit and must represent perpendicular directions for this calculation to describe the geometry.

The formula and its variables

c = √(a² + b²)
a, b
Positive lengths of the perpendicular legs.
c
Hypotenuse opposite the right angle.

The calculation, step by step

  1. Identify the right angle and its two adjoining sides. Enter those leg lengths rather than entering one leg and the hypotenuse.
  2. Square each leg and add the squared values. This sum has squared length units.
  3. Take the positive square root of the sum to return to length units. Compare the answer with each leg; it must be larger than either positive leg.

A worked example

With legs of 3 units and 4 units, the squared lengths are 9 and 16. Their sum is 25, and the positive square root is 5. The hypotenuse is therefore 5 units. For a rectangle 3 meters wide and 4 meters long, the same calculation gives a diagonal of 5 meters because adjacent edges meet at a right angle.

Example inputs and calculated output
Leg a3
Leg b4
Hypotenuse5

How to read the result and visual

The diagonal in the diagram connects the ends of the two perpendicular legs. The answer describes a straight-line distance, not the distance traveled along both legs. Walking 3 units and then 4 units covers 7 units of route, whereas the straight diagonal between the same endpoints is 5 units in this example.

Assumptions, rounding, and limitations

The theorem requires a right angle. Applying it to an arbitrary triangle without that condition gives the wrong side length. This form solves only the hypotenuse from two known legs; solving a missing leg requires subtracting squares instead. Inputs are positive lengths, and display rounding does not improve the precision of the measurements.

Frequently asked questions

Does the order of the legs matter?

No. Adding their squares gives the same sum whichever leg is entered first.

Can I use different units for the two legs?

Convert them to one shared length unit before calculating.

Reference sources

How we check calculations and what verification covers