In this track: From send to settlement
beginner · 3 MIN READ

Gas used versus gas limit

A ceiling on work is different from the work actually consumed.

LET’S PICTURE IT

A taxi budget can cap how far you are willing to travel without requiring the taxi to drive that entire distance.

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.

The limit bounds execution

A transaction specifies a gas limit. It sets the maximum execution resource allowance under the applicable rules. Raising this ceiling does not by itself force a contract to perform extra work or bypass a failing check.

Used gas describes the result

The receipt reports actual gas consumption under protocol accounting. The execution fee uses gas used and effective gas price, rather than simply multiplying the limit by an advertised tip.

An estimate is conditional

A wallet or provider may simulate the action to estimate gas. The estimate depends on inputs and state. Conditions can change before inclusion, and a successful estimate is not a blanket guarantee of the final outcome.

Work the sample

At 21,000 gas used and an effective price of 12 Gwei, the execution fee is 252,000 Gwei, or 0.000252 ETH. A higher permitted limit would not change that fee if the accounted gas used stayed the same.

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

If the limit is 50,000 but gas used is 21,000, which quantity enters the execution fee calculation?

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.