Deciphr Academy
Track 1 · Module 5 · Lesson 2 of 6 · 6 min read

What is gas in Ethereum?

Short answer

Gas measures how much computing work a transaction needs.1 Your fee is the gas used multiplied by a price per unit of gas, and it is always paid in ETH.2

Typical gas usedSend ETH21,000Send a token65,000Move an NFT84,904Swap on Uniswap184,523Fee = gas used × (base fee + tip)paid in ETH, priced in gwei
Fig. 2. Bigger jobs use more gas. A plain ETH payment uses the least.

A unit of work

Gas is the unit that measures the computing work an action on Ethereum needs.1 Each computing step has a set gas cost.3,2

Why charge for work at all? Without a fee, anyone could flood the network with spam, or run code that loops forever.1 Because every step costs money, spamming the network becomes expensive.2

Gwei and wei

Gas is paid in ETH. The price of one unit of gas is tiny, so it is quoted in gwei.1 One gwei is one billionth of an ETH, so 1 ETH equals 1,000,000,000 gwei.1,2

The smallest unit of ETH is the wei. One gwei is a billion wei.1

How much gas different jobs use

ethereum.org gives these typical amounts. Simple jobs use less gas than jobs that run a smart contract.2

Job Gas used
Sending ETH 21,0002
Sending a token (ERC-20) 65,0002
Transferring an NFT 84,9042
A swap on Uniswap 184,5232

A plain ETH payment between two people's accounts needs exactly 21,000 gas.1,4 For contracts, the gas used differs from one contract to another.4

The fee formula

The fee is the units of gas used, multiplied by the base fee plus the priority fee.2 The next lesson explains those two prices.

ethereum.org's own example: an ETH payment uses 21,000 gas, the base fee is 10 gwei and the tip is 2 gwei. The fee is 21,000 × 12 = 252,000 gwei, or 0.000252 ETH.1

Working out a fee
  1. Fee in gwei = gas used × (base fee + tip).
  2. Fee in ETH = fee in gwei ÷ 1,000,000,000.
  3. Fee in dollars = fee in ETH × the price of 1 ETH.

The quizzes use this method.

The gas limit

The gas limit is the most gas you are willing to use.1 A plain ETH payment needs a limit of 21,000. Contract calls need more.1

Gas you don't use comes back. Set a limit of 50,000 for an ETH payment, and it uses 21,000. You get the other 29,000 back.1

A limit that is too low can make a transaction fail.1 Lesson 5 explains what that costs.

Your wallet usually does this

Most wallets work out a recommended fee for you.1 They show the cost in a simpler way than the formula.2

Our viewKeep a little spare ETH in any wallet that holds tokens, so you can always pay the fee to move them.
Sources
  1. Gas and fees. ethereum.org developer docs, page updated 24 June 2026.
  2. Gas fees. ethereum.org, page updated 8 April 2025.
  3. Transactions. ethereum.org developer docs, page updated 7 October 2026.
  4. How To "Cancel" Ethereum Pending Transactions?. Etherscan Information Center, 23 July 2020, updated 21 June 2026.

General education built from the publicly available sources listed above. Not financial, legal, tax or investment advice. Naming a company, project or regulator is not an endorsement either way. Last checked 2026-10-22. Terms and disclaimer.