# hasNumericValue() Function & Examples

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

## hasNumericValue

#### hasNumericValue(x)

Try it yourself:

```calculio
hasNumericValue(2)
hasNumericValue("2")
isNumeric("2")
hasNumericValue(0)
hasNumericValue(bignumber(500))
hasNumericValue(fraction(0.125))
hasNumericValue(2 + 3i)
hasNumericValue([2.3, "foo", false])
```

---

## Test whether a value is numeric

**hasNumericValue(x)** checks whether x has a usable numeric value. It is useful for validating mixed inputs before arithmetic, parsing user entries, or choosing a safe branch in a calculation.

## Validation workflow

Test values before passing them to [sum](https://calcul.io/function/sum/index.md), [mean](https://calcul.io/function/mean/index.md), or a matrix operation. Compare [isNumeric](https://calcul.io/function/isNumeric/index.md), which answers a related type-oriented question, and [isFinite](https://calcul.io/function/isFinite/index.md) when infinite values must also be rejected.

## Important distinction

A value that can be treated numerically is not necessarily valid for every domain: a negative number can have numeric value but fail [sqrt](https://calcul.io/function/sqrt/index.md) in real-only use. Validate required ranges with functions such as [isPositive](https://calcul.io/function/isPositive/index.md). Do not use this test as a replacement for checking units, shape, or missing-data policy.

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