Quick answer
The hypotenuse of a right triangle is c = √(a² + b²). Legs of 3 and 4 give 5.
Enter the two legs. The calculator returns the hypotenuse.
Related tools: Area Calculator: Area of common two-dimensional shapes. Right Triangle Calculator: Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter. Pythagorean Theorem Calculator: Find the hypotenuse or a missing leg of a right triangle.
How to use the Hypotenuse Calculator
- Enter leg a (above 0).
- Enter leg b (above 0).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Leg a | A number | > 0 |
| Leg b | A number | > 0 |
Formula and method
Formula
c = √(a² + b²)
IEEE-754 double precision; shown to at most 6 decimal places.
Pythagorean theorem.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Leg a = 3; Leg b = 4.
| Result | Value |
|---|---|
| Hypotenuse | 5 |
Example 2
Inputs: Leg a = 5; Leg b = 12.
| Result | Value |
|---|---|
| Hypotenuse | 13 |
The first line is the headline result (hypotenuse). IEEE-754 double precision; shown to at most 6 decimal places.
Why it works
Pythagoras: a² + b² = c². 9 + 16 = 25, and √25 = 5. The hypotenuse is always the longest side, opposite the right angle.
Everyday checks
Use it to find the diagonal of a rectangle, the length of a ladder against a wall or a ramp. The legs must be positive and in the same unit. For a missing leg, use the Pythagorean Theorem calculator.
How the result changes with leg a
Holding every other input at the first worked example, this table changes only leg a. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Leg a | Hypotenuse |
|---|---|
| 1.5 | 4.272002 |
| 3 | 5 |
| 6 | 7.211103 |
| 12 | 12.649111 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Leg a: entering "0" shows "Leg a must be greater than 0." beside that field and no result.
Choosing between the Hypotenuse Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Area Calculator](/math/area-calculator/) | shape and a | Area |
| [Right Triangle Calculator](/math/right-triangle-calculator/) | leg a and leg b | Hypotenuse c |
| [Pythagorean Theorem Calculator](/math/pythagorean-theorem-calculator/) | find, leg a and other side | Hypotenuse c |
| [Triangle Calculator](/math/triangle-calculator/) | side a, side b and side c | Area |
| [Circle Calculator](/math/circle-calculator/) | i know the and value | Area |
Background: geometry measurements
Geometry results carry units that depend on the quantity: a perimeter or length is in linear units such as cm, an area or surface area is in square units (cm²) and a volume is in cubic units (cm³). Use one length unit for every input, because the calculator multiplies the numbers as given.
Flat (2D) shapes have an area and a perimeter; solids (3D) have a surface area and a volume. Two familiar checks: a circle of radius r has area πr² and circumference 2πr, and a sphere has volume (4/3)πr³ and surface area 4πr².
Assumptions and limitations
- Legs must be positive
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for leg a to confirm this.
Frequently asked questions
What is the hypotenuse for legs 5 and 12?
Legs of 5 and 12 give √(25 + 144) = 13.
Is it longer than each leg?
Yes. The hypotenuse is the longest side of a right triangle.
How do I find a missing leg?
Rearrange to b = √(c² − a²): hypotenuse 13 and leg 5 give b = 12.
What does the Hypotenuse Calculator calculate?
Hypotenuse of a right triangle from its two legs. It returns Hypotenuse.
What formula does the Hypotenuse Calculator use?
c = √(a² + b²). Pythagorean theorem.
What do I need to enter in the hypotenuse Calculator?
You enter Leg a and Leg b.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Legs must be positive.
What is an example of a hypotenuse result?
With leg a 3 and leg b 4, the hypotenuse is 5.
Related calculators
- Area Calculator — Area of common two-dimensional shapes.
- Right Triangle Calculator — Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter.
- Pythagorean Theorem Calculator — Find the hypotenuse or a missing leg of a right triangle.
- Triangle Calculator — Area, perimeter, angles and type of a triangle from its three sides.
- Circle Calculator — Radius, diameter, circumference and area of a circle from any one of them.
- Circumference Calculator — Circumference of a circle.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.