---
schema_version: "1"
id: 94390dbe9ee8e40fd9e4ce9d22a8de8b7816bddbc3237bf18b7f9d1fd3c1856c
title: getNumberFormat()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/ref-jsapi/ref-jsapi-auralocalizationservice-getnumberformat.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-auralocalizationservice-getnumberformat.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d45ec116ddf9ab7146bf3f3883cdc86ccdab4364435befe29538e93074729a7c
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# getNumberFormat()

Returns a `NumberFormat` object.

## Signature

`getNumberFormat(string format, string symbols)`

## Parameters

**_format_:** Type: `string`. The number format. For example, `format=".00"` displays the number followed by two decimal places.

**_symbols_:** Type: `string`. An optional map of localized symbols. Otherwise, the current locale’s symbols are used.

## Returns

**Type: `NumberFormat`** The number format returned by `$Locale.numberFormat`.

## Sample Code

```javascript
var f = $A.get("$Locale.numberFormat");
var num = 10000
var nf = $A.localizationService.getNumberFormat(f);
var formatted = nf.format(num);
// Returns 10,000
var formatted = $A.localizationService.formatNumber(num);
```

