---
title: formatPercent()
slug: formatpercent
docTags: 
createdAt: 2021-09-14T17:46:44.000Z
---

Converts a given value of type `Percent` into a `String`.

### Syntax

`formatPercent(percent[, format][, locale])`

- `percent` - the Percent value to be converted to a String
- `places` - the number of places of the returned value
- `locale` -&#x20;
- **Return type:** [String](docId\:Ujw2AQAktel5uukLuP73S)&#x20;

### Sample usage

`formatPercent(.5)` returns `50%` as a `String`.

### Supported data types

| **Input type**                               | **Return type**                         | **Logic**                                                           |
| -------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------- |
| ****[Percent](docId\:FbN7bFaHlFPV4f1C53DxA)  | [String](docId\:Ujw2AQAktel5uukLuP73S)  | If a Percent value is passed, it's value will returned as a String. |
| *Unsupported data types*                     | **[Null](docId\:N9trVqonnBknqL9DrNBP6)  | Unsupported data types return `Null`.                               |

