One coin, many units
Ether is divisible to eighteen decimal places, so it needs a family of units to keep numbers readable. Smart contracts count in the smallest unit, wei, while users think in ether and the network quotes gas in gwei. Knowing the conversion between them is essential to read a transaction.
The units
| Unit | Value in wei |
|---|---|
| Wei | 1 |
| Kwei | 1,000 |
| Mwei | 1,000,000 |
| Gwei | 1,000,000,000 |
| Szabo | 1,000,000,000,000 |
| Finney | 1,000,000,000,000,000 |
| Ether | 1,000,000,000,000,000,000 |
Why gwei matters
Gas prices are quoted in gwei because ether would involve awkward fractions of a cent. A simple transfer costs 21,000 gas. At 20 gwei per gas, that is 21,000 times 20 gwei, or 0.00042 ether. Converting the numbers before you confirm a transaction tells you what the fee really costs.
Do not use a normal calculator
Decimal floating point cannot represent eighteen significant digits, so ordinary calculators silently round and give wrong wei values. The Ethereum Unit Converter uses exact decimal maths, so every digit is preserved from wei up to ether.
Reading a transaction
- Note the gas used and the gas price in gwei.
- Multiply to get the fee in gwei.
- Convert to ether to see it in familiar terms.
- Compare with your balance before confirming.
When you work out profit including fees, feed the ether figures into the Crypto Profit Calculator. And if you need to move between number bases for raw contract data, the Number Base Converter handles hex, decimal and binary.