--- title: "toNumber (Conversion to native number)" slug: "calc-function-to-number" updated: 2026-05-12T13:57:17Z published: 2026-05-12T13:57:17Z canonical: "docs.lobstersoftware.com/calc-function-to-number" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # toNumber (Conversion to native number) *See also*: [toString (Convert to a string)](/v1/docs/en/calc-function-to-string), [toBigDecimal (Conversion to large decimal integer)](/v1/docs/en/calc-function-to-big-decimal), [toLong (Conversion to large integer)](/v1/docs/en/calc-function-to-long) [toInteger (Conversion to large integer)](/v1/docs/en/calc-function-to-integer) > [!NOTE] > Attempts to convert a given input value into a native number of type 'Number' (Javascript/Client). > > For example, a native number is also used by the JSON format. > > > [!TIP] > > Tooltip > > > > Syntax: *$toNumber(any)* > > > > | Parameter | Description | > > | --- | --- | > > | `any` | Any value (or object), which will be converted | > > > > If the input value cannot be converted, nothing (null ) is returned. > > > > Example: $toNumber(1234.5) → Returns a native JavaScript number with value 1234.5. ## Syntax *$toNumber(any)* ## Parameter | Name | Description | | --- | --- | | any | Any value (or object), which will be converted. | ## Return value If the input value cannot be converted, nothing (null) is returned. ## Examples | Syntax | Result | | --- | --- | | $toNumber(1234.5) | Returns a native JavaScript number with value 1234.5. | | $toNumber($input) | Tries to convert the input value of the expression. |