In this track: Connect everything together
advanced · 6 MIN READ

Build a manual execution fee calculator

Calculate a defined fee component from supplied inputs.

LET’S PICTURE IT

A bill calculator uses the stated quantity and price rather than guessing current market conditions.

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.

Specify the inputs

Accept gas used, base fee, priority cap and maximum cap with clear units. Treat these as manual example values rather than live network measurements.

Reject an ineligible maximum

A maximum fee cap below the base fee cannot support ordinary inclusion under the model. Do not produce a plausible negative priority component.

Compute the split exactly

Use effective priority equal to the smaller of the priority cap and max-minus-base room. Multiply gas used by the resulting effective price.

Show the scope

Display total, base burn and priority payment. Explicitly exclude blob and layer-two-specific fees from this execution-only exercise.

Your acceptance target

gas used: 21000
base: 10; priority cap: 2; max cap: 20 Gwei
total: 0.000252 ETH
base burn: 0.00021 ETH
priority: 0.000042 ETH

Use only local examples and public sample addresses. State the assumptions and limits alongside the result.

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

What effective price follows base 10, priority cap 2 and max cap 20 Gwei?

Your progress stays in this browser.
Keep exploring the original referenceEthereum Improvement Proposals ↗

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