# format_amount_with_decimals · FT4 Rell API · Chromia Docs (concept)

> function format_ amount_ with_ decimals(amount: big_ integer, decimals: integer): text Creates a readable string representing the amount of tokens, given t

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.assets/format_amount_with_decimals/

FUNCTION

# format\_amount\_with\_decimals

```signature
function format_amount_with_decimals(amount: big_integer, decimals: integer): text
```

[Source](https://gitlab.com/chromaway/ft4-lib/-/blob/development/rell/src/lib/ft4/core/assets/asset.rell#lines-268)

Creates a readable string representing the amount of tokens, given the raw
representation of its amount and the decimals.

For example, `format_amount_with_decimals(11, 2)` will return `"0.11"`

Throws `"INVALID DECIMALS"` if decimals is negative.

**Parameters**

* **amount** — the value to be formatted
* **decimals** — the amount of decimals for the given token

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.assets/format_amount_with_decimals.html)Generated API reference, mirrored from the live docs
