Token decimals turn integer balances into readable amounts
Token decimals set how integer balances appear to users; learn the base-unit conversion, why precision matters, and what to verify before sending or integrating a token.
Crypto Bulletin Newsroom 2 min read
Token decimals tell software how to convert a token’s stored integer balance into a readable amount: divide the balance by 10 raised to the decimals value. The ERC-20 specification describes decimals as a display aid, so the setting changes how an amount is presented, not the number of base units held.
What do token decimals mean?
A token with six decimals uses one million base units for each whole token. A balance of 1,250,000 base units therefore displays as 1.25 tokens; with 18 decimals, the same whole-token amount would require 1,000,000,000,000,000,000 base units.
The conversion works in both directions. To send 1.25 tokens with six decimals, a wallet or application converts that display amount to 1,250,000 integer units before submitting the transaction. The chain processes that integer amount; the decimal point is part of the human-facing representation.
The ERC-20 specification makes its decimals method optional, and says software must not assume it exists. If an application cannot read the value, it needs another reliable source for the token’s precision rather than guessing.
How do decimals affect transfers and swaps?
Decimals determine the smallest fraction that can be represented as a whole number of base units. With six decimals, for example, the smallest increment is 0.000001 token; an amount requiring more precision cannot be represented exactly in those units.
Wallets and swap interfaces use the value to display balances, enter amounts and convert quotes. For the separate question of how a wallet swap can be routed, see Chainflip wallet swap routes; token decimals determine how the amounts in a route are shown, not which route is chosen.
Solana’s token documentation also treats decimals as a mint setting and describes checked token operations that verify the provided precision against the mint. That illustrates why applications need to use the token’s actual setting when encoding amounts: a mismatch can turn a familiar display value into a different integer amount.
What should you check before using a token?
Check the token’s network and contract or mint address, then obtain its decimals from the token contract or mint data where supported. The ERC-20 specification warns that decimals may be absent, so an integration should account for that case and use a trusted token record when it cannot read the field.
- Confirm the network and token address; similar names or symbols do not establish that two assets are the same.
- Check the decimals value from the token’s contract or mint data rather than assuming a familiar precision.
- Before sending, compare the entered amount with the wallet’s displayed amount and the transaction’s base-unit value.
For most users, the practical rule is simple: treat decimals as a conversion setting, not as a measure of a token’s value or supply. The correct value lets software show and encode the same quantity consistently; it does not make a token more divisible after it has been created.