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
This example supplies twenty-one thousand gas used. It is a simple teaching input, not a live estimate of a contract call.
This example supplies twenty-one thousand gas used. It is a simple teaching input, not a live estimate of a contract call.With base ten Gwei, priority cap two and total cap twenty, the effective rate is twelve Gwei per gas.Twenty-one thousand times twelve Gwei gives two hundred fifty-two thousand Gwei, or 0.000252 ETH.The base-fee component is 0.00021 ETH and is burned. The priority component is 0.000042 ETH for the block fee recipient.
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.