Gas on Ethereum is the unit that measures the work the network does to process a transfer or a smart contract call. The fee equals the gas used multiplied by the gas price and is paid in ether; the gas price is usually quoted in gwei.
How the Fee Is Calculated
Every operation on Ethereum costs a fixed number of gas units. A plain ether transfer uses 21,000 gas, while a token transfer or a swap on a decentralized exchange uses more, because smart contract code has to run. The total fee is the gas used multiplied by the price of one unit. That price is not fixed: it is set by demand for space in a block. When the network is busy, the price rises and the same transfer can cost several times more.
Base Fee and Tip
Since the London upgrade in 2021, the gas price has two parts. The base fee is the same for everyone in a block; the network adjusts it automatically according to load and burns it, removing that ether from circulation. On top, the user adds a tip for the validator so the transfer gets into a block sooner. The wallet picks both parts itself but lets you set a maximum you are willing to pay; nothing above the actual price is charged.
Gas Limit and Failed Transactions
Besides the price, the wallet sets a limit on how much gas the transaction may use. If the operation turns out to be more complex than expected and runs out of gas, it is reverted, but the gas already spent is not refunded. That is why a failed DeFi swap still costs money. Without ether at the address you cannot pay for gas, so you cannot send any ERC20 token either. This is a common reason for tokens getting “stuck” in a new wallet.
How to Pay Less
Send non-urgent transfers when the network is quieter; the wallet and block explorers show the current gas price. For small amounts, layer 2 networks work well: they record their results on Ethereum, and fees there are many times lower. Do not set a price that is too low by hand, or the transfer may sit in the mempool queue for a long time. Other Ethereum-compatible networks also count gas but charge it in their own coin, such as BNB.
A user sends 0.1 ETH to a friend. The transfer uses 21,000 gas. With a notional base fee of 8 gwei and a 1 gwei tip, the gas price is 9 gwei, so the fee is 21,000 × 9 = 189,000 gwei, or 0.000189 ETH. The part calculated from the base fee is burned, and the validator receives the tip.
Related terms
GweiEthereumERC20Smart ContractMempoolLayer 2 Solutions
On the site
How to buy cryptoCryptocurrenciesBitcoin fees
This article was written by AI. Check specific rates, taxes and broker terms with primary sources.