Convert ERC-20 token amounts to the base-unit integer a contract call takes and back, and measure any holding against total supply. BigInt-exact.
An ERC-20 contract keeps every balance as a plain integer. The decimals() value on the contract is a display hint and nothing else: 1 USDC is stored as 1000000 because USDC reports 6 decimals, while 1 DAI is stored as 1000000000000000000 because DAI reports 18. Assume the wrong one and a transfer is off by a factor of a trillion.
This calculator does the two sums that sit around that number. It converts a human amount into the base-unit integer a contract call takes, and back again, and it measures a holding against a total supply as a percentage, in basis points, as a “1 in N” figure, and as the raw integer totalSupply() returns. Every value is computed with BigInt, so a supply with 78 digits stays exact.
2500750000000000000000, which is the integer transfer(), approve() or mint() expects.totalSupply() integer.decimals digits, and the two parts are concatenated into one integer. No multiplication by a float ever happens.decimals + 1 digits, then a point is placed decimals places from the right and trailing zeros are trimmed.0.2500750000000000000000This is the integer a transfer(), approve() or mint() call takes on-chain.
Percent of supply
0.000250075%
Basis points
0.0250075 bps
Rarity
≈ 1 token in 399,880
Raw totalSupply()
1000000000000000000000000000
decimals is not stored per balance. It is one number on the contract that every tool multiplies by, so a token with 6 decimals holding “1000000” base units is showing 1.0, not a million. Every figure here is computed with BigInt in this tab, so a 78-digit supply stays exact.