Wei is the smallest unit of ether (ETH), the native currency of Ethereum. One ether is divided into wei, or one quintillion. Inside the protocol every account balance, every transfer and every fee is stored as a whole number of wei; "ether" and its other units are simply ways of writing those integers in a form people can read.
Wei matters mostly to developers, wallets and block explorers. Ordinary users see ETH amounts with a few decimal places, and gas prices in gwei (one billion wei). The unit is named after Wei Dai, the computer engineer who in 1998 described b-money, an early proposal for anonymous digital cash that the Satoshi Nakamoto Bitcoin white paper later cited.
Wei in plain terms
A wei is to ether what a single grain of sand is to a bucket. Nobody pays for coffee in grains, but the bucket is only ever counted grain by grain, so there is never any doubt about how much sand is in it.
Banks do something similar with money: an account showing $10.50 is usually stored as 1,050 cents, because whole numbers are easier for computers to add and compare exactly. Ethereum takes the same approach, only with an extremely small "cent", so that tiny fractions of an ether can still be counted precisely.
The ether unit table
The official Ethereum documentation names only wei and gwei. Developer libraries also recognise a set of older names, several of them honouring pioneers of computing and cryptography:
| Unit | Value in wei | Value in ether | Named after |
|---|---|---|---|
| wei | 1 | Wei Dai, author of b-money | |
| kwei (babbage) | Charles Babbage | ||
| mwei (lovelace) | Ada Lovelace | ||
| gwei (shannon) | Claude Shannon | ||
| szabo (microether) | Nick Szabo | ||
| finney (milliether) | Hal Finney | ||
| ether | 1 | (base unit for users) |
In practice only wei, gwei and ether are in everyday use. Nick Szabo, honoured by the szabo, is credited with the idea of the smart contract, and Hal Finney received the first Bitcoin transaction from Satoshi Nakamoto in January 2009.
Converting between wei and ether
The conversion is a fixed power of ten:
- is the integer stored on chain.
- is the number of wei in one ether.
Example: a balance stored as 2,500,000,000,000,000,000 wei is ETH. In the other direction, 0.000462 ETH (a typical simple transfer fee at 22 gwei) is wei, or 462,000 gwei.
Why contracts count in wei
The Ethereum Virtual Machine (EVM) has no decimal or floating-point numbers. It works with 256-bit unsigned integers, which can hold numbers far larger than the entire ether supply expressed in wei. Programs written in Solidity therefore receive msg.value and read balances in wei, and the language offers suffixes such as 1 ether and 1 gwei that the compiler turns into the matching integer.
Counting in whole numbers avoids the rounding errors that floating-point arithmetic would introduce, which matters when a contract splits payments, calculates interest in decentralized finance (DeFi) or settles a trade. The same idea carried over to tokens: the ERC-20 standard stores token balances as integers and publishes a decimals value (18 for most tokens, 6 for USDC) so wallets know where to place the decimal point.
Common errors in wallets and integrations come from mixing up these scales, for example treating a wei amount as ETH or applying 18 decimals to a 6-decimal stablecoin. Payment teams connecting Ethereum to accounting systems usually keep amounts as integers in the smallest unit end to end and convert only for display. Spreadsheets and many databases cannot hold an 18-decimal figure exactly, so wei amounts are often stored as text or as large-integer types to avoid silent rounding.
Wei compared with other base units
Bitcoin's smallest unit, the satoshi, is BTC, so Bitcoin has eight decimal places against Ether's eighteen. The finer division in Ethereum reflects its role as "fuel" for computation: gas prices can be set in fractions of a gwei, and very small amounts can change hands inside contracts. Other chains chose their own scales, for example the lamport of Solana ( SOL).
From a monetary point of view, wei is a denomination of ether rather than a separate asset; it is the unit of account the protocol uses internally. A wei is far too small to have any practical spending value on its own. Its tiny size is also why gas fees and gas limits are expressed in gwei rather than wei, which would produce unreadably long numbers.