Skip to content

Smart Contract Gas Estimator

Transaction
Network and price
Estimated fee —
Fee in ETH
—
Fee in gwei
—
Gas units
—
Gas price per unit (gwei)
—
Base fee burned (ETH)
—

An Ethereum fee is gas used times the sum of the base fee and the priority tip. A plain ETH transfer uses 21,000 gas; at a 10 gwei base fee and a 2 gwei tip it costs 252,000 gwei, which is 0.000252 ETH or about $0.76 with ETH at $3,000.

About this tool

Before you sign a contract call, the wallet shows a fee that moves with network demand. This estimator lets you work that number out yourself: pick a common operation or type the gas amount your wallet or a block explorer reports, then enter the current base fee, the tip you plan to add and the ETH price. It returns the fee in dollars, ETH and gwei, the gas price per unit and how much of the fee is burned by the protocol under EIP-1559. The preset gas figures for tokens, mints, swaps and deployments are typical values only; a specific contract can use far more or less, and the base fee changes every block, so treat the result as an estimate rather than a quote.

How to use it

  1. Pick the operation

    Choose a preset such as an ETH transfer or NFT mint, or Custom gas amount to type the exact gas from your wallet.

  2. Enter the base fee

    Copy the current base fee in gwei from a gas tracker or your wallet's advanced fee view.

  3. Add the priority fee

    Enter the tip in gwei you will pay the validator; 1 to 2 gwei is common when the network is quiet.

  4. Set the ETH price

    Enter the ETH price in dollars to turn the ETH fee into a cash figure.

Examples

ETH transfer at 10 + 2 gwei

Operation
ETH transfer (21,000)
Base fee
10
Priority fee (tip)
2
ETH price
3000

Result Estimated fee: $0.76
Fee in ETH: 0.000252
Fee in gwei: 252,000
Gas units: 21,000
Gas price per unit (gwei): 12
Base fee burned (ETH): 0.00021

  1. Gas price = base fee + priority fee = 10 + 2 = 12 gwei
  2. Fee = 21000 gas × 12 gwei = 252000 gwei
  3. In ETH = 252000 ÷ 1,000,000,000 = 0.000252 ETH
  4. In dollars = 0.000252 × 3000 = 0.76

A plain transfer always uses 21,000 gas, so the fee is 252,000 gwei, or about 76 cents with ETH at $3,000.

ERC-20 transfer, busy network

Operation
Token transfer (65,000)
Base fee
28
Priority fee (tip)
2
ETH price
2000

Result Estimated fee: $3.90
Fee in ETH: 0.00195
Fee in gwei: 1,950,000
Gas units: 65,000
Gas price per unit (gwei): 30
Base fee burned (ETH): 0.00182

  1. Gas price = base fee + priority fee = 28 + 2 = 30 gwei
  2. Fee = 65000 gas × 30 gwei = 1950000 gwei
  3. In ETH = 1950000 ÷ 1,000,000,000 = 0.00195 ETH
  4. In dollars = 0.00195 × 2000 = 3.9

65,000 gas at 30 gwei is 0.00195 ETH, which is $3.90 with ETH at $2,000.

2 million gas deployment

Operation
Custom gas amount
Gas units
2000000
Base fee
5
Priority fee (tip)
1
ETH price
2500

Result Estimated fee: $30.00
Fee in ETH: 0.012
Fee in gwei: 12,000,000
Gas units: 2,000,000
Gas price per unit (gwei): 6
Base fee burned (ETH): 0.01

  1. Gas price = base fee + priority fee = 5 + 1 = 6 gwei
  2. Fee = 2000000 gas × 6 gwei = 12000000 gwei
  3. In ETH = 12000000 ÷ 1,000,000,000 = 0.012 ETH
  4. In dollars = 0.012 × 2500 = 30

A 2,000,000-gas deploy at 6 gwei costs 0.012 ETH; 0.01 ETH of it is the burned base fee.

How it is calculated

Fee (gwei) = G × (B + P); Fee (ETH) = Fee (gwei) ÷ 10^9; Fee ($) = Fee (ETH) × E

G
Gas units the transaction consumes
B
Base fee per gas, in gwei, set by the protocol each block
P
Priority fee (tip) per gas, in gwei
E
Price of one ETH in dollars

Since the London upgrade (EIP-1559) each unit of gas costs the block's base fee plus the tip you offer. The base fee portion, G × B, is burned and leaves the supply; only the tip goes to the validator. One gwei is one billionth of an ETH, so dividing by 10^9 converts gwei to ETH. A plain transfer always uses exactly 21,000 gas; contract calls use more depending on the code they run and the storage they write.

Sources

When not to use it

  • Do not use it for Bitcoin, which charges by transaction size in sat/vB rather than by gas.
  • Do not treat preset gas values as exact for a specific contract; simulate the call in your wallet instead.
  • Layer-2 rollups add a data fee for posting to mainnet that this estimate leaves out.

Common mistakes

  • Entering the max fee as the base fee, which overstates the cost because unused headroom is refunded.
  • Confusing the gas limit with gas actually used; a failed call still pays for the gas it consumed.
  • Typing the gas price in ETH or wei instead of gwei.

Frequently asked questions

Why does a plain ETH transfer always cost 21,000 gas?

The protocol charges a fixed 21,000 gas intrinsic cost for every transaction. A transfer between ordinary accounts runs no contract code, so that intrinsic cost is the whole amount. Anything that calls a contract adds gas for each operation the code executes.

What happens to the base fee?

Under EIP-1559 the base fee is burned, removing that ETH from circulation. Only the priority fee goes to the validator who includes your transaction. The estimator shows the burned amount separately so you can see the split.

How large a priority fee is needed?

When blocks are not full, a tip of 1 to 2 gwei is usually enough to be included in the next few blocks. During a popular mint or market swing, competing transactions raise tips sharply, and a low tip may wait or be dropped.

Why is my wallet's estimate higher than this one?

Wallets usually display the maximum fee, which allows the base fee to rise for several blocks and pads the gas limit above the expected usage. You only pay for gas actually used at the actual base fee, so the final cost is often lower than the wallet's figure.

How do I find the exact gas a contract call uses?

Your wallet simulates the call before you sign it and shows the gas limit. For a past transaction, a block explorer lists the gas used. Choose Custom gas amount and type that number for a precise estimate.

Does a failed transaction cost anything?

Yes. If a contract call reverts, the gas consumed up to the failure point is still charged, because validators did the computation. Only the unused part of the gas limit is returned.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 25). Smart Contract Gas Estimator. Tools Directory. Retrieved October 25, 2026, from https://tools.milunir.com/crypto-trading/wallets-keys-and-nfts/smart-contract-gas-estimator/

MLA

Tools Directory Editorial Team. “Smart Contract Gas Estimator.” Tools Directory, 25 Oct. 2026, https://tools.milunir.com/crypto-trading/wallets-keys-and-nfts/smart-contract-gas-estimator/. Accessed 25 Oct. 2026.

Chicago

Tools Directory Editorial Team. “Smart Contract Gas Estimator.” Tools Directory. Last modified October 25, 2026. Accessed October 25, 2026. https://tools.milunir.com/crypto-trading/wallets-keys-and-nfts/smart-contract-gas-estimator/.

Link<a href="https://tools.milunir.com/crypto-trading/wallets-keys-and-nfts/smart-contract-gas-estimator/">Smart Contract Gas Estimator – Tools Directory</a>