Glossary
What Is Wei? Ethereum's Smallest Unit and How It Relates to Gwei
Definition
Wei: Wei is the smallest denomination of ether: one ETH equals 1,000,000,000,000,000,000 (10^18) wei. Ethereum software does its calculations in wei.
On this page
Wei is the smallest unit of ether (ETH). One ETH is 10^18 wei, a one followed by eighteen zeros. ethereum.org notes that technical implementations “base all calculations in Wei”, so whenever an Ethereum wallet shows you a tidy ETH amount, it has converted from a very large whole number underneath.
The units you will actually meet
| Unit | Value in ETH | Value in wei | Where you see it |
|---|---|---|---|
| Wei | 0.000000000000000001 | 1 | Raw contract and transaction data |
| Gwei | 0.000000001 | 1,000,000,000 | Gas prices and fee settings |
| Ether (ETH) | 1 | 10^18 | Balances, invoices, prices |
Other named units exist in older documentation, but in practice wallets show ETH for amounts and gwei for gas.
Why Ethereum uses such a tiny unit
Computers handle whole numbers exactly, while decimals can introduce rounding errors. Storing every amount as an integer number of wei means a contract can add, subtract and compare balances without precision loss. The cost is that raw values look enormous: 0.05 ETH is stored as 50,000,000,000,000,000 wei.
Wei in fees
A gas fee is gas used multiplied by price per gas. The price is set in wei but displayed in gwei for readability. For example, a plain ETH transfer uses 21,000 gas; at a price of 5 gwei (5,000,000,000 wei) per gas, the fee is 105,000,000,000,000 wei, which is 0.000105 ETH. Your wallet does this arithmetic and shows the result in ETH and fiat.
Tokens have their own “wei”
The ERC-20 standard lets each token choose its decimals. This trips people up when reading raw data:
| Token | Decimals | Raw value for 1 unit |
|---|---|---|
| ETH | 18 | 1,000,000,000,000,000,000 |
| A typical 18-decimal token | 18 | 1,000,000,000,000,000,000 |
| USDC on Ethereum | 6 | 1,000,000 |
| USDT on Ethereum | 6 | 1,000,000 |
Always confirm decimals from the token contract or the issuer’s documentation before entering a raw number anywhere.
When wei matters for a payer
- Reading a block explorer. The “Value” field is usually formatted in ETH, but input data and event logs show raw integers. See block explorer for how to check a payment.
- Contract interfaces. If you ever pay by calling a contract directly, many interfaces expect the amount in the smallest unit. Entering “1” sends 1 wei, not 1 ETH. Entering “1” for an 18-decimal amount where a 6-decimal token is expected would be a large overpayment in the other direction.
- Approvals. A token approval prompt may show the allowance as a raw number. An extremely long number usually means “unlimited”. Treat that as a red flag on unfamiliar sites; our guide to revoking token approvals explains how to limit exposure.
Safety tips
- Let your wallet format amounts; avoid typing raw integers unless you are certain of the unit.
- Double-check decimals for any token you add manually, using the issuer’s official contract address.
- If a signing screen shows a number you cannot interpret, stop and verify before confirming. Drainer sites rely on users approving values they do not understand; see wallet drainer sites.
- For context on the network itself, see Ethereum.
A worked example: checking a USDC payment
Suppose you paid a merchant 25 USDC on Ethereum and the order still shows unpaid. On a block explorer, the transaction’s token transfer section should show 25 USDC. If you open the raw event log instead, you will see a value of 25,000,000, because USDC has six decimals. The ETH you spent on gas appears separately as a transaction fee, calculated from gas used times the effective gas price in wei. If the explorer shows the right amount to the right address on the right network, give the merchant the transaction hash; if the amount is 0.000025, the decimals were misread somewhere and the payment was too small.
Frequently asked questions
How many wei are in one ETH?
Why do some apps show huge numbers instead of ETH?
Do tokens also use wei?
Do I need to think about wei when paying?
Sources
- ethereum.org: Intro to ether (denominations)
- ethereum.org: Gas and fees
- ethereum.org: ERC-20 token standard
Facts were checked against these pages on the date shown above. Terms change; confirm on the official page before acting. General information, not financial, tax or legal advice. See our methodology.