UNDERSTAND BEFORE USING

Gas fees: calculation, gwei and failed transactions

After this lesson: Distinguish the amount of work, its price and the transferred amount.

Choose your explanation

01 / BEGINNER

First, what is it?

On Ethereum, gas measures the resources needed to execute an operation. It is not a currency. Its price is paid in ETH and often expressed in gwei, a very small ETH unit. Fees pay for network use, not the euro size of your wallet.

Words to know

Gas used
The quantity actually consumed during execution.
Gwei
One billionth of an ETH: 1 gwei = 0.000000001 ETH.
Gas limit
The maximum gas the transaction permits consuming.

The idea to understand

Execution fees equal gas used multiplied by its effective price. Two very different transfer amounts can therefore incur similar fees if the work and gas price are comparable.

SEE IT IN PRACTICE

Now, a concrete example

Fictional simple-transfer calculation: 21,000 gas × 20 gwei = 420,000 gwei = 0.00042 ETH. This fee is additional to the ETH sent. The 20 gwei price is chosen for learning, not a live quote.

YOUR TURN

Does a 60,000 gas limit mean all 60,000 will necessarily be consumed?

Form an answer before opening the explanation. You can also discuss it aloud.

Compare with the explanation

No. The limit is a ceiling. Fees depend on work actually charged. An insufficient limit can cause execution to fail; raising it is different from raising the gas price.

3 explanation levels

A useful companion: Ethereum explained: ETH, contracts and gas

THE SHORT ANSWER

On Ethereum, execution fees equal gas used multiplied by the effective gas price. Gas is a quantity of resources; gwei is a small unit of ETH used to express its price. Cost depends on the operation and network conditions.

Sources and further reading

Page updated on
Documentation checked on · WhyTheBlockchain · Editorial approach