# formatNumber

## Description

Converts a number into a specific desired format, such as adding commas for thousands separators or specifying decimal places.

## Input / Parameter

| Name        | Description                   | Input Type  | Default | Options | Required |
| ----------- | ----------------------------- | ----------- | ------- | ------- | -------- |
| value       | The number to be formatted.   | Number      | 0       | -       | Yes      |
| decimals    | The number of decimal places. | Number      | 0       | -       | No       |
| decimalSep  | Decimals separator.           | String/Text | ,       | -       | No       |
| thousandSep | Thousands separator.          | String/Text | -       | -       | No       |

## Output

| Description                   | Output Type |
| ----------------------------- | ----------- |
| Returns the formatted number. | Number      |

## Callback

N/A

## Video

Coming soon.

## Example

| Function inputs                                                                                                                                                                                                 | Expected result |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------: |
| ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-c7521be2d293d7076007d11122d90c6df08fd7f8%2FformatNumber-eg-1.png?alt=media) |      `1 000.23` |
| ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-7967dd1a98499c2bedf8969bcd907fbf8a2bca61%2FformatNumber-eg-2.png?alt=media) |     `-95,123.0` |

## Links
