Skip to content
PayableWithCrypto

Glossary

What Is Wei? Ethereum's Smallest Unit and How It Relates to Gwei

Editorial teamFact-checked against official sources Last updated 3 min read

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
  1. 1The units you will actually meet
  2. 2Why Ethereum uses such a tiny unit
  3. 3Wei in fees
  4. 4Tokens have their own “wei”
  5. 5When wei matters for a payer
  6. 6Safety tips
  7. 7A worked example: checking a USDC payment
  8. 8Common questions

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

  1. Let your wallet format amounts; avoid typing raw integers unless you are certain of the unit.
  2. Double-check decimals for any token you add manually, using the issuer’s official contract address.
  3. 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.
  4. 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?
10^18, which is one quintillion (1,000,000,000,000,000,000). One gwei is 10^9 wei, so one ETH is also one billion gwei.
Why do some apps show huge numbers instead of ETH?
Contracts and raw transaction data store amounts as whole numbers in wei, or in a token's own smallest unit. Developer tools and some explorers display that raw integer. Divide by 10^18 for ETH, or by the token's decimals for a token.
Do tokens also use wei?
Not strictly. Each ERC-20 token defines its own number of decimals. Many use 18, like ETH, but USDC and USDT on Ethereum use 6. A raw value of 1,000,000 means 1 USDC, not one millionth.
Do I need to think about wei when paying?
Usually not. Wallets convert for you. It matters when you read raw explorer data, use developer tools, or manually enter amounts into a contract interface.

Sources

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.

Related terms

Compare cards Find a store