> For the complete documentation index, see [llms.txt](https://docs.novabloq.com/web3-metamask/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.novabloq.com/web3-metamask/elements-details/web3-utils/from-wei.md).

# From Wei

Useful when interacting with data received from a smart contract\
[For example when getting a token rate](/web3-metamask/elements-details/web3-and-metamask/smart-contract-read/example-cake-busd-rate-on-pancaksewap.md)

## &#x20;<mark style="background-color:blue;">Parameters</mark>&#x20;

<table><thead><tr><th width="186.33333333333331">Parameter name</th><th width="100">Type</th><th>Description</th></tr></thead><tbody><tr><td>Wei</td><td>Text</td><td>It can be only text type because the number is too big. "wei" are the smallest ether unit.</td></tr><tr><td>Decimals</td><td>Number</td><td>Optional. Token decimals. Useful for correct conversion when the token has different decimals than the standard 18.</td></tr></tbody></table>

## &#x20;<mark style="background-color:blue;">States (result)</mark>&#x20;

<table><thead><tr><th width="168.33333333333331">State name</th><th width="80">Type</th><th>Description</th></tr></thead><tbody><tr><td>From WEI result</td><td>Text</td><td>It is in text format to avoid errors when the result contains too many decimals.<br>Note that the result isn't instantly available, so when using the result in the same workflow where the action is run, add a small pause (200 ms) between this action and the next one where the result is used </td></tr></tbody></table>

Demo for how to use To Wei and From Wei features:\
<https://web3-demo.bubbleapps.io/version-test/wei>
