Resource accounting and the price of that resource are separate quantities.
LET’S PICTURE IT
Kilometres measure distance; a fare per kilometre turns that distance into a bill.
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.
Meter execution resources
Ethereum uses gas accounting to price and bound execution work. Different operations have defined costs under the active protocol rules. Gas is not a separate coin held in an ordinary wallet balance.
A price supplies the other dimension
A gas price is an amount of Wei per unit of gas. Gwei makes that number easier to display. Multiplying gas consumed by the effective price produces an execution-fee amount in Wei.
Costs are protocol rules, not a stopwatch
Gas does not measure a particular computer’s elapsed milliseconds. Nodes can run at different speeds while checking the same deterministic accounting. Protocol upgrades can revise resource costs.
Try dimensional reasoning
21,000 gas multiplied by 12 Gwei per gas gives 252,000 Gwei. The gas unit cancels. If your calculation produces gas squared or an unlabeled number, check which quantities you combined.