Skip to main content

Ethereum Gas Fee Cost

BeginnerFintech & Digital FinanceAlso known as: Ethereum and smart contracts, gwei, base fee, priority tip, transaction cost on chain

Finds: the cost of a blockchain transaction.

When to use it: Use it to see what a transaction or smart-contract call costs. Fees rise when the network is busy and depend on how much computation the contract uses, not on the amount of money sent. A swap in a decentralized exchange may use five to ten times the gas of a plain transfer.

The formula

Fee\displaystyle \text{Fee}=G×(b+t)×10−9 ETH\displaystyle =G\times(b+t)\times 10^{-9}\ \text{ETH}FeeUSD\displaystyle \text{Fee}_{USD}=Fee×P\displaystyle =\text{Fee}\times P

In words: Fee in ETH = gas used x (base fee + priority tip) in gwei x 0.000000001; Fee in money = fee in ETH x price of ETH; The base fee is burned, so burned part = gas used x base fee; Simple transfers use 21,000 gas and smart-contract calls use much more

What each symbol means

GGas units the transaction uses (a measure of computation)units
bBase fee per unit of gas, set by network demandgwei
tPriority tip to the block producergwei
PPrice of ETHmoney

Worked example

A plain transfer uses 21,000 gas. The base fee is 18 gwei, the tip is 2 gwei and ETH is 3,000. A token swap uses 150,000 gas.

Fee in ETH21,000 × (18 + 2) ÷ 1,000,000,0000.000420
Fee in money0.00042 × 3,0001.26
Burned part in ETH21,000 × 18 ÷ 1,000,000,0000.000378
Cost of the swap in money150,000 × (18 + 2) ÷ 1,000,000,000 × 3,0009
The answer

The transfer costs 0.000420 ETH, which is 1.26 in money. Of this, 0.000378 ETH is burned. A 150,000 gas swap at the same prices costs 9.

Want every formula on a few pages?Get the free Cheat Sheet (PDF) →

Calculator

Fee in ETH0.000420
Fee in money1.26
Burned part in ETH0.000378
Cost of the swap in money9

Keep going