A failed Ethereum transaction still pays gas if it was included in a block. It pays for the gas it used before failing, and the sender gets back whatever is left of the gas limit. A transaction that is rejected before it reaches a block pays nothing, because it never happened. Which of the two you had decides whether your wallet shows a fee, and how large it is.

Last checked November 21, 2026 against ethereum.org, the EIP texts and the go-ethereum source.

Four outcomes, four different bills

The protocol treats a transaction in one of four ways. Only the last three cost money.

What happened Does it reach a block? Gas you pay
Rejected: nonce too low, balance below the required reserve, gas limit under the base cost No None
Reverted by the contract (a failed require, a REVERT instruction) Yes, status 0x0 Gas used up to the revert; the rest is refunded
Out of gas, or an invalid instruction Yes, status 0x0 The entire gas limit
Success Yes, status 0x1 Gas used

The first row is a validity rule, not a penalty. EIP-1559’s reference code asserts that the sender must hold the value plus gas_limit * max_fee_per_gas, and that max_fee_per_gas must cover the block’s base fee. A transaction that breaks those asserts is an “invalid transaction”, so a block containing it is invalid. go-ethereum names the same checks as errors such as nonce too low, insufficient funds for gas * price + value and intrinsic gas too low, which is what a wallet shows when it refuses to send.

The last two rows differ because of EIP-140. Before the REVERT instruction, a contract could only abort by running out of gas or executing an invalid instruction, and “both of these options will consume all remaining gas”. REVERT stops execution, rolls back state and, in the EIP’s words, does “not consume all the remaining gas”. That is why a failed require is usually cheaper than a transaction that ran out of gas.

A worked example with the bill in each case

These numbers are hypothetical, chosen to make the arithmetic easy to follow. Take a contract call with a gas limit of 100,000, a max fee of 40 gwei and a max priority fee of 2 gwei, sent when the base fee is 20 gwei.

The effective gas price is the base fee plus the priority fee, where the priority fee is capped by what the max fee leaves after the base fee: min(2, 40 - 20) + 20 = 22 gwei. To be valid at all, the sender needs 100,000 x 40 = 4,000,000 gwei (0.004 ETH) free, plus any value sent. The sender is then charged gas used x 22 gwei.

Outcome Gas used Fee at 22 gwei Burned (base fee) Paid to validator (tip) Returned to sender
Success 65,000 0.001430 ETH 0.001300 ETH 0.000130 ETH 35,000 gas = 0.000770 ETH
Reverted after 34,000 gas 34,000 0.000748 ETH 0.000680 ETH 0.000068 ETH 66,000 gas = 0.001452 ETH
Out of gas 100,000 0.002200 ETH 0.002000 ETH 0.000200 ETH nothing
Rejected (nonce too low) 0 0 0 0 not applicable

Two things stand out. The revert in this example cost about half of the success (0.000748 ETH against 0.001430 ETH), because the contract stopped early and handed back 66,000 gas. The out-of-gas run cost more than the success that would have done the real work, because a gas limit set too low loses the entire limit.

The split between burn and tip follows EIP-1559: the base fee is burned and the validator keeps only the priority fee. A failed transaction does not change that split, which is also why nobody can hand the fee back. The validator did the work of including it, and the burned part has left circulation.

The floor and the ceiling on a failed transaction

A plain ETH transfer takes 21,000 gas, according to ethereum.org’s gas documentation, and a contract call adds its calldata and execution on top. An included transaction therefore pays at least its base cost, even if the contract reverts on the first line. At the 22 gwei above, 21,000 gas is 0.000462 ETH.

The ceiling is the gas limit you set, and since the Fusaka upgrade it is bounded by the protocol too. EIP-7825 caps a single transaction at 16,777,216 gas (2^24), and EIP-7607 lists it among the EIPs in Fusaka. At 22 gwei, the worst-case fee for one out-of-gas transaction would be 16,777,216 x 22 = 369,098,752 gwei, about 0.369 ETH. A wallet’s default limit is usually far below that, so most failed transactions cost much less.

A failed call inside a successful transaction

A transaction can succeed while a call inside it fails. When a called contract executes REVERT, EIP-140 says the calling opcode “returns 0 on the stack”, and the caller can carry on. The receipt then reads status 0x1 for the whole transaction even though one sub-call was rolled back. That surprises people who expect any failure to show up as a red status.

EIP-150 limits how far a sub-call can drain the caller. It defines “all but one 64th” of the remaining gas as the most a call can forward, so a parent always keeps a small reserve to handle the failure.

How to read what you were charged

The receipt answers the question directly. Per ethereum.org’s JSON-RPC reference, gasUsed is the gas used by this transaction alone and effectiveGasPrice is the sum of the base fee and tip paid per unit of gas. The fee is their product. Our note on receipt status walks through the fields, including what a null receipt means.

If your wallet showed a fee and a status of failed, the transaction was included. If it never showed a hash or reported one of the errors above, nothing was charged.

Avoiding the expensive failures

Most losses come from setting the gas limit by hand, or from a contract state that changed between the quote and the block. Two habits reduce them:

  • Let the wallet estimate the limit. eth_estimateGas runs the transaction against the current state without adding it to the chain, and ethereum.org notes the estimate “may be significantly more than the amount of gas actually used”. A limit that is too generous costs nothing extra, because unused gas is refunded; a limit that is too tight is the way to lose all of it.
  • Simulate first when the outcome depends on moving state. eth_call executes a message call without creating a transaction, so a revert shows up before you pay for it. A simulation reflects the state at that moment, and a later block can still change the result.

A stuck transaction is a different problem: it has not failed, it is waiting. See why a transaction stays pending.

Reporting & Sources

Checked November 21, 2026. Sources: ethereum.org gas documentation, ethereum.org transactions, ethereum.org JSON-RPC reference, EIP-1559, EIP-140, EIP-150, EIP-7825, EIP-7607 and go-ethereum’s core/error.go. The fee tables are the author’s own arithmetic on hypothetical prices, not observed transactions.