In this track: Gas and execution fees
intermediate · 3 MIN READ

Gas calculation practice set

Use both units and fee caps to explain a result.

LET’S PICTURE IT

A reliable bill keeps quantities, rates, caps and components in separate columns until the final calculation.

SEE IT FOR YOURSELF
Calculate and split a manual execution feeStep 1 / 4
Calculate and split a manual execution feeGas used21,000A resource quantityGas used and gas limit are different quantitiesBase10 GweiEffective tip2 GweiTotal rate12 Gwei / gasAssumed total cap: 20 Gwei; no live prices are fetchedWork × rate21,000 × 12252,000 GweiExecution fee0.000252 ETHExact unit conversionThis calculation excludes blob and layer 2 data feesBase component0.00021 ETHBurned by protocolPriority component0.000042 ETHTo fee recipientComponents sum to the supplied 0.000252 ETH example

This example supplies twenty-one thousand gas used. It is a simple teaching input, not a live estimate of a contract call.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Exercise one: normal cap

Base is 8 Gwei, priority cap is 2 and total cap is 20. Effective price is 10 Gwei. At 30,000 gas used, the execution fee is 0.0003 ETH.

Exercise two: clipped tip

Keep base at 8 and priority cap at 2, but lower total cap to 9. Effective price becomes 9 Gwei, with an effective tip of 1. At 30,000 gas, that is 0.00027 ETH.

Exercise three: insufficient cap

Lower the total cap below the base fee. The standard transaction cannot cover the applicable base fee. The calculator should reject this as an inclusion-price case rather than return an artificially low valid fee.

Exercise four: limited scope

A layer 2 or blob transaction may have other costs. The execution-only output remains a component, not a complete quote. Explain that scope whenever you reuse the number in an interface or document.

TURN UNDERSTANDING INTO PRACTICEOpen the Gas calculator →
QUICK CHECK · NO PRESSURE

At 30,000 gas and an effective price of 9 Gwei, what is the execution fee?

Your progress stays in this browser.
Keep exploring the original referenceethereum.org ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.