Skip to content

What is gwei? Gas fees and EIP-1559

Gwei is one billionth of an ether and the unit gas prices are quoted in. Since EIP-1559, each transaction pays a burned base fee plus a tip to the validator.

evmquery team6 min readEthereum, explained, part 7 of 13

What is gwei?

Gwei is a unit of ether equal to 10^-9 ETH, so 1 ETH is 1,000,000,000 gwei. The name is short for “giga-wei”, where WeiA wei is the smallest unit of ETH, one quintillionth of an ETH, and contracts count ETH amounts in it.See it in the glossaryRead the explainer is the smallest unit Ethereum has. Gas prices need a unit this small, because a price of 0.000000020 ETH per unit of gas is awkward to say. Everyone says “20 gwei” instead.

Three units are worth remembering, and each is 1,000,000,000 times the one below it:

  • Ether (ETH) is the unit you see in WalletA wallet is the app or device that holds your keys and lets you sign transactions and view your assets.See it in the glossary and on exchanges.
  • Gwei is the unit gas prices are quoted in.
  • Wei is the smallest unit. 1 ETH is 1,000,000,000,000,000,000 wei. Smart contractA smart contract is a program stored at an address on the blockchain that anyone can call and that runs exactly as written.See it in the glossaryRead the explainer and the network count everything in whole wei, because Ethereum has no decimal point inside a transaction.
Three rungs from top to bottom: 1 ether, the coin you hold. 1,000,000,000 gwei, the unit gas prices are quoted in. 1,000,000,000,000,000,000 wei, the smallest unit. Each step down multiplies the count by 1,000,000,000.
Each rung is a billion of the one below. Gas prices live on the middle rung.

A balance read from a contract arrives in wei, as a long integer such as 682960961506566725. Divide by 10^18 for ether or by 10^9 for gwei, or use the free converter.

What is gas?

GasGas measures the computing work a transaction needs, and you pay for it in small amounts of ETH.See it in the glossaryRead the explainer is the unit of work on Ethereum. Every step a transaction asks the network to take costs a fixed number of gas units, like fuel used per kilometre. Two numbers decide your bill:

  1. Gas used is how much work the transaction needs, like litres of fuel. An ETH transfer to an ordinary wallet address takes 21,000 gas. Swapping tokens or minting an NFT takes far more, because the contract does more steps.
  2. Gas price is what you pay per unit of gas, like the price per litre. It is quoted in gwei.

Multiply them to get the fee. At 21,000 gas and 22 gwei, the fee is 21,000 × 22 = 462,000 gwei.

What EIP-1559 changed

EIP-1559 split the gas price into two parts. An EIPAn EIP is a public proposal to improve Ethereum, written in a standard format and discussed openly before adoption.See it in the glossaryRead the explainer (Ethereum Improvement Proposal) is a numbered design document for the network, and this one went live in the London upgrade in August 2021. Before it, you bid a single price and hoped it was enough.

  • The Base feeThe base fee is the minimum price per unit of gas that the network sets for every transaction in a block.See it in the glossaryRead the explainer is set by the network for each block. Every transaction in the block pays it, and it is burned, which means the ETH is destroyed and goes to nobody.
  • The Priority feeThe priority fee is an optional tip you add to a transaction to get it included sooner.See it in the glossaryRead the explainer, usually called the tip, is what you add to be picked up quickly. It goes to the validator, the computer that adds the block to the chain.
Example fee receipt for a simple ETH transfer. Fuel used, called gas used: 21,000 gas. Network charge, the base fee of 20 gwei: 420,000 gwei, burned. Tip, the priority fee of 2 gwei: 42,000 gwei, to the validator. Total 462,000 gwei, which is 0.000462 ETH.
Illustrative receipt: gas used × (base fee + tip) = total. The base fee portion is burned, and the tip goes to the validator.

Max fee and the refund

Your wallet also sets a ceiling called the max fee per gas. It is the most you will pay per unit of gas, base fee and tip together. In the transaction the two settings are named maxFeePerGas and maxPriorityFeePerGas.

You pay the base fee that applies to the block plus your tip. The difference between that and your ceiling stays in your wallet. Say you set a max fee of 30 gwei and a tip of 2 gwei, and the block’s base fee is 20 gwei. You pay 22 gwei per gas. On a 21,000 gas transfer, the 8 gwei you did not need adds up to 168,000 gwei, or 0.000168 ETH, that never leaves your balance.

The ceiling protects you when demand jumps between sending and block building. If the base fee rises above your max fee, the transaction waits until the price falls back.

Why gas fees rise and fall

Gas fees rise when many people want space in blocks and fall when few do. Each block has a target size, which is half of its maximum. If a block is fuller than the target, the next base fee goes up. If it is emptier, the next base fee goes down.

The EIP caps the step at one eighth, so the base fee moves by at most 12.5% from one block to the next. A base fee of 20 gwei can rise to 22.5 gwei after a full block, or fall to 17.5 gwei after an empty one.

Blocks arrive roughly every 12 seconds, so a busy period lifts the base fee quickly and a quiet one lets it drift back down. This is why the same transfer, always 21,000 gas, can cost very different amounts on different days. Layer 2A layer 2 is a separate chain built on top of Ethereum that processes transactions more cheaply while relying on Ethereum for security.See it in the glossaryRead the explainer networks such as Base batch many transactions before posting them to Ethereum. A transaction there usually costs a fraction of the same one on Ethereum. Their price also moves with demand.

A worked example: sending ETH

Take a plain ETH transfer with example values. They are not a live quote, and real base fees on Ethereum are often far lower. At block 26,391,508 on 2026-11-11 the base fee was about 0.05 gwei. Round numbers keep the arithmetic easy.

  • Gas used: 21,000
  • Base fee: 20 gwei
  • Tip: 2 gwei

The price per gas is 20 + 2 = 22 gwei. The total fee is 21,000 × 22 = 462,000 gwei. Of that, 21,000 × 20 = 420,000 gwei is burned and 21,000 × 2 = 42,000 gwei goes to the validator.

In ether, 462,000 gwei is 0.000462 ETH. Of that, 0.00042 ETH is burned and 0.000042 ETH goes to the validator. If the base fee were 40 gwei, the same transfer would cost 21,000 × 42 = 882,000 gwei, or 0.000882 ETH. Gas used stays the same, and only the price per gas changes.

See it on a real number

The card shows Ethereum’s base fee in gwei, as last copied into a contract on Base. That contract uses it to price posting its data to Ethereum. Type 462000 into the gwei field of the ETH unit converter to see the same amount as 0.000462 ether and 462,000,000,000,000 wei.

Ethereum base fee, as last reported to Base

Reading live from Base

Convert units in the ETH unit converter

Show the queryformatUnits(oracle.l1BaseFee(), 9)

Common mix-ups

  • “Gwei is a different coin.” Gwei is a unit of ETH, like cents are a unit of a euro.

  • “I always pay my max fee.” You pay the base fee plus your tip, and the rest of your ceiling stays in your wallet.

  • “The tip is burned.” The base fee is burned, and the tip goes to the validator.

  • “A transfer costs the same gas every day.” The gas used stays at 21,000, and the price per gas changes with demand.

Summary

  • Gwei is one billionth of an ether, and gas prices are quoted in it.
  • Your fee is the gas a transaction uses times the price per gas. The price is a burned base fee plus a tip for the validator.
  • You pay the real price, not your maximum, and the unused part of your ceiling stays in your wallet.

For developers

Chains return fees in wei, and formatUnits(value, 9) converts them to gwei. The hot wallet low gas balance alert shows a full script that checks several wallets and warns when gas runs low.

Share

Read balances in wei, gwei or ether

Create a free API key and read any wallet's native balance in one request.