Gas Fee Cost Calculator

An Ethereum transaction fee is the gas units consumed multiplied by the gas price, where the gas price under EIP-1559 is the base fee plus your priority tip, both in gwei (one billionth of an ETH). This calculator takes the gas limit (for example 21,000 for a simple transfer), the base fee, the priority fee, and the ETH price, then returns the total gas price, the fee in ETH, and the fee in USD. Gas and ETH prices are inputs because both move constantly and cannot be hardcoded.

0.00
0.00
0.00

Gas fee formula

Total gas price (gwei) = base fee + priority fee
Fee in ETH = gas units * total gas price / 1,000,000,000
Fee in USD = fee in ETH * ETH price

One gwei equals 0.000000001 ETH (ten to the minus nine). The base fee is burned by the protocol and the priority fee is paid to the validator. You are charged for gas actually used, up to the gas limit.

Using the result

  • A simple ETH transfer uses 21,000 gas; token and contract calls use more.
  • Base fee changes every block with network demand; enter the current value.
  • A higher priority fee speeds inclusion during congestion but raises your cost.
  • Gas price and ETH price are inputs because both change every few seconds.
  • Layer-2 networks settle transactions for a small fraction of mainnet gas cost.

Gas fees: frequently asked questions

How is an Ethereum gas fee calculated?

Since the EIP-1559 upgrade, the fee equals the gas units used times the sum of the base fee and the priority fee (tip), both measured in gwei. One gwei is one billionth of an ETH. Multiplying gas units by the total gas price in gwei, then dividing by one billion, gives the fee in ETH.

What is a gas limit?

The gas limit is the maximum number of gas units a transaction may consume. A simple ETH transfer uses 21,000 gas; token transfers and contract interactions use more. You are charged only for the gas actually used, but the transaction must not exceed the limit or it fails and still costs the gas spent.

What is the base fee versus the priority fee?

The base fee is set by the protocol per block and is burned (removed from supply). The priority fee, or tip, goes to the validator and incentivizes faster inclusion. Under EIP-1559 the total gas price you pay is the base fee plus your chosen priority fee, capped by your max fee.

Why do gas prices change so much?

The base fee adjusts each block based on how full the previous block was: when demand for block space rises, the base fee climbs, and when demand falls, it drops. During congestion the base fee can spike many times over its quiet-period level, so fees vary widely through the day.

Does this calculator pull live gas prices?

No. Gas price and ETH price are user-editable inputs because both change every few seconds and cannot be hardcoded truthfully. Enter the current base fee, your priority fee, and the ETH price from a live source, and the tool computes the resulting transaction cost in ETH and USD.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.