Ethereum Gas Fee Calculator (EIP-1559)

This calculator converts gas units and gwei prices into the fee you actually pay, using the EIP-1559 fee market that Ethereum has run since the London upgrade. Enter the gas your transaction consumes, the current base fee, the priority fee you are offering and your max fee per gas, and it returns the cost in gwei, ETH and fiat, splits it into the portion burned and the portion paid to the validator, and shows the worst-case amount reserved against your gas limit along with the refund you get back. It also sweeps the fee across a range of base fees so you can see what waiting for a quieter block is worth.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Gas usedUnits of computation the transaction consumes: exactly 21,000 for a plain ETH transfer, more for any contract call.21000 gas
Gas limitThe ceiling you set in the wallet. It reserves funds but you are only charged for gas actually used.21000 gas
Base fee per gasSet by the protocol from how full recent blocks were. Read it from a block explorer, not from your wallet's total estimate.12 gwei
Priority fee (tip)What you offer the block proposer on top of the base fee to get included sooner.1.5 gwei
Max fee per gasThe most you will pay per gas. It caps base fee plus tip, and anything unspent is refunded.30 gwei
ETH priceSpot price in your currency. Set to 0 to work in ETH only.3000 $
Number of transactionsUse this to price a batch of identical transactions, such as a series of approvals or mints.1

It returns

  • Transaction fee — One transaction at the effective gas price, in your fiat currency.
  • Fee in ETH
  • Fee in gwei
  • Burned (base fee) — Permanently removed from supply under EIP-1559.
  • Paid to the validator (tip)
  • Maximum reserved (gas limit × max fee) — Held against your balance while the transaction is pending; the unused part comes back.
  • Total for the batch

The formula

fee=g(fbase+ftip)109
ftip=min(ftip,fmaxfbase)
Cmax=glimitfmax109

In plain text: fee (ETH) = gas used × (base fee + priority fee) ÷ 10⁹

  • gGas used by the transaction (gas units)
  • f_baseBase fee per gas, set by the protocol (gwei)
  • f_tipPriority fee per gas offered to the proposer (gwei)
  • f_maxMax fee per gas you are willing to pay (gwei)
  • 10⁹Gwei in one ETH (gwei/ETH)

Under EIP-1559 the effective gas price is min(f_max, f_base + f_tip), so the tip is squeezed first when the ceiling binds. If f_max is below f_base the transaction is not includable at all.

Updated Category Crypto Mining & Blockchain Costs Verified against published test cases Reading time 12 min

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.

  1. Gas used. A plain transfer is exactly 21,000 gas. That is the protocol's fixed intrinsic cost and no transfer can cost less.
  2. 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.
  3. Effective gas price. 12 + 1.5 = 13.5 gwei.
  4. Fee in gwei. 21,000 × 13.5 = 283,500 gwei.
  5. Fee in ETH. 283,500 ÷ 10⁹ = 0.0002835 ETH.
  6. Fee in fiat. 0.0002835 × 3,000 = $0.85.
  7. Burned. 21,000 × 12 ÷ 10⁹ = 0.000252 ETH, which is 88.9% of the fee.
  8. To the proposer. 21,000 × 1.5 ÷ 10⁹ = 0.0000315 ETH, the remaining 11.1%.
  9. 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

Gas is a property of the code being executed. Only the first row is fixed by the protocol; the rest vary with the contract, the token and the state being written.
TransactionTypical gas usedFee at 13.5 gweiWhy it varies
Plain ETH transfer21,000 (exact)0.000284 ETHFixed intrinsic cost, never changes
ERC-20 approvalabout 46,0000.000621 ETHCheaper if an allowance slot is already non-zero
ERC-20 transferabout 65,0000.000878 ETHHigher when the recipient balance starts at zero
Wrap or unwrap ETHabout 45,0000.000608 ETHSimple mint or burn against a fixed contract
Uniswap-style token swapabout 150,0000.002025 ETHDepends on the number of hops and pool type
ERC-721 mintabout 150,0000.002025 ETHAllowlist proofs and metadata writes add a lot
Contract deployment500,000 and up0.006750 ETH and upScales 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.

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.

Frequently asked questions

How do I convert gwei to ETH?

Divide by one billion. 283,500 gwei is 283,500 ÷ 10⁹ = 0.0002835 ETH. Going the other way, multiply by 10⁹: 0.01 ETH is 10,000,000 gwei. Wei is the smallest unit, 10¹⁸ to the ETH, so one gwei is a billion wei.

Why is my gas fee so high?

Either the transaction does a lot of work or the base fee is elevated, and the two have completely different remedies. Check the gas used first: 21,000 means a simple transfer, while 150,000 or more means contract execution that no fee setting will shrink. If gas used is modest and the fee is still large, the base fee is high and waiting is the fix — it can fall 12.5% per block, so a few minutes of patience often halves the cost.

What is the difference between gas limit and gas price?

The gas limit caps how much work the transaction may do; the gas price sets what you pay per unit of that work. Raising the limit does not raise your cost, because you are only charged for gas actually used, and the unused reservation is released. Raising the price is what makes a transaction more attractive to include.

What happens to the burned base fee?

It is destroyed. EIP-1559 removes the base fee from circulation entirely rather than paying it to a validator, which is why total ETH supply falls whenever fee burn exceeds new issuance. Only the priority fee reaches the block proposer, so the proposer's incentive to include you depends on the tip alone.

How much gas does an ERC-20 transfer use?

Commonly around 65,000, against 21,000 for a plain ETH transfer. The exact figure depends on the token's implementation and on whether the recipient's balance slot is already non-zero — writing to a fresh storage slot costs considerably more than updating an existing one. Your wallet's estimate simulates the actual call, so trust it over any published average.

Do I pay if my transaction fails?

Yes. Gas is consumed by execution, not by success, so a reverted swap or a mint that sold out still costs whatever the virtual machine spent before the revert. An out-of-gas failure is the most expensive version, because it consumes the entire gas limit. This is the strongest practical argument for simulating a transaction before signing it.

What is a normal priority fee?

In quiet conditions 1 to 2 gwei is usually enough to be included within a block or two, because proposers take whatever tips are available and blocks are not full. During contested events tips rise sharply and there is no stable normal — read the current distribution from a fee oracle or your wallet's fast estimate rather than relying on a remembered figure.

Why does my wallet show a higher fee than this calculator?

Because most wallets display the maximum, calculated from the gas limit multiplied by the max fee per gas. That is the amount reserved from your balance, not the amount you will be charged. The actual fee uses gas actually consumed at the effective price, and the difference is refunded in the same transaction.

Does setting a very high max fee cost me anything?

Not in fees, as long as the base fee stays below it: you are charged the real price and the excess reservation is released. The one real cost is liquidity — the reserved amount is unavailable while the transaction is pending, so a very high ceiling can cause a send to be rejected for insufficient funds when you are spending close to your whole balance.

References