Math

Pythagorean Theorem Calculator

Find a right triangle’s hypotenuse from its two perpendicular legs.

Exact method explained belowEditable inputs
Geometry desk
Geometry desk

Match each dimension to the shape and keep units consistent.

See the method

Set the dimensions

Runs on your device

Your measurement

Your result

Let’s calculate.

Use the Calculate button to see your result.

Review the method below for assumptions and conventions.

How to use this tool

  1. Enter first leg, second leg.
  2. Select Calculate to view the result.
  3. Check the method and assumptions below before using the result.

Input reference and sample values

Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.

InputFormat and unitsSample
First legNumeric value. Zero or positive.3
Second legNumeric value. Zero or positive.4

Result for these sample inputs

5 units
Formula
c = √(a² + b²)

Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.

The method, explained

For a right triangle, c² = a² + b². Therefore c = √(a² + b²).

A WORKED EXAMPLE

Legs of 3 and 4 units give a hypotenuse of 5 units.

What to keep in mind

Use the two sides meeting at the right angle and the same unit for each. This formula does not apply to arbitrary triangles.

Common questions

Which side is the hypotenuse?

It is opposite the right angle and is the longest side of a nondegenerate right triangle.

Can either leg be zero?

Zero gives a degenerate case. The arithmetic is defined, but the shape has no positive area.

Methodology maintained by ClarityKit. How these tools are built and checked.