---
schema_version: "1"
id: eefaa227211324a273cb75196e57e968259aee33a7f4e30e8488bc957ee467a7
title: formatPercent()
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-formatpercent.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-auralocalizationservice-formatpercent.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a388f5832d8729b5e172320e2865a5ef8cfa633a7560562891b2375a0b006e32
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# formatPercent()

Returns a formatted percentage number based on the default percentage format.

## Signature

`formatPercent (number number)`

## Parameters

**_number_:** Type: `number`. The number to format.

## Returns

**Type: `number`** The formatted percentage.

## Sample Code

```javascript
var num = 0.54;
// Returns 54%
var formatted = $A.localizationService.formatPercent(num);
```

