Gas Limit
A gas limit is the maximum amount of gas a transaction is allowed to consume, set by the sender as a ceiling on how much computation — and therefore cost — the transaction can incur. The term also applies at the block level: each block has a total gas limit capping how much computation fits inside it, which is how Ethereum bounds its per-block workload.
For a sender, the limit is a safety mechanism. If a smart contract behaves unexpectedly and execution hits the limit, the transaction fails with an "out of gas" error: all state changes are reverted, but the gas already consumed is still paid for, since validators did the work. Setting the limit too low wastes money on a failed transaction; setting it generously costs nothing extra, because you only pay for gas actually used. For example, wallets estimate that a token swap needs roughly 150,000 gas and typically add a buffer; a plain ETH transfer needs exactly 21,000, so wallets set exactly that.
A common misconception is that a higher gas limit makes a transaction confirm faster; speed is determined by the gas price (the fee bid), not the limit, which is purely a cap. At the block level, Ethereum's gas limit is adjusted gradually by validator signaling and interacts with EIP-1559: blocks target half the maximum, and the base fee rises when blocks run consistently fuller than the target, throttling demand automatically.
Related terms