> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/utils/commarize.md).

# commarize

Formats a given number by inserting commas every three digits

**Returns**: `{string}` - The number formatted with commas.

**Parameters**: `{number}` - The number to be formatted.

### Examples

```javascript
commarize(55289640); //'55,289,640'
```

```javascript
commarize(1540); //1,540
```

### Use cases

Use `commarize()` to display large counts in dashboards and reports.

### More examples

Format a follower count before rendering it:

```javascript
const followers = commarize(1250000);

$('#follower-count').text(followers);
```
