Skip to content

Guide

Ethereum Gas Fees in Gwei: How the Cost Is Set

A transaction's fee is two separate numbers multiplied together — gas limit and gas price — and gwei is just the unit the price half is quoted in.

By Published

A wallet asking you to confirm a transaction at “32 gwei” is quoting half of a two-part calculation. The actual fee you pay is that gwei number multiplied by a second number — the gas limit — and understanding both halves is what turns an opaque wallet popup into something you can reason about. You can convert any gwei figure to ETH or Wei with the Wei / Gwei / ETH converter.

Gas limit x gas price = fee

Every operation on Ethereum — transferring ETH, calling a smart contract, deploying code — costs a fixed amount of “gas,” a unit measuring computational work. A plain ETH transfer costs exactly 21,000 gas units; a smart-contract interaction (a token swap, an NFT mint) costs more, often in the tens or hundreds of thousands, depending on how much state the contract touches.

Gas price is what you’re willing to pay per unit of that gas, quoted in gwei. Multiply the two together and convert to ETH, and you get the fee:

Fee (ETH) = gas used × gas price (gwei) ÷ 1,000,000,000

A 21,000-gas transfer at 30 gwei: 21,000 × 30 = 630,000,000,000 Wei = 0.00063 ETH. The same transfer at 100 gwei during network congestion costs more than three times as much — same gas limit, higher price per unit.

Why gwei, specifically

Gwei is 10⁹ Wei — one billionth of an ETH. Typical gas prices land in the single-to-low-triple-digit gwei range, which keeps everyday numbers small and legible (“30 gwei,” “80 gwei”) instead of forcing wallets to display fractional-ETH numbers with eight or nine decimal places. It’s purely a display convenience — the underlying value is always some exact number of Wei, and gwei is just the unit that makes that number readable at the scale gas prices actually operate at. For the full unit ladder and why Wei itself uses such extreme precision, see Wei, Gwei, ETH explained.

Base fee and priority fee, since EIP-1559

Before the EIP-1559 upgrade, every sender picked a single gas price and transactions were essentially auctioned to the highest bidder each block — a design that produced volatile, hard-to-predict fees, especially during demand spikes.

EIP-1559 split the price into two components:

  • Base fee— calculated automatically by the protocol itself, block by block, based on how full the previous block was relative to its target size. It rises when blocks are consistently full and falls when they aren’t. Users don’t choose it; the network sets it algorithmically. The base fee portion of every transaction is burned — permanently removed from circulation — rather than paid to whoever produces the block.
  • Priority fee (tip) — a smaller amount the user sets on top of the base fee, paid directly to the block producer as an incentive to include the transaction promptly. This is the part users actually have discretion over.

A wallet showing “32 gwei” as the current gas price is typically showing base fee plus a recommended priority fee added together — the number that determines total cost, even though only one part of it is burned and the other part is a tip.

Higher gas price doesn't fix a failing transaction

It’s worth separating two things gas affects: inclusion speed and transaction validity. A higher gas price competes for faster inclusion in the next block — it says nothing about whether the transaction itself is valid. A smart-contract call that reverts due to a bug or a failed condition still reverts regardless of gas price, and gas already consumed up to the point of failure is not refunded. Gas price is a queueing mechanism, not a way to force a transaction through.

Frequently asked questions

Why is gas priced in gwei instead of ETH?
Gas prices are tiny fractions of an ETH — a typical price is a few billionths of an ETH per unit of gas. Quoting that directly in ETH would mean constantly writing numbers like 0.00000003, which is error-prone to read and type. Gwei (10⁹ Wei, or one-billionth of an ETH) puts everyday gas prices in a small, readable integer range instead.
What's the difference between gas limit and gas price?
Gas limit is the maximum amount of computational work you're willing to pay for on a given transaction — a simple ETH transfer needs 21,000 gas units, while a complex smart-contract call can need hundreds of thousands. Gas price (in gwei) is what you're willing to pay per unit of that gas. The fee is the product of the two, not either number alone.
What did EIP-1559 change about gas fees?
Before EIP-1559, every user submitted a single gas price and transactions were included in simple highest-bid-first order, which produced volatile, hard-to-predict fees. EIP-1559 replaced that with a base fee that the network itself calculates and adjusts block-by-block based on demand, plus a user-set priority fee (tip) paid on top to incentivize inclusion. The base fee portion is burned rather than paid to the miner or validator.
Does a higher gas price make a transaction succeed if it would otherwise fail?
No. Gas price only affects how quickly a transaction gets included in a block, not whether it's valid. A transaction that fails — for example, a smart-contract call that reverts due to a logic error — still fails and still consumes gas up to the point of failure, regardless of how much gas price was offered.

Sources & references

Authoritative references cited by this piece. Verified by Buğra Sözeri on the dates shown and re-checked at every deploy.

Related

More guides on this topic

Published September 25, 2026