Ethereum Unit Converter

Gwei calculator and Wei converter

Use the fields to the right to calculate Gwei and convert Wei.

What Is Wei?

Wei is the unit of ether. One ether is made up of a lot of wei. To be exact one ether is equal to one followed by eighteen zeros wei, which's one quintillion wei or one thousand billion billion wei. Ethereum only deals in numbers of wei not in fractions of a wei.

The reason for this is that the Ethereum Virtual Machine, which is the engine that runs the Ethereum network can only store numbers. It does not understand points. So when you make a payment of point zero three seven ether the Ethereum network records it as thirty seven quintillion wei, which's a whole number. You do not see this when you look at your wallet because it shows you the amount of ether you have in a way like point zero three seven ether.. Underneath your wallet is keeping track of the number of wei you have.

The unit of wei is named after a man named Wei Dai. He is a cryptographer who came up with a proposal for cash called b-money back, in nineteen ninety eight. This was even before Bitcoin existed. The person who created Bitcoin Satoshi Nakamoto thought b-money was important so he included it in his list of references. That is why the smallest unit of ether is called wei as a way of honoring Wei Dai and the work he did.

The Denominations of Wei

Ether doesn't stop at wei and ETH. There's a full ladder of units between them, each one a thousand times the last, and every rung carries a formal name taken from a figure in computing history:
UnitAlternative NameWei ValueGwei ValueEther Value
WeiWei1 Wei10-9 Gwei10-18 ETH
KweiBabbage103 Wei10-6 Gwei10-15 ETH
MweiLovelace106 Wei10-3 Gwei10-12 ETH
GweiShannon109 Wei1 Gwei10-9 ETH
TweiSzabo1012 Wei103 Gwei10-6 ETH
PweiFinney1015 Wei106 Gwei10-3 ETH
Ether1018 Wei109 Gwei1 ETH

In practice you meet three of them. Wei is what the system uses to count. Gwei is how people talk about gas prices. ETH is what you see on exchanges and in your wallet. The other names like Babbage, Lovelace, Shannon, Szabo and Finney are, like fun facts. You might still see gwei called a "shannon" in some block explorer or forum but not often anymore.

What Is Gwei?

Gwei is a billion wei (10^9), and the name is simply "giga" attached to "wei." A single ETH contains a billion gwei, which lands it exactly halfway up the ladder between the two units people use most.

Gwei has one real job: pricing gas. Every action on Ethereum, from sending ETH to minting an NFT to swapping tokens, consumes computation, and gas is the fee for that computation. Quoted in wei, a gas price would be a ten-digit number; quoted in ETH, it would be a row of leading zeros. Gwei sits in the readable middle, where "18 gwei" is a figure you can hold in your head.

The pricing rules changed with EIP-1559, which shipped in the London upgrade on 5 August 2021. Before that, block space went to a blind auction, and you bid high and hoped. Since then, each block carries a base fee that the protocol sets on its own and then burns, permanently removing that ETH from supply, while you attach an optional tip to move up a validator's queue. A plain ETH transfer is fixed at 21,000 gas; anything that touches a contract costs more, in step with the work it demands.

How to Convert Wei to Gwei?

Every conversion below is really just moving a decimal point, since the units are powers of ten apart. Wei to gwei means dividing by a billion:
  • Start with the figure in wei.
  • Divide by 10^9 (1,000,000,000).
  • The result is the amount in gwei.
So 21,000,000,000 wei comes to 21 gwei. The reverse trip from gwei to ETH uses that same billion, since a billion gwei make one ether, so you divide gwei by 10^9. To price gwei in dollars, multiply by the ETH price and divide by a billion; near $1,700 per ETH, one gwei is worth roughly $0.0000017.

How to Convert Wei to ETH?

Wei to ETH runs on the same idea, with a larger divisor, because ETH sits eighteen zeros above wei instead of nine:
  • Start with the figure in wei.
  • Divide by 10^18 (a quintillion).
  • The result is the amount in ETH.
For example, 500,000,000,000,000,000 wei is 0.5 ETH. To put a price on it, multiply the ETH figure by the market rate; half an ether comes to about $850 when ETH trades near $1,700.

How to Convert ETH to Wei?

You usually go this direction inside code, because contracts and transactions expect their inputs in wei. Multiply by 10^18 and 2 ETH becomes 2,000,000,000,000,000,000 wei. The arithmetic is trivial but the stakes aren't: a contract acts on the exact wei it receives, so a single dropped zero sends a tenth of what you intended, and one extra sends ten times.

Almost nobody does this by hand. Libraries such as ethers.js and viem include helpers for it, with parseEther converting ETH to wei and formatEther converting wei back to ETH. Both are anchored to the 10^18 definition, which makes them far safer than tracking zeros yourself.

cookie

We use cookies to ensure you get the best experience.
By using NOWNodes, you agree to our Terms of Use and Privacy Policy.