Awarded once after a correct answer.
Separate gas used, limit and price
Useful first : Ethereum accounts and transactions
Reading path · 9 / 41 · Intermediate
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
- 01Gas limit: 80,000
- 02Gas used: 50,000
- 03Effective price: 12 gwei
- 04Execution fee: 0.0006 ETH
Read these as connected concepts, not necessarily consecutive steps.
Read the explanation
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.
Put the mechanism into context
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.
Apply it in the workshop →What this mechanism does not guarantee
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 distinction that changes the analysis
Suppose a transaction allows 80,000 units but uses 50,000 at an effective 10 gwei. The execution-fee calculation uses 50,000 × 10 gwei, or 0.0005 ETH. The limit is a bound, not a statement that all 80,000 units were consumed.
Explain it yourself
Revisit the case above. Name what is established, what remains to be checked and the evidence needed to conclude. A strong answer addresses both sides of the diagram.
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.
Use 50,000: the fee is 600,000 gwei, or 0.0006 ETH. The 80,000 limit is an allowance, not the measured consumption. Compare this with an out-of-gas case, where the permitted gas can be exhausted and the intended state changes fail.
Check your understanding
0.00042 ETH: 21,000 × 20 × 10⁻⁹. At an assumed €2,500 per ETH, that is €1.05.
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.