Logo
Blockchain · Developer

Wei, Gwei, and Ether: Ethereum Units Explained

26/09/2026
Ethereum logo — wei, gwei and ether denominations

Image: "Ethereum Background" by cryptocoin, CC BY 2.0

Ethereum balances and gas fees are quoted in three different units — wei, gwei, and ether — and confusing them is a classic source of off-by-18-zeros bugs. This guide covers the full denomination table, when each unit is used, and how to convert between them without making mistakes.

The Ethereum Denomination Table

Ether denominations follow powers of 10, each named after a figure in computing or cryptography history:

UnitAlternative nameWei valueCommon use
Wei—10⁰ = 1Solidity / smart contracts
KweiBabbage10³Rarely used
MweiLovelace10⁶Rarely used
GweiShannon, nanoether10⁹Gas prices
MicroetherSzabo10¹²Rarely used
MillietherFinney10¹⁵Occasional
EtherETH10¹⁸Balances, transfers

Why Gas Is Priced in Gwei

A typical gas price is something like 20 gwei per unit of gas. In wei that would be 20,000,000,000 — unreadable — and in ether it would be 0.00000002, which is equally awkward to type. Gwei sits at a human-friendly magnitude for gas costs, which is why wallets, explorers, and RPC methods like eth_gasPrice (returned in wei, displayed in gwei) all converge on it.

Worked Conversion Examples

  • Wei to ETH: divide by 10¹⁸. 1,500,000,000,000,000,000 wei = 1.5 ETH.
  • Gwei to ETH: divide by 10⁹. 25 gwei = 0.000000025 ETH.
  • Gwei to wei: multiply by 10⁹. 30 gwei = 30,000,000,000 wei.
  • Transaction fee: gas used × gas price. 21,000 gas × 20 gwei = 420,000 gwei = 0.00042 ETH.

EIP-1559: Base Fee and Priority Fee

Since the London upgrade, every transaction specifies a maxFeePerGas and a maxPriorityFeePerGas, both denominated in wei but almost always discussed in gwei. The base fee is burned; the priority fee (tip) goes to the validator. When you read "gas is 15 gwei" on a tracker, that figure is the base fee — your effective cost is base + tip, capped by your max fee.

Avoiding Conversion Mistakes

The most expensive unit error in Ethereum development is mixing up wei and gwei — a factor of a billion. Rules of thumb: smart contracts and RPC responses are always in wei; UI and wallets display gwei or ETH; and whenever you do manual math, verify with a converter. Our Wei Converter converts between wei, gwei, and ETH instantly in both directions — and the Ethereum Toolkit bundles it with address checksumming, calldata decoding, and hash utilities. For how calldata values are encoded in wei, see our calldata and ABI encoding deep dive.

Frequently Asked Questions

How many wei are in 1 ETH?

Exactly 1,000,000,000,000,000,000 wei (10¹⁸). Ether has 18 decimal places, the same as most ERC-20 tokens.

Is gwei the same as wei?

No — 1 gwei = 1,000,000,000 wei (10⁹). Gwei is a denomination of wei, in the same way that a cent is a denomination of a dollar.

What is a good gas price in gwei?

It varies with network demand — single digits in quiet periods, 50+ gwei during congestion. Check a live gas tracker or your wallet's suggested fee rather than hardcoding a number.

Why does Solidity return values in wei?

Solidity has no floating-point type, so all Ether arithmetic is done in the smallest indivisible unit — wei — to preserve precision. Division happens only at the display layer.

Related Insights

Privacy & Cookie Preferences

We use cookies to enhance your experience, analyze site performance, and support our marketing efforts. Your privacy matters, and you can withdraw consent at any time.