# hypot() Function & Examples

Use the hypot() arithmetic function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## hypot

#### hypot(a, b, c, ...)

#### hypot([a, b, c, ...])

Try it yourself:

```calculio
hypot(3, 4)
sqrt(3^2 + 4^2)
hypot(-2)
hypot([3, 4, 5])
```

[abs](https://calcul.io/function/abs/index.md)

[norm](https://calcul.io/function/norm/index.md)

---

## Find a Euclidean length with hypot

**hypot(a, b, c, ...)** returns the square root of the sum of squared inputs. For two values, it is the hypotenuse length `sqrt(a^2 + b^2)`; for more values, it gives the Euclidean length in higher dimensions.

## Examples

`hypot(3, 4)` is 5. This is useful for distance from coordinate differences: subtract coordinates with [subtract](https://calcul.io/function/subtract/index.md), then pass the differences to hypot. For a vector already stored as a matrix, [norm](https://calcul.io/function/norm/index.md) is often the more direct expression.

## Numerical advantages

Hypot is generally preferable to manually squaring and summing because it can use a stable implementation that reduces overflow and underflow risk. Compare [sqrt](https://calcul.io/function/sqrt/index.md) when you specifically need a square root of one value, and [distance](https://calcul.io/function/distance/index.md) for a direct point-to-point operation.

## Inputs

Inputs should be numeric and share meaningful units. A negative component is fine because it is squared; a nonnumeric value is not. Very large or very small values still deserve attention when interpreting precision.

[All functions](https://calcul.io/functions/index.md)
