Gas Fee Calculator

Estimate Ethereum and EVM transaction fees from gas units and gwei. This is an offline arithmetic estimate, not a live network quote.

Estimated fee
0 ETH
Enter a price to see USD
Effective price
0 gwei
Wei
0
Offline and private: no wallet connection, API, live price, or network call is used. Enter a current ETH price yourself if you want a USD multiplication.

How to use the Gas Fee Calculator

  1. Choose Legacy gas price or EIP-1559. Legacy needs one gas price in gwei; EIP-1559 needs a base fee and priority fee.
  2. Enter the gas used or the gas limit you want to model. The presets are typical starting points, but contract execution varies.
  3. Optionally enter an ETH/USD price. The page shows ETH and wei even when that field is blank, and it never invents a dollar price.

Gas, gwei, and the formula

Gas is the unit of computation an Ethereum or EVM transaction consumes. A simple ETH transfer often uses about 21,000 gas, while a token transfer or swap can use more. Gas used is the work actually consumed; a gas limit is the maximum work you permit. The estimate is fee in ETH = gas units × gas price in gwei ÷ 1,000,000,000. One gwei is one billionth of an ETH, so the divisor converts gwei into ETH. The page also reports wei, the smallest ETH unit, using integer arithmetic so large gas and gwei inputs do not lose precision through floating-point rounding.

Legacy versus EIP-1559

Legacy pricing has a single gas price. EIP-1559 separates the base fee from the priority fee, or tip: effective gas price = base fee + priority fee. A max fee is a ceiling per gas, not a promise that the whole cap will be spent. This calculator reports unused headroom as max fee minus effective price. If the cap is below base plus tip, it stops and shows an error because that transaction cannot be funded under the entered cap. Read Ethereum's gas documentation and EIP-1559 specification for protocol detail.

Worked example

For a 150,000-gas contract call at 20 gwei, the arithmetic is 150,000 × 20 ÷ 1,000,000,000 = 0.003 ETH. If you enter an ETH price of $3,200, the displayed multiplication is $9.60. In EIP-1559 mode, 21,000 gas at a 10-gwei base fee plus a 2-gwei tip uses 12 gwei: 21,000 × 12 ÷ 1,000,000,000 = 0.000252 ETH. These examples are deterministic calculations, not quotes about what the network currently charges.

Common mistakes

When this tool is the wrong one

Use a wallet's transaction preview or a contract-specific simulation when you are about to sign, when a transaction failed, or when the exact gas usage matters. This page cannot inspect calldata, estimate a contract execution path, know a chain's current base fee, or determine whether an address or contract is safe. It also cannot predict a future ETH price. It is useful for learning units, comparing scenarios, and checking arithmetic after you have a quote.

Good to know

Everything runs locally in your browser. No wallet, account, price feed, API, or transaction signer is present. The optional ETH price is your assumption and may become stale immediately. This calculator is educational arithmetic only and is not financial advice — arithmetic only.

Frequently Asked Questions

How is an Ethereum gas fee calculated?

Multiply gas used by the gas price in gwei, then divide by 1,000,000,000 to convert gwei to ETH. Enter an ETH price only if you also want an arithmetic USD estimate.

What is the difference between legacy and EIP-1559 gas pricing?

Legacy pricing uses one gas price. EIP-1559 uses a base fee plus a priority fee; the max fee is a cap and is not automatically the amount paid.

Does this calculator show a live Ethereum gas price?

No. It makes no network calls and uses only the gas, gwei, and optional ETH price that you enter.

Why is my EIP-1559 max fee invalid?

The max fee per gas must be at least the base fee plus the priority fee. Enter a cap equal to or above that effective gas price.

Can a gas estimate guarantee the final transaction cost?

No. A wallet quote or contract simulation is the right source for a particular transaction. This page is offline arithmetic only.

Did you find this tool helpful?