Gas Limit vs Gas Price: What’s the Difference?
Gas limit and gas price sound alike but do different jobs. One caps the work, the other sets the rate. Here is how they combine under EIP-1559.
Quick answer
The gas limit is the maximum number of gas units a transaction is allowed to consume, while the gas price is what you pay for each of those units. Under the EIP-1559 fee model the price side is split into a base fee that is set by the protocol and burned, plus a priority fee that tips the validator, with a max fee capping the total you will pay per unit. A simple transfer of ETH uses a gas limit of 21,000 units, and your total cost is roughly the gas used multiplied by the base fee plus priority fee.
Key points
- Gas limit is the ceiling on how many gas units a transaction may use; gas price is the cost per unit.
- A standard ETH transfer has a gas limit of 21,000 units.
- Under EIP-1559 the per-unit price splits into a base fee (burned) and a priority fee (tip to the validator).
- The base fee is set by the protocol each block and can change by at most 12.5% from block to block.
- Max fee per gas caps your total per-unit spend; overpayment above base fee plus tip is refunded.
- Setting the gas limit too low can make a transaction run out of gas and fail while still costing the fee for work done.
Few things confuse newcomers to crypto more than gas. Part of the trouble is that two very different settings, the gas limit and the gas price, both use the word “gas” and both affect what you pay. They are not the same thing, and mixing them up leads to overpaying, failed transactions, or both. This article separates the two, then shows how the current fee model on Ethereum stitches them together into the number you actually see in your wallet.
Gas: a unit of work
On Ethereum, gas is the unit that measures computational work. Every operation, from a simple transfer to a complex contract call, has a cost denominated in gas units. This decouples the amount of work from the price of that work: the network can agree that an operation “costs” a fixed number of gas units regardless of how expensive the currency happens to be at the time. Fees then come from pricing those units. For the bigger picture of what those fees fund, see what gas fees actually pay for.
Why bother with a separate unit at all? Because it separates two things that change on very different timescales. The amount of computation an operation requires is fixed by the protocol and rarely changes, so it can be measured in stable gas units. The price people are willing to pay for that computation swings constantly with demand. Denominating work in gas lets the protocol keep a consistent measure of effort while letting the market handle pricing on top. It is the same logic as measuring a journey in miles and letting fuel prices vary separately.
Gas limit: the work ceiling
The gas limit is, in the documentation’s words, “the maximum amount of gas units that can be consumed by the transaction.” It is a ceiling you set to cap how much work your transaction is allowed to do. Think of it as a safety valve: you are telling the network “do not spend more than this many units on my behalf.”
A basic transfer of ETH between two accounts requires 21,000 gas units, a fixed baseline for the simplest possible operation. Interactions with smart contracts cost more because they run additional code and may change stored data, so wallets estimate a higher limit for them. To understand why contract calls are heavier, our explainer on what a smart contract is and isn’t is a useful companion.
Wallets normally estimate the limit for you by simulating the transaction before you send it, which is why a straightforward transfer shows 21,000 while a token swap shows a much larger figure. The estimate is usually reliable, but complex or unpredictable contract logic can occasionally consume more than expected, which is why some wallets add a small buffer. This is also why the same action can carry slightly different limits at different times: the amount of work depends on the exact state the contract is in when it runs.
Setting the limit too low is risky. If a transaction consumes all the gas you allowed before finishing, it runs out of gas, reverts any changes, and is recorded as a failed transaction. Crucially, you still pay for the work the network performed up to that point. Setting the limit higher than needed is generally safe, because you are only charged for gas actually used, not for the headroom.
Gas price: the cost per unit
If the gas limit is the quantity, the gas price is the rate. It is what you pay for each unit of gas your transaction consumes. Your total fee, at its simplest, is:
fee = gas used x price per gas unit
For years the price was a single number you set directly. The current fee model, introduced by EIP-1559, restructured that single number into two parts to make fees more predictable. The documentation describes it as “a new fee market mechanism that improves predictability by separating the transaction fee into a base fee and a priority fee.”
The base fee
The base fee is a per-unit price set by the protocol itself for each block, not chosen by the user. It is calculated by comparing how full the previous block was against a target size. If blocks are running fuller than target, the base fee rises; if emptier, it falls. The adjustment is capped: the base fee can change “by a maximum of 12.5% per block.” That bounded, automatic movement is what makes fees more predictable than a free-for-all auction.
A defining feature is that the base fee is burned. As the documentation puts it, “when the block is created this base fee is ‘burned’, removing it from circulation.” It does not go to the validator, which removes an incentive for validators to artificially inflate it.
The priority fee
The priority fee, often called the tip, is the part of the per-unit price that actually goes to the validator. It is “the maximum price of the consumed gas to be included as a tip to the validator,” and it exists to incentivise validators to include your transaction. During congestion, a higher tip makes your transaction more attractive relative to others competing for the same block space in the mempool.
Max fee per gas: your ceiling on the rate
You also set a max fee per gas, described as “the maximum fee per unit of gas willing to be paid for the transaction (inclusive of baseFeePerGas and maxPriorityFeePerGas).” This is the highest per-unit price you will tolerate. Because the base fee moves block to block, this ceiling protects you from a sudden spike.
Importantly, a high max fee does not mean you pay a high amount. You are charged the actual base fee plus your tip, and if that total comes in under your max fee, the difference is refunded. So the max fee is a limit, not a target. The documentation’s worked example makes the arithmetic concrete: with a base fee of 190 gwei and a priority fee of 10 gwei on a 21,000-gas transfer, the cost is (190 + 10) * 21000 = 4,200,000 gwei, or 0.0042 ETH.
Putting the two together
| Setting | What it controls | Who sets it |
|---|---|---|
| Gas limit | Maximum work (units) the transaction may use | You (or your wallet’s estimate) |
| Base fee | Per-unit price, burned | The protocol, per block |
| Priority fee | Per-unit tip to the validator | You |
| Max fee per gas | Ceiling on total per-unit price | You |
The gas limit answers “how much work?” while the price components answer “at what rate?” Your final fee is the gas actually used multiplied by the base fee plus your tip, never more than your max fee times the gas used. Most wallets set sensible defaults, so you rarely adjust these by hand, but knowing what each does helps when a transaction fails or a fee looks wrong.
A frequent misconception is that raising the gas limit makes a transaction cost more. It does not, by itself: you pay for gas used, and the limit is only a ceiling. Raising the limit merely gives the transaction more room to finish; any unused gas is not charged. Conversely, raising the priority fee genuinely does increase what you pay, because the tip applies to every unit of gas the transaction consumes. Keeping these two levers straight, one a safety ceiling, the other a real per-unit cost, is the single most useful thing to internalise about fees.
Where blocks fit in
The base fee’s movement is driven by block fullness. Blocks have a target size and a hard cap above it, and the protocol nudges the base fee up when blocks exceed the target and down when they fall below it, always within that 12.5% per-block bound. This feedback loop is the network’s way of keeping demand for block space in balance with supply. For the wider context of how blocks are produced and settled, see our guide on how blockchains work. Layer-2 networks reduce fees by doing most execution off the base layer, a topic covered in what is a Layer 2 rollup.
The documentation’s own example shows the mechanism in motion: with a block running above target, “a 12.5% increase raises the base fee from 100 to 112.5 gwei,” and if blocks stay full it keeps compounding upward block by block. The reverse happens when blocks are under target. Because the change per block is capped, the base fee cannot spike instantly; it ramps, giving wallets a moving but readable estimate rather than a chaotic auction. That predictability is the whole point of splitting the fee this way.
The takeaway
Gas limit and gas price are two dials that do different jobs. The limit caps how much work your transaction can perform; the price sets what you pay per unit of that work. Under EIP-1559 the price splits into a protocol-set base fee that is burned and a user-set tip that rewards the validator, with a max fee capping the total. Get the limit high enough to finish, set a reasonable tip for the urgency you need, and the fee model handles the rest.
Sources
- Gas and Fees — ethereum.org
- Transactions — ethereum.org
- EIP-1559: Fee market change — Ethereum Improvement Proposals
Frequently asked questions
What is the difference between gas limit and gas price?
Why is the gas limit for a normal transfer 21,000?
What is the base fee under EIP-1559?
What is the priority fee?
What does max fee per gas mean?
What happens if my gas limit is too low?
Note: CamoCrypt is security & education only — no prices, no predictions, no investment advice. Verify every address and contract yourself; we cannot recover lost funds and neither can anyone who contacts you claiming they can.