In this track: Digital value and units
Unit conversion practice set
Check the scale, preserve the integer, and verify your result.
Treat each amount like a parcel with a label. Before opening it, check which asset and which measuring unit the label describes.
1 ETH = 1000000000 Gwei = 1000000000000000000 Wei.
Exercise one: a small ETH amount
Convert 0.0042 ETH into Wei. Move the decimal eighteen places to get 4200000000000000 Wei. Convert it back before looking at the answer in the tool. The original value should survive the round trip exactly.
Exercise two: a gas-price unit
Convert 15 Gwei into Wei. Multiply by a billion to get 15000000000 Wei. This is a price per gas when used in a fee calculation; you still need the amount of gas to calculate an execution fee.
Exercise three: a token amount
A token uses six decimals and reports a raw amount of 2500000. Its display amount is 2.5 tokens. Do not call that 2.5 ETH unless the asset itself is native ETH, whose scale would be different.
Exercise four: reject a fraction of Wei
Try an ETH input with a non-zero nineteenth decimal digit. An exact whole-Wei converter should explain that the input cannot be represented at that scale. Rejecting unsupported precision is more useful than silently changing the number.
15 Gwei is how many Wei?
One Gwei equals 10⁹ Wei, so fifteen Gwei equals 15 × 10⁹ Wei.
Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.