Ethereum gas fees, explained clearly
Separate the work a transaction performs from the price of that work.


On this page
On this page
What you’ll learn
- Tell gas units from the gas price
- Explain the base fee, priority fee and max fee
- Work out a fee from a wallet estimate
- Handle a failed or stuck transaction
Every Ethereum transaction pays for the computation and storage it uses. That payment is the gas fee. It has two parts that are easy to mix up: how much work the transaction needs, measured in gas units, and the price of each unit, quoted in gwei. A wallet’s fee estimate multiplies the two.
Key takeaways
- Gas measures work. The gas price, in gwei, sets what each unit costs. The fee is the units used multiplied by the price per unit.
- The base fee is set by the protocol and burned. The priority fee is a tip to the validator that includes your transaction.
- Your max fee is a ceiling. You pay the base fee plus your tip, up to that ceiling, and nothing above it.
- A failed transaction still pays for the work done before it failed.
Gas measures work
Each operation the Ethereum Virtual Machine performs has a gas cost. A plain ETH transfer between two ordinary accounts uses 21,000 gas. A token swap or an NFT mint runs contract code and can use several times that. The gas limit on a transaction is the most units it may consume; gas that is not used is not charged.
Gas prices are quoted in gwei. One gwei is one billionth of an ether (0.000000001 ETH). Quoting in gwei keeps the numbers readable.
Base fee, priority fee and max fee
Since the London upgrade in August 2021, Ethereum fees have followed a design known as EIP-1559. Every block has a base fee per unit of gas, set by the protocol. It rises when blocks are fuller than their target and falls when they are emptier, so it tracks demand for block space. The base fee is burned, which removes that ETH from supply.
On top of the base fee you add a priority fee, or tip, which goes to the validator that includes your transaction. Wallets also set a max fee per gas: the most you are willing to pay per unit in total. If the base fee is lower than your ceiling allows, you pay the actual base fee plus your tip and nothing more. If the base fee rises above your max fee, the transaction waits until it falls back.
Worked example
Suppose a transfer uses 21,000 gas, the base fee is 10 gwei and you add a 2 gwei tip. The price per unit is 12 gwei, so the fee is 21,000 × 12 = 252,000 gwei, or 0.000252 ETH. Of that, 210,000 gwei is burned and 42,000 gwei goes to the validator. Had you set a max fee of 30 gwei, you would still pay 12 gwei per unit. These are illustrative figures, not a current network quote.
Why fees change
- Demand. When many people want block space at once, the base fee climbs block by block.
- Complexity. Contract interactions use more gas than plain transfers.
- Network. Layer 2 networks charge for their own execution plus a share of the cost of posting data to Ethereum, so their fees are usually lower, but not zero.
Failed and stuck transactions
If a transaction runs out of gas or a contract rejects it, it reverts: the intended action does not happen, but the gas used up to that point is still paid. A transaction with too low a fee can sit pending. Most wallets let you speed it up or cancel it by sending a replacement with the same nonce and a higher fee. Raising the fee makes inclusion more likely. It does nothing to make an unsafe transaction safe.
Before you confirm
- Check the network. The same wallet can be connected to Ethereum or to a layer 2, and their fees differ.
- Read the estimated fee in ETH as well as in dollars.
- Keep enough of the native asset to pay fees. Holding tokens does not cover gas.
- For a contract interaction, read what you are approving before you look at the fee.
Sources
Finished reading?
Mark it complete to track your progress through the learning paths.



