The maximum amount of gas a user is willing to spend on a transaction, acting as a safety cap to prevent unexpected costs from consuming excessive funds.
The gas limit is the maximum amount of gas units you're willing to consume for a transaction on networks like Ethereum. It acts as a cap to prevent transactions from consuming unlimited computational resources — or funds.
How Gas Limit Works
Every operation on Ethereum costs a specific amount of gas:
Max total gas for all transactions in a block (30 million)
Practical Example
You set: Gas limit = 100,000
Actual gas used: 65,000
Gas price: 20 gwei
Cost = 65,000 × 20 gwei = 1,300,000 gwei (0.0013 ETH)
Refunded = 35,000 × 20 gwei = 700,000 gwei (0.0007 ETH)
Copy link
Tips for Setting Gas Limits
Most wallets auto-estimate the gas limit based on the transaction type
For simple transfers, 21,000 is always sufficient
For smart contract interactions, add a 10-20% buffer above the estimate
Failed transactions still cost gas — setting the limit too low is worse than too high
Why It Matters for Creators
When minting NFTs, deploying smart contracts, or interacting with DeFi protocols, understanding gas limits helps you avoid failed transactions and unnecessary costs. Wallets typically handle this automatically, but knowing the mechanics helps you troubleshoot issues.