0 minsPublished on 12/15/2023

What are Ethereum gas fees? ETH fees explained

Ethereum gas fees are necessary to pay miners and secure the network. Here’s how they work, why they can be so high, and how you can pay less.

By Corey Barchat

What are Ethereum gas fees

Mrig P also contributed to this article

Ethereum is the world’s first, largest, and most widely used decentralized application (dApp) blockchain. It hosts thousands of dApps that attract millions of users who conduct billions of dollars worth of daily transactions. 

While these transactions differ in size, form, and nature, they all have one thing in common: gas fees.

This article explains what Ethereum gas fees are, why they’re sometimes expensive, how you can pay lower fees, and the Ethereum upgrades that aim to lower them.

What are Ethereum gas fees?

Gas fees are the transaction fees users pay on the Ethereum blockchain to conduct transactions (like sending or swapping ETH) and execute smart contracts. Users pay this fee in ETH and the network nodes earn a fraction of fees for validating transactions via Proof of Stake (PoS).

How are gas fees calculated?

To best understand how gas fees are calculated, we’ll need to first clearly define a few terms. 

1. Gas: Gas is the unit that measures computational power required to conduct a transaction, which varies depending on the complexity of the transaction. The computation and gas units needed for a token swap, for example, will be much lower than for minting an NFT or publishing a smart contract

2. Gas price: The gas price is the price per unit of gas, and it is measured in gwei, a smaller unit of ETH that equals 0.000000001 ETH (10-9 ETH). (Conversely, 1 ETH equals 1 billion gwei).

3. Gas fees: Gas fees are the final fees paid by users to complete a transaction. 

A graph of sample Etherscan gas prices (in Gwei)

Now, let’s see where these terms fit into the gas fee calculation formula.

Gas fee calculation before the London upgrade

The formula to calculate gas fees has changed since the London upgrade, which was implemented in August 2021. 

Before the London upgrade, users had to make an assumption about their gas price based on network congestion, or how busy the network is at any given time. In doing so, every user tried to outbid as many other users as possible to try and get their transactions validated first.

The formula to calculate the gas fees before the London upgrade was:

Gas fee = Gas units (limit) * Gas price per unit

By default, the minimum gas unit you must spend on any Ethereum transaction is 21,000.

So, let’s suppose Alice is sending 5 ETH to Bob. The gas unit is 21,000 by default and Alice chooses to pay 300 gwei per unit based on the current network conditions.

Going by the above formula, Alice would pay a gas fee of 21,000 * 100 gwei. Or 2,100,000 gwei, which equals 0.002093 ETH.

5.002093 ETH will therefore be withdrawn from Alice’s crypto wallet. Bob will receive 5 ETH and the rest goes toward making the transaction successful.

Gas fee calculation after the London upgrade

The London upgrade implemented EIP-1559, which proposed a new mechanism to calculate gas fees with a fixed per-block base fee and flexible block size to tackle network congestion. 

The goal of this upgrade was to remove the unpredictability of gas fees based on network congestion. The lack of surety forced users to try and outbid the gas prices of other users, consequently taking the gas prices even higher.

With a pre-defined base gas price for every block, the guesswork is no more in the equation and the new formula is:

Gas fee = Gas units (limit) * (base fee + priority fee)

Now, let’s suppose Bob wants to send 5 ETH to Alice. The gas limit is 21,000, the block fee at that instance is 30 gwei, and Bob adds a priority fee of 10 gwei for his transaction to be validated faster.

So, Bob would pay a gas fee equal to 21,000 * (30+10) = 840,000 gwei or 0.000839 ETH. 

Here, the network burns the base fee, i.e. 21,000*30 gwei while the priority fee — 21,000*10 gwei — goes to the validator that adds the transaction to the chain.

While most cryptocurrency wallets automatically detect the demand and set the priority fee and gas limit by themselves, you can use advanced settings to alter the numbers when finalizing a transaction.

In the below MetaMask screenshot, you can see the base price is 16 gwei and the wallet recommends a priority fee of 0.5 to 7 gwei. Further, the wallet also shows the transaction times for respective fees that you may be willing to pay. 

A MetaMask screenshot displaying gas fee details for an ETH transfer.

It’s important to note though that the London upgrade was not aimed at directly lowering the average gas cost on Ethereum. Instead, the aim was to limit the waste of gas due to uncertainty.

Why are ETH gas fees high?

It is not rare for people to pay hundreds of dollars to execute simple swapping or buying transactions on Ethereum. That is especially the case when the demand is high, such as during the 2021 bull market

But why? 

While every blockchain has three core attributes - security, scalability, and decentralization - it is only practical to maximize on two of these while compromising with the third one. 

Ethereum co-founder Vitalik Buterin called this the blockchain trilemma.

A visual representation of the blockchain trilemma.

Considering Ethereum’s key features are decentralization and security, the network compromises with scalability. As a result Ethereum can only process between 20 and 30 transactions per second.

For a blockchain where users transact billions worth of value every day, that’s an alarmingly slow transaction speed.

Now, when the network is busier than usual, there could be hundreds of transactions sent every second to the mempool — a waiting area for transactions. However, as we know, Ethereum validators can only validate 20-30 per second.

An image showing transactions start in the mempool before being picked up and validated on the Ethereum blockchain .

Naturally, validators prefer to select transactions with higher gas prices. Due to this, users keep trying to outbid other transaction requests to get their transaction included in a block first.

You can think of this as a blind auction, where users will make bids (in the form of gwei) to incentivize miners to pick up their transactions. Just like a traditional auction, the highest bids will be chosen. 

As a result, gas prices keep rising until the transaction volume drops.

Since the London upgrade, however (as you saw in the gas price calculation section), the blind auction analogy is no longer valid. Now, the network defines a fixed base fee for every new block depending on the demand for transactions in the previous block. 

While the base fee is enough for a transaction to go through, the users can still add a tip (priority fee) for validators to make their transactions go faster. 

Note: During a popular NFT mint or other high network congestion activities, gas prices can still be exorbitant.

How does the Ethereum Merge affect gas fees?

Since its launch, Ethereum relied on a Proof of Work (PoW) consensus algorithm to validate transactions and add them to the network. 

In September 2022, however, the Ethereum mainnet merged with the Beacon chain, marking the event popularly called The Merge. With this, Ethereum transitioned from the Proof of Work consensus to Proof of Stake (PoS).

Contrary to popular belief, The Merge itself didn’t aim to lower gas prices. And that is why it has so far had little impact on the gas fee Ethereum users pay.

However, Ethereum’s switch to PoS was crucial for deploying sharding — a mechanism in which multiple side chains are deployed to offload transactions from the mainnet. 

Ethereum will have 64 shard chains that will help significantly increase its scalability and transaction speed. According to Ethereum co-founder Vitalik Buterin, Ethereum will be able to process 100,000 transactions per second.

Higher scalability would mean extremely lower network congestion. In theory, this means transactions will go through without any problem even during times of high volume.

For live Ethereum price and market metrics, view our Ethereum Price page.

ETH gas fees frequently asked questions (FAQs)

What happens if you don’t pay enough gas fees?

Setting the gas price or gas limit lower than a certain required amount may result in failed transactions. If that happens, your gas fee amount would still get deducted from your wallet but the transaction wouldn’t go through. 

Always first check the minimum gas price at any given time across various Ethereum calculators to ensure your transactions don’t fail.

Price chart showing the gas fees required for different transactions speeds

How can I choose the correct gas price?

Ethereum’s London upgrade has removed uncertainty from gas price calculations. 

Now, whenever you conduct a transaction, there is always a base fee attached to it that the network decides and you cannot change. However, you can add a priority fee as a tip to validators and expect them to pick your transaction sooner. 

The gas unit (and thus the gas fee) needed for different kinds of transactions is different. For instance, you will need to pay considerably more for complex transactions such as executing a smart contract.

How can I pay lower gas fees?

Even with fixed base fees, there’s no certainty that the gas fees will be low. It all depends on network congestion.

To avoid paying high gas prices, you can do one of these three things:

1. Plan ahead

Schedule your transactions for times with less network congestion. Try not to transact during popular NFT mints, as the network may get congested.

2. Adjust fees in your wallet

Most wallets will allow you to preview the estimated gas price that you’ll pay. You can alter these numbers in the advanced gas settings within the wallet. 

3. Use an external calculator

Several tools can show you what current gas prices look like. Some of these include

To learn more about Etherscan, see our article What is Etherscan and how do you use it?

Buy Ethereum via MoonPay

Now that you understand how gas fees work on Ethereum, you may feel comfortable enough to experiment with the cryptocurrency yourself.

You can buy Ethereum (ETH) via MoonPay or through any of our partner wallet applications with a credit card, bank transfer, Apple Pay, Google Pay, and many other payment methods.

Sell Ethereum via MoonPay

MoonPay also makes it easy to sell Ethereum when you decide it's time to cash out. Simply enter the amount of ETH you'd like to sell and enter the details where you want to receive your funds.

Swap Ethereum for more crypto

Want to exchange Ethereum for other cryptocurrencies like Bitcoin? MoonPay allows you to swap crypto cross-chain with competitive rates, directly from your non-custodial wallet.

Corey Barchat
Written byCorey Barchat

You might also like