A concrete example
21,000 gas at 10 gwei costs 0.00021 ETH for execution.
In context
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.
The related mechanism, visually
- 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.
Explore the full explanation
Ethereum gas and EIP-1559
Gas measures computational resources; the effective gas price determines their cost.