Gas is the unit Ethereum uses to measure how much computation a transaction costs. Every operation in the EVM has a fixed gas cost β a simple addition uses 3 gas, a storage write uses 20,000 gas, a contract deployment uses tens of thousands of gas β and the total gas for a transaction is the sum of the costs of every operation it executes. You pay for this gas in ETH at a price you set yourself, and the total fee is gas used Γ gas price.
The word is used loosely in day-to-day conversation. When somebody says “gas is 20 gwei” they mean the gas price. When they say “this transaction cost 200,000 gas” they mean the gas used. When they say “gas fees are high right now” they usually mean both, because both matter and both vary. The total cost in dollar terms depends on how complex the transaction is and how congested the network is.
Why Gas Exists at All
Ethereum is a Turing-complete execution environment. Without a metering system, a malicious smart contract could include an infinite loop and permanently consume network resources. Gas solves this by forcing every computation to be paid for in advance β you specify a gas limit when you send a transaction, the EVM executes up to that many operations, and if the transaction runs out of gas before finishing, it halts with an “out of gas” error and the state changes are reverted (though you still pay for the gas you consumed).
This serves two purposes. It prevents denial-of-service attacks by making computation expensive. And it creates a market-based way of prioritising transactions during congestion: whoever pays more gets included sooner. The combination is why Ethereum has never suffered the kind of spam-driven outages that have hit some other smart contract chains.
The EIP-1559 Era
In August 2021, Ethereum shipped EIP-1559, which changed how gas pricing works. Instead of a first-price auction (where you just bid whatever you wanted and the miner picked the best offers), every block has a base fee that is set algorithmically based on how full recent blocks have been, and users pay the base fee plus an optional tip. The base fee is burned rather than paid to miners, which is the mechanism behind Ethereum’s deflationary-in-busy-periods supply dynamic.
This change made gas prices more predictable β your wallet can estimate the base fee reasonably well and you do not have to worry about being drastically overpaid during quiet periods. It also tied network activity to ETH supply in a way that is supposed to accrue value back to holders rather than to block producers.
How Much It Actually Costs
At normal network load (roughly the post-EIP-4844 state since March 2024), a simple ETH transfer costs about $0.50 to $2. A Uniswap swap costs maybe $2 to $10. A complex DeFi transaction that interacts with several contracts can hit $20+. During peak congestion β usually driven by popular NFT mints or market volatility β these numbers can be 5-10x higher for short periods.
On Layer 2 rollups (Arbitrum, Optimism, Base) the equivalent transactions cost cents rather than dollars, because the rollup batches many L2 transactions into a single L1 transaction and amortises the cost. This is the main reason most of Ethereum’s activity has moved to L2 and mainnet is increasingly used for high-value settlement rather than everyday interaction.