B.BlockAxis⌕ Search
Menu

Ethereum gas and EIP-1559

Gas measures computational resources; the effective gas price determines their cost.

IntermediateContent revised · 13.09.20263 min reading · allow 5–10 more minutes for the workshopBlockAxis

Your learning plan

Separate gas used, limit and price

By the end, explain the diagram in your own words, solve the case and justify the correction.

Prerequisites : Ethereum accounts and transactions

Level 2 · Intermediate →

Reading path · 9 / 35 · Intermediate

Key takeaway

Execution cost equals gas used multiplied by the effective gas price. A gas limit is not the final amount used.

The essentials

Gas measures computational resources; the effective gas price determines their cost. Execution fees equal gas used multiplied by the effective price. A conventional simple native transfer between externally owned accounts generally uses 21,000 gas; more involved calls consume more.

How it works

Under EIP-1559, the effective price combines a burned base fee and a priority fee within the sender’s cap. A cap below the base fee can prevent inclusion. The gas limit is a consumption ceiling, not necessarily the amount ultimately charged. An out-of-gas failure can still be costly.

What to watch

Fee burning does not guarantee that ETH supply always decreases: issuance also matters. Layer 2 fees may combine local execution and data-publication costs. Our calculator covers execution at an assumed effective price only. It is useful for units and scenarios, but does not query network congestion or quote a transaction.

Understand the details

Gas measures execution work; the gas limit caps how much work a transaction permits. The price determines what each unit costs. Under Ethereum’s fee mechanism, the base fee and priority fee contribute to the effective execution price, subject to the transaction’s caps. An unused gas allowance is not the same as gas consumed.

Boundaries and common mistakes

A failed transaction can still consume gas because validators executed work before the failure. Setting a high gas limit does not by itself speed inclusion. On rollups, user fees may include a separate component related to publishing data on L1, so an L1-only formula may not explain the complete bill.

The mechanism at a glance

  1. Gas limit: 80,000
  2. Gas used: 50,000
  3. Effective price: 12 gwei
  4. Execution fee: 0.0006 ETH
Separate gas used, limit and price. Conceptual map: read these four landmarks together with the explanation above.
Applied workshop · work at your own pace

Apply the lesson to a case

Assume 50,000 gas used at an effective price of 12 gwei. The limit was 80,000. Calculate the execution fee in ETH and identify which quantity would change if the same operation required more computation. Ignore additional rollup fees in this example.

Is the fee based on 50,000 or 80,000, and what is the result?

Choose one answer.

Calculate execution fees →

Check your understanding

21,000 gas at 20 gwei: how much ETH is spent?

Choose one answer.

Terms in this lesson
Gas
A measure of execution resources; gas units and the price per unit are separate quantities.
Prepare a correction note

Describe the passage and the proposed correction. This creates a local note for you to share; it sends nothing. Do not include personal or confidential information.