What are wei and gwei, and why are gas prices quoted in gwei rather than in ether?
Wei is the smallest unit of ether (1 ETH = 10^18 wei) and gwei is a billion wei (10^9); gas prices are tiny fractions of an ETH, so quoting them in gwei keeps the numbers readable.
* The unit ladder: ETH for balances, gwei for gas prices, wei for the chain's own integer arithmetic — each step a factor of a billion. *
Ether is divisible to eighteen decimal places, and the units have names:
| Unit | In wei | Typical use |
|---|---|---|
| wei | 1 | The base unit — all on-chain amounts are integers of wei |
| gwei ("giga-wei") | 10^9 | Gas prices (e.g. "20 gwei per unit of gas") |
| ether (ETH) | 10^18 | Human-facing balances and prices |
The chain itself never deals in fractions — every balance and fee is an integer count of wei, which avoids floating-point rounding errors entirely. But a market-rate gas price expressed in ETH would be something like 0.00000002 ETH per gas unit; the same number is simply 20 gwei, which is why wallets and fee trackers all quote in gwei. To sanity-check a fee: gas used × gas price in gwei × 10^-9 gives the cost in ETH — a 21,000-gas transfer at 20 gwei costs 0.00042 ETH.
Go deeper:
Intro to Ether — ethereum.org — the denominations table and why on-chain amounts are integer wei.