EVMTools

Gas Fee Calculator

Calculate Ethereum transaction costs from gas limit and gas price. Estimate fees in ETH and USD.

Transaction Cost

Cost in Gwei

420,000 Gwei

Cost in ETH

0.00042000 ETH

Formula: 21000 (gas) x 20 Gwei = 420,000 Gwei = 0.00042000 ETH

Common Gas Limits

How to Use This Gas Fee Calculator

This tool calculates the total cost of an Ethereum transaction based on gas usage and gas price. It shows the result in both ETH and USD for easy cost estimation.

  1. Enter the gas limit or gas used — this is the number of gas units for your transaction (e.g., 21000 for a simple transfer, 150000 for a swap).
  2. Enter the gas price in Gwei — check current gas prices on Etherscan or your wallet to input the base fee plus priority fee.
  3. View the total cost — the calculator shows the fee in ETH and estimates the USD equivalent using current ETH prices.
  4. Compare different scenarios by adjusting gas price or gas limit to find the optimal timing for your transaction.

All calculations run locally in your browser. This tool is useful for budgeting transactions and comparing costs across different network conditions.

Common Use Cases

  • Transaction cost estimation — Calculate how much a swap, mint, or deployment will cost before executing it on mainnet.
  • Budget planning — Estimate costs for batches of transactions like airdrops, multi-sig executions, or contract deployments.
  • L1 vs L2 comparison — Compare gas costs between Ethereum mainnet and layer 2 networks to decide where to execute transactions.
  • Development testing — Estimate gas costs for new smart contract functions during development to optimize before deployment.
  • Historical analysis — Calculate what a transaction cost at historical gas prices for reporting and accounting purposes.

Related Tools

Frequently Asked Questions

How are Ethereum gas fees calculated?

Ethereum gas fees are calculated as: gasUsed x gasPrice. Since EIP-1559, the fee structure is: gasUsed x (baseFee + priorityFee). The base fee is burned and adjusts dynamically based on network demand, while the priority fee (tip) goes to the block proposer. Total cost = gasUsed x effectiveGasPrice, converted from Wei to ETH.

What is gas limit vs gas used?

Gas limit is the maximum amount of gas you are willing to spend on a transaction. Gas used is the actual gas consumed during execution. You set the gas limit when sending a transaction; unused gas is refunded. A simple ETH transfer uses exactly 21,000 gas, while contract interactions vary based on computation complexity.

What is EIP-1559 and how does it affect gas fees?

EIP-1559 (London upgrade) introduced a base fee that adjusts automatically based on block utilization and a priority fee (tip) that users set. The base fee is burned, reducing ETH supply. Blocks target 50% capacity; if a block is more than 50% full, the base fee increases, and vice versa. This makes gas prices more predictable.

How much gas does a typical transaction use?

A simple ETH transfer uses 21,000 gas. An ERC-20 token transfer typically uses 45,000-65,000 gas. A Uniswap swap uses around 150,000-300,000 gas. An NFT mint can use 100,000-250,000 gas. Complex DeFi interactions with multiple contract calls can use 500,000+ gas.

How can I reduce gas costs?

Strategies to reduce gas costs include: timing transactions during low-demand periods (weekends, early morning UTC), using layer 2 solutions (Arbitrum, Optimism, Base) for cheaper execution, batching multiple operations into a single transaction, setting appropriate gas limits, and using gas tokens or meta-transactions where available.