---
layout: default
---
Function isNumeric #
Test whether a value is an numeric value.
The function is evaluated element-wise in case of Array or Matrix input.
Syntax #
```js
math.isNumeric(x)
```
Parameters #
Parameter | Type | Description
--------- | ---- | -----------
`x` | * | Value to be tested
Returns #
Type | Description
---- | -----------
boolean | Returns true when `x` is a `number`, `BigNumber`, `Fraction`, or `boolean`. Returns false for other types. Throws an error in case of unknown types.
Throws #
Type | Description
---- | -----------
Examples #
```js
math.isNumeric(2) // returns true
math.isNumeric('2') // returns false
math.hasNumericValue('2') // returns true
math.isNumeric(0) // returns true
math.isNumeric(math.bignumber('42')) // returns true
math.isNumeric(math.bigint('42')) // returns true
math.isNumeric(math.fraction(4)) // returns true
math.isNumeric(math.complex('2-4i')) // returns false
math.isNumeric([2.3, 'foo', false]) // returns [true, false, true]
```
See also #
[isZero](isZero.html),
[isPositive](isPositive.html),
[isNegative](isNegative.html),
[isInteger](isInteger.html),
[hasNumericValue](hasNumericValue.html)