Independent explainers · No ads · No affiliate links

Money, fintech & crypto, explained from primary sources

Glossary · Definition · Beginner

What is a gas fee?

Every action on Ethereum burns a little computing effort. Gas is how that effort is measured — and priced.

A row of fuel pump nozzles
Photo: “Close gas station pump” by Markus Spiske, CC0 1.0, via rawpixel.com. Converted to black and white.
On this page
  1. How is a gas fee calculated?
  2. What do base fee, priority fee and max fee mean?
  3. Why do failed transactions still cost gas?
  4. Questions readers ask
  5. Sources

A gas fee is the charge for processing a transaction on Ethereum and similar networks. Gas measures the computing work a transaction needs; the fee is the gas used multiplied by a per-unit price made up of a base fee, which is burned, and an optional tip to the validator.

How is a gas fee calculated?

Ethereum's developer docs define gas as the unit for the computational effort needed to run operations on the network. Prices are quoted in gwei, one-billionth of an ETH. The formula is: fee = gas used × (base fee + priority fee). A simple ETH transfer needs a gas limit of 21,000 units; interacting with a smart contract usually needs more.

What do base fee, priority fee and max fee mean?

TermMeaning
Gas limitThe most gas you allow the transaction to use
Base feeA per-gas price set by the protocol from previous blocks, moving by at most 12.5% per block; it is burned, removing that ETH from circulation
Priority fee (tip)An extra per-gas amount paid to the validator to include you
Max feeThe highest per-gas price you will pay; the difference above base fee plus tip is refunded

This structure arrived with EIP-1559 in the London upgrade of August 2021, according to ethereum.org's fork history. While a transaction waits to be picked up it sits in the mempool, and you can check the fee you actually paid on a block explorer.

Two vintage petrol pumps outside a small shop
Photo: “Pure gas station pumps - Cuyahoga Valley National Park” by Tim Evanson, CC BY-SA 2.0, via flickr.com. Converted to black and white.

Why do failed transactions still cost gas?

Because the network still did the work. The docs explain that if a transaction runs out of gas, its changes are reverted but the gas it consumed is still charged. Setting a gas limit too low therefore costs money and achieves nothing. Fees also vary over time, and layer-2 networks are one way to pay less — compare them in layer 1 vs layer 2 and Ethereum rollups explained.

Questions readers ask

Who receives the gas fee?

On Ethereum, the base-fee part is burned and the priority fee goes to the validator that includes your transaction.

Is gas paid in a separate token?

No. Gas is a unit of work, priced in gwei, and paid in ETH on Ethereum. You need some ETH in your wallet even to move other tokens.

Bottom line

A gas fee is computing work multiplied by a price per unit. Keep a little ETH for fees, leave sensible headroom in the gas limit, and check the fee you actually paid on an explorer. For the network itself, read what is Ethereum.

Sources

  1. ethereum.org, Gas and fees (developer documentation) (2026)Primary source
  2. ethereum.org, History of Ethereum forks (2026)Primary source

Educational content only — not financial, investment, legal or tax advice. Crypto-assets are high-risk and you could lose all the money you put in. Rules differ by country; check with your national regulator. See our risk disclosure and editorial policy.