Understanding the Ethereum gas fee calculator — concept and principle
Every Ethereum transaction pays for the computation it uses, measured in gas. Since the EIP-1559 upgrade (London hard fork, August 2021), the price per unit of gas has two parts: a base fee set by the protocol and burned, and a priority fee (tip) paid to the validator. This calculator converts gas used and both fee parts into the cost in ETH and in your own currency, and shows how much ETH is burned.
How it is calculated
- Fee (ETH) = gas used × (base fee + priority fee) ÷ 10⁹, because fees are quoted in gwei and 1 gwei = 10⁻⁹ ETH.
- Fee in your currency = fee (ETH) × ETH price.
- Burned (ETH) = gas used × base fee ÷ 10⁹. The base fee portion is destroyed rather than paid to anyone.
A plain ETH transfer uses exactly 21,000 gas. Token transfers, swaps and contract deployments use more, depending on the code they run.
The principle
Gas separates the amount of work (gas used) from its price (gwei per gas). The base fee is the same for every transaction in a block and adjusts automatically: if the previous block used more than the target (half the gas limit), the base fee rises by up to 12.5%; if it used less, it falls by up to 12.5%. This makes fees more predictable than the old first-price auction. Users add a tip to get included faster, and they set a max fee per gas; the tip actually paid is the smaller of the stated priority fee and (max fee − base fee), and any unused allowance is not charged. Burning the base fee stops validators from profiting by stuffing blocks with their own transactions.
Worked example
- Inputs: gas used 21,000, base fee 20 gwei, priority fee 1.5 gwei, ETH price 3,000.
- Price per gas = 20 + 1.5 = 21.5 gwei.
- Fee = 21,000 × 21.5 = 451,500 gwei = 0.0004515 ETH.
- In your currency: 0.0004515 × 3,000 = 1.3545.
- Burned = 21,000 × 20 = 420,000 gwei = 0.00042 ETH; the remaining 0.0000315 ETH goes to the validator.
| Gas used | Fee (ETH) |
|---|---|
| 5,250 | 0.000112875 |
| 10,500 | 0.00022575 |
| 15,750 | 0.000338625 |
| 21,000 | 0.0004515 |
| 26,250 | 0.000564375 |
| 31,500 | 0.00067725 |
| 42,000 | 0.000903 |
How to read the result
Base fees change block by block, so the result is a snapshot. Most of the fee is usually the base fee, so raising the tip a lot barely speeds up a transaction when blocks are not full. If a transaction fails, the gas it consumed is still charged.
Common mistakes
- Confusing the gas limit you set with the gas actually used; you pay only for gas used.
- Entering wei or ETH where gwei is expected.
- Using mainnet numbers for layer-2 networks, which add a separate fee for posting data to Ethereum.
Frequently asked questions
Why did I pay less than my max fee?
You pay base fee plus tip only; the difference to the max fee is never charged.
Where does the burned ETH go?
It is removed from circulation, which reduces total ETH supply.
What exactly is a gwei?
One billionth of an ETH. The smallest unit is the wei (10⁻¹⁸ ETH), and 1 gwei = 10⁹ wei.
Sources: Ethereum Improvement Proposal EIP-1559: Fee market change for ETH 1.0 chain · G. Wood, Ethereum: A Secure Decentralised Generalised Transaction Ledger (Yellow Paper)