What you are actually paying for
An Ethereum fee is two independent numbers multiplied together. Gas measures work: every operation the virtual machine performs has a fixed gas cost, and the total is a property of the code your transaction runs, not of how busy the network is. Gas price measures what you pay per unit of that work, quoted in gwei, and it moves minute by minute with demand. Multiply them and divide by 10⁹ — the number of gwei in one ETH — and you have the fee.
Gwei is simply a denomination: 1 ETH = 10⁹ gwei = 10¹⁸ wei. Gas prices sit in the single or double digits of gwei, which is why fees are quoted in it rather than in ETH.
Since the London upgrade activated EIP-1559, the gas price is itself split in two. The base fee is set by the protocol, not by you: it rises when blocks run above the gas target and falls when they run below it, and it can change by at most 12.5% from one block to the next. Every wei of the base fee is burned — destroyed, not paid to anyone. On top of it you add a priority fee, the tip, which is the only part a block proposer actually receives and therefore the only part that influences how quickly you are included.
You also set a max fee per gas, a ceiling on base plus tip. It protects you from a base-fee spike between the moment you sign and the moment you land in a block. If the base fee climbs past your ceiling, your transaction simply waits; if it stays below, you pay the real price and the difference is refunded.
The formula, and the three ways the ceiling changes it
The core arithmetic is fee = gas used × (base fee + priority fee) ÷ 10⁹ with the fees in gwei and the answer in ETH. What makes EIP-1559 slightly subtler is the interaction with the ceiling, and there are exactly three cases.
The ceiling does not bind. If max fee ≥ base fee + tip, you pay base plus tip in full. This is the ordinary case and the one the formula above describes.
The ceiling clips the tip. If base fee ≤ max fee < base fee + tip, the effective tip becomes max fee − base fee and the effective gas price is exactly your max fee. The base fee is always paid first and the tip absorbs the shortfall, so a rising base fee erodes your tip before it stops your transaction.
The ceiling is below the base fee. If max fee < base fee, the transaction is not includable in that block at all. It sits in the mempool until the base fee falls back below your ceiling, or until you replace it.
The gas limit is a separate control, and it is about safety rather than price. Your wallet reserves gas limit × max fee against your balance while the transaction is pending, because that is the largest amount it could possibly cost. When the transaction settles you are charged for gas actually used at the effective price, and the rest is released. Set the limit too low and the execution runs out of gas partway through, reverts, and still charges you for everything it burned getting there — which is the worst outcome available.
Finally, the burn split. The burned amount is gas used × base fee ÷ 10⁹ and the tip is gas used × effective tip ÷ 10⁹. In a calm market the base fee dominates, so most of what you pay is destroyed rather than earned by anyone.
Worked example: a plain ETH transfer at 12 gwei
You are sending ETH to another address. The base fee is 12 gwei, you offer a 1.5 gwei tip, you set a max fee of 30 gwei, and ETH trades at $3,000.
- Gas used. A plain transfer is exactly 21,000 gas. That is the protocol's fixed intrinsic cost and no transfer can cost less.
- Check the ceiling. Base 12 + tip 1.5 = 13.5 gwei, which is under the 30 gwei max, so the ceiling does not bind and the effective tip stays at 1.5 gwei.
- Effective gas price. 12 + 1.5 = 13.5 gwei.
- Fee in gwei. 21,000 × 13.5 = 283,500 gwei.
- Fee in ETH. 283,500 ÷ 10⁹ = 0.0002835 ETH.
- Fee in fiat. 0.0002835 × 3,000 = $0.85.
- Burned. 21,000 × 12 ÷ 10⁹ = 0.000252 ETH, which is 88.9% of the fee.
- To the proposer. 21,000 × 1.5 ÷ 10⁹ = 0.0000315 ETH, the remaining 11.1%.
- Reserved while pending. 21,000 × 30 ÷ 10⁹ = 0.00063 ETH, of which 0.0003465 ETH comes back once the transaction settles.
Now watch what the ceiling does. Suppose the base fee spikes to 100 gwei while your transaction is still pending, and this time your max fee is 110 with a 20 gwei tip. The effective tip becomes min(20, 110 − 100) = 10 gwei, the effective gas price is 110 gwei, and the fee is 21,000 × 110 ÷ 10⁹ = 0.00231 ETH. You pay your full ceiling, the proposer gets half the tip you intended, and 0.0021 ETH of it is burned.
How to read the result and what to change
Separate the two levers before you touch anything. Gas used is fixed by the contract you are calling, so the only way to move it is to do something different — batch several approvals into one call, use a cheaper route, or interact with a Layer 2. Gas price is fixed by the network, so the only way to move it is to wait.
Judge the base fee against recent history rather than an absolute number. Because it can only move 12.5% per block and blocks come roughly every 12 seconds, a spike decays fast: at the full 12.5% per block the base fee halves in six blocks, because 0.875⁶ = 0.51, which is a little over a minute. That is why “wait an hour” is genuinely good advice for a non-urgent transaction, and why the sweep table on this page is useful — it prices the same transaction across the range so you can see what patience is worth in cash.
Set the tip for urgency, not for cost. A tip an order of magnitude below what other pending transactions offer will sit unmined regardless of how generous your max fee is, because the proposer's revenue comes only from tips. In quiet conditions 1–2 gwei is usually enough; during a contested mint, competitive tips run far higher, and the honest answer is to read the current distribution from a fee oracle rather than guess.
Set the max fee for protection, not for economy. Setting it well above the current base fee costs you nothing when the network is calm, because you are charged the real price and refunded the rest. What it buys is immunity from a spike between signing and inclusion. The only cost is the balance temporarily reserved, which matters when you are spending close to your whole balance.
Watch the burn share when you are reasoning about network economics. In this example 88.9% of the fee is destroyed. That share rises with the base fee and falls with the tip, so during a congested block with aggressive tipping a much larger fraction reaches the proposer.
Typical gas used by common transaction types
| Transaction | Typical gas used | Fee at 13.5 gwei | Why it varies |
|---|---|---|---|
| Plain ETH transfer | 21,000 (exact) | 0.000284 ETH | Fixed intrinsic cost, never changes |
| ERC-20 approval | about 46,000 | 0.000621 ETH | Cheaper if an allowance slot is already non-zero |
| ERC-20 transfer | about 65,000 | 0.000878 ETH | Higher when the recipient balance starts at zero |
| Wrap or unwrap ETH | about 45,000 | 0.000608 ETH | Simple mint or burn against a fixed contract |
| Uniswap-style token swap | about 150,000 | 0.002025 ETH | Depends on the number of hops and pool type |
| ERC-721 mint | about 150,000 | 0.002025 ETH | Allowlist proofs and metadata writes add a lot |
| Contract deployment | 500,000 and up | 0.006750 ETH and up | Scales with bytecode length and constructor work |
Fees in the third column are gas × 13.5 gwei ÷ 10⁹, using the same effective price as the worked example. Treat every figure except 21,000 as an order-of-magnitude guide and read the real number from your wallet's estimate or a simulation before signing.
Mistakes that cost real money
- Confusing gas limit with gas price. The limit is a safety ceiling on work; the price is what you pay per unit. Raising the limit on a transfer does not make it confirm faster and does not cost more, because you are only charged for gas used.
- Setting the gas limit too low. The transaction reverts on out-of-gas and you still pay for everything consumed before it failed. There is no refund for a failed transaction.
- Setting the max fee equal to the base fee. That leaves nothing for the tip, so the proposer earns zero from including you and there is no reason to.
- Reading the base fee from a stale page. It changes every block, up to 12.5% at a time. Take it from a live source at the moment you sign.
- Forgetting failed transactions still cost gas. A reverted swap, a mint that sold out, an approval to the wrong spender — all of them burn gas and all of them are charged.
- Assuming a wallet's fiat estimate is the fee. Wallets often display the maximum, computed from the gas limit and the max fee, not the expected charge. The refund makes the actual figure lower, sometimes by a lot.
- Ignoring approvals when budgeting. Interacting with a new token usually means an approval transaction before the one you actually wanted, so budget two fees, not one.
Where fees fit in the wider economics
Transaction fees are the demand side of a blockchain's economy; block production is the supply side. If you are looking at the other half of that ledger, the mining profitability calculator models revenue against electricity and hardware for proof-of-work chains, the mining difficulty and time calculator converts hashrate and difficulty into an expected time to find a block, and the mining hardware ROI calculator turns both into a payback period. Ethereum itself moved to proof of stake, so those tools apply to other chains rather than to this one, but the accounting question is the same: what does a unit of secured computation cost, and who receives the payment.
That framing is also how to compare on-chain execution with ordinary computing. A transaction that costs a dollar in gas is buying a few microseconds of virtual-machine time replicated across thousands of nodes, plus permanent storage and settlement guarantees. Priced per unit of raw computation it is astronomically expensive, which the cloud VM cost calculator makes obvious by comparison — and that gap is the reason rollups exist, since they amortise one settlement fee across thousands of user transactions.
Use a different tool when the chain is not Ethereum mainnet. Layer 2 rollups such as Arbitrum, Optimism and Base charge a small execution fee plus a data-availability component for posting to the parent chain, so their total cost has a term this calculator does not model. Chains that never adopted EIP-1559 use a single gas price with no burn, in which case set the base fee to zero and put the whole price in the priority field — the arithmetic then reduces to the pre-London gas × gas price model.
Key terms
- Gas
- The unit of computational work. Every EVM operation has a fixed gas cost, so the gas a transaction uses depends only on what it does, not on network conditions.
- Gwei
- One billionth of an ETH, 10⁹ gwei to the ETH. The convenient denomination for quoting gas prices.
- Base fee
- The protocol-set price per gas, adjusted each block by at most 12.5% according to how full the previous block was. Entirely burned.
- Priority fee
- The tip per gas paid to the block proposer. The only part of the fee anyone receives, and therefore the part that determines inclusion speed.
- Max fee per gas
- Your ceiling on base fee plus tip. Unspent amounts are refunded, so it acts as protection against a spike rather than as a price you commit to.
- Gas limit
- The maximum gas you authorise the transaction to consume. Funds are reserved against it; exceeding it causes an out-of-gas revert.
