An Ethereum transaction fee is the number of gas units a transaction actually uses, multiplied by the price paid per unit. That price has two parts, a base fee set by the protocol and a tip for the validator, and the result is paid in ETH, Ethereum's native currency.
The gas limit your wallet shows is something else. It caps how much work the transaction may do, and it is not the amount you will be charged. Confuse the two and a fee looks far bigger than it is.
All of this refers to Ethereum Mainnet, the main network where ETH itself lives. Layer 2 networks bill differently.
What does gas measure?
Gas is a unit of computational effort. Every transaction first pays a base cost just for being processed, which the specification calls intrinsic gas, and then a gas cost for each step the Ethereum Virtual Machine runs for it (ethereum.org: Gas and fees, EIP-1559). The fee exists so computation isn't free: without it, anyone could flood the network with junk or send code into an endless loop.
Gas units versus gas price
Two separate quantities are involved.
- Gas units measure how much work was done. They don't change with demand. A plain ETH transfer to an ordinary account, one with no contract code, uses 21,000 units under today's Mainnet rules, whether the network is quiet or packed. Sending ETH to a smart contract, or to a wallet that delegates to contract code under EIP-7702, runs that code as well and costs more (ethereum.org: Transactions). A swap on a decentralized exchange runs more code and uses more.
- Gas price is what each unit costs, and that does move with demand. It's quoted in gwei. One gwei is one billionth of an ETH (0.000000001 ETH).
Think of a taxi: the distance is the gas used, the per-kilometer rate is the gas price. The same ride can cost more on a busy evening than at a quiet hour. The distance is identical, only the rate changed.
All gas figures in this guide follow Mainnet rules as of October 2026. Glamsterdam, the next planned network upgrade (no Mainnet date set yet), is meant to restructure the base cost every transaction pays (EIP-2780, not yet final). If it ships as currently written, a transfer to an existing ordinary account stays at 21,000, while sending ETH to a brand-new, empty address would need far more gas.
How are Ethereum gas fees calculated?
Since the London upgrade in 2021 introduced EIP-1559 (ethereum.org: Transactions), the standard formula is:
fee = gas used × (base fee + priority fee)
Both fee components are prices per unit of gas, in gwei. Multiply by the units used and you get the total in gwei, which converts to ETH (ethereum.org: Gas and fees).
A hypothetical ETH transfer
The numbers here are invented to keep the arithmetic clean. They are not a current network price.
You send 0.5 ETH to a friend whose address is an ordinary account. The transfer uses 21,000 gas. In the block that includes it, the base fee is 14 gwei, and the tip actually paid is 1 gwei.
- Price per unit: 14 + 1 = 15 gwei
- Total fee: 21,000 × 15 = 315,000 gwei = 0.000315 ETH
- Base fee portion: 21,000 × 14 = 294,000 gwei = 0.000294 ETH, burned
- Tip portion: 21,000 × 1 = 21,000 gwei = 0.000021 ETH, paid to the validator
Your balance drops by 0.500315 ETH and your friend receives 0.5 ETH. The fee comes on top of the amount sent, not out of it.
The effective price per gas
What decides the fee is the effective price per gas: the base fee of the block that includes your transaction plus the tip you actually end up paying. The specification calls it effective_gas_price (EIP-1559). It is often lower than the maximum your wallet displays, because that maximum is only a ceiling you agree to.
What is the base fee?
The base fee is the minimum price per gas a transaction must offer to get into a block. The protocol sets it; neither you nor the validator chooses it. And it doesn't go to anyone. Under EIP-1559 the base fee is burned, which permanently removes that ETH from circulation (EIP-1559).
That point is easy to miss. When people say validators earn gas fees, only the tip actually reaches them. In the transfer above, 14 of the 15 gwei per unit were burned.
How the base fee adjusts from block to block
Each block has a gas target, half of its gas limit. The next block's base fee depends on how full the previous block was relative to that target (ethereum.org: Gas and fees). Above target, it rises. Below target, it falls. Exactly on target, it stays put.
The change is capped at 12.5% per block. A hypothetical base fee of 20 gwei can reach at most 22.5 gwei after a completely full block, or drop to 17.5 gwei after an empty one. Because of that cap, a wallet knows the highest base fee the next block can have.
More predictable doesn't mean stable or cheap. When demand stays high block after block, those 12.5% steps compound, and the base fee can climb a long way in a few minutes.
Priority fee, maximum fee and actual payment
An EIP-1559 transaction carries two price fields. Most wallets fill them in automatically, but knowing what they do explains the gap between an estimate and the fee you're charged.
The priority fee (tip)
The priority fee is the part of the price that goes to the validator who includes the transaction. It gives validators a reason to pick up transactions at all, and when blocks are in demand, a higher tip can raise the chance of getting into the next block (ethereum.org: Gas and fees). It can't buy a guaranteed slot or time.
maxFeePerGas and maxPriorityFeePerGas
maxPriorityFeePerGasis the highest tip per gas unit you'll pay.maxFeePerGasis the highest total price per gas unit you'll pay, base fee and tip combined (ethereum.org: Transactions).
Both are prices per unit, not totals. The base fee is covered first, and the tip gets whatever room is left, up to its own cap. As a formula, the tip paid is min(maxPriorityFeePerGas, maxFeePerGas - baseFeePerGas).
Take a hypothetical transaction with maxFeePerGas at 40 gwei and maxPriorityFeePerGas at 1 gwei:
- Base fee 14 gwei: plenty of headroom, the full 1 gwei tip is paid, and the effective price is 15 gwei. The other 25 gwei of the cap are never spent.
- Base fee 39.5 gwei: only 0.5 gwei of headroom is left, so the tip shrinks to 0.5 gwei and the effective price is 40 gwei.
- Base fee above 40 gwei: the transaction can't enter that block. It waits until the base fee is back at or below the cap, unless it is replaced or dropped first.
Gas limit versus gas used
The gas limit is the maximum number of gas units a transaction may consume (ethereum.org: Transactions). It counts units. maxFeePerGas is a price per unit. Wallet screens often show them side by side, but they measure different things.
What happens to unused gas?
You pay only for gas actually used. The specification refunds gas_limit - gas_used at the effective price (EIP-1559). In ethereum.org's example, a plain ETH transfer sent with a 50,000 limit consumes 21,000, and the remaining 29,000 come back.
That's why a fee screen and the final fee can differ so much. Here's a hypothetical contract interaction with a 120,000 gas limit and a maxFeePerGas of 40 gwei:
- Upper bound: 120,000 × 40 gwei = 4,800,000 gwei = 0.0048 ETH. The most it could cost.
- Actual fee if it uses 80,000 gas at an effective 15 gwei: 80,000 × 15 = 1,200,000 gwei = 0.0012 ETH.
What a failed transaction costs
"Failed" can mean two different things, and they're billed differently.
Rejected before inclusion. An invalid transaction never gets into a block. Ethereum.org's example is a plain ETH transfer sent with a 20,000 gas limit, below the 21,000 it needs: it fails validation and consumes no gas.
Failed during execution. The transaction is in a block, the EVM runs it, and something goes wrong partway. State changes are rolled back, so the swap or transfer doesn't happen, but the work already done was real and gas is charged for it (ethereum.org: Gas and fees). How much depends on how it failed. Run out of gas, and everything up to the limit is consumed. If a contract aborts with the REVERT instruction, the gas used so far is charged and the remainder isn't consumed (EIP-140).
So "failed transactions are free" is wrong, and so is "they always cost the full limit".
Are Layer 2 fees the same as Mainnet fees?
No, and the numbers above don't carry over one-to-one. Layer 2 networks handle transactions off Mainnet and rely on Mainnet for security. Rollups, for example, execute transactions themselves and post the data to Ethereum (ethereum.org: Scaling). Bundling transactions this way can lower the cost per user, but each network has its own fee rules and the details vary widely. There is no fixed discount and no tip or gas figure that applies to every Layer 2. The Layer 2 guide explains how rollups work.
For the bigger picture, see what is Ethereum and the short definitions in the glossary. CoinVett's Ethereum page shows ETH's market overview, including market cap and volume.
If your wallet's estimate and the final charge don't match, look the transaction up in a block explorer: the gas used times the effective gas price shown there is exactly what you paid.
Frequently asked questions
Is the gas limit the amount of ETH I will pay?
No. The gas limit is the maximum number of gas units the transaction may use, not an amount of ETH. The fee is the gas actually used multiplied by the effective price per unit. Units you don't use aren't charged.
Who receives the base fee and the tip?
Nobody receives the base fee: it's burned under EIP-1559 and taken out of circulation. The tip actually paid goes to the validator who included the transaction, so the validator gets the tip portion, not the full fee.
Do I still pay gas if an Ethereum transaction fails?
It depends on where it failed. A transaction rejected as invalid before it gets into a block costs no gas. One that is included and then fails during execution has its state changes rolled back but still pays for the gas it consumed. If it ran out of gas, that's everything up to its limit.
Notice: All fee figures in this guide are hypothetical examples, not current network prices; the sources are linked in the text. For information only, not financial advice.