How decimals work
The ERC-20 standard defines decimals as a display hint: the amount a user sees equals the raw balance divided by 10^decimals. The same idea exists on TRON (TRC-20), BNB Smart Chain (BEP-20), Solana SPL tokens (the mint's decimals) and native units such as wei, lamports or piconero. The converter works with BigInt, so 78-digit uint256 values are exact.
amount = raw รท 10^decimals
raw = amount ร 10^decimals (must be a whole number)
0x0f4240 = 1,000,000 raw = 1 USDT (6 decimals)Common decimals
- 6 โ USDT on Ethereum and TRON, USDC on most networks, USDT and USDC on Solana.
- 18 โ ETH in wei, DAI, most ERC-20 tokens, BNB, and USDT/USDC as issued on BNB Smart Chain.
- 8 โ WBTC and other Bitcoin-pegged tokens, matching satoshis.
- 9 โ SOL in lamports, SUI in MIST.
- 12 โ Monero in piconero.
The same ticker can have different decimals on different networks. A raw 1,000,000 is 1 USDT on Ethereum but 0.000000000001 USDT on BNB Smart Chain. Always read decimals() of the exact contract on an explorer.
Where raw values come from
Explorers show raw values in the input data of a call (the last 32-byte word of a transfer is the amount in hex), in event logs and in the "Read contract" tab. Wallet developers and API users deal with them all the time. If you are checking an approval, an amount of 2ยฒโตโถ โ 1 (a hex word full of f) means unlimited allowance.
Frequently asked questions
+How many decimals does USDT have?
6 on Ethereum, TRON and Solana. The BEP-20 USDT contract on BNB Smart Chain uses 18.
+What is 1000000000000000000 wei?
1 ETH: 10ยนโธ wei with 18 decimals.
+Why does the converter reject my amount?
It has more decimal places than the token supports. A 6-decimal token cannot represent 0.0000001.
+How do I read an amount from transaction input data?
Take the 64-hex-character word for the amount, prefix it with 0x and paste it here with the token's decimals.
Calculations run entirely in your browser; nothing you type is sent to KOT.CASH. Results are estimates for information only and are not financial, tax or legal advice.