Skip to main content
DigiCalcs

How to Calculate Ethereum Gas Fee

What is Ethereum Gas Fee?

The Gas Fee Calculator estimates the transaction cost on Ethereum and EVM-compatible blockchains by multiplying the gas price (in gwei) by the gas units consumed, helping users time transactions for lower costs.

Formula

Transaction Fee = Gas Units Used × (Base Fee + Priority Tip) × 10⁻⁹ ETH
G
Gas Units (gas) — Computational units consumed by the transaction
BF
Base Fee (gwei) — Network-determined minimum gas price per unit (burned)
PT
Priority Tip (gwei) — Optional tip to validators for faster inclusion
P
ETH Price ($) — Current ETH/USD exchange rate

Step-by-Step Guide

  1. 1Check the current base fee (set by the network) and priority tip (set by user)
  2. 2Determine gas units needed for your transaction type (21,000 for simple transfer, 100K-500K for DeFi)
  3. 3Multiply gas units by total gas price (base fee + tip) to get the fee in gwei
  4. 4Convert gwei to ETH (divide by 10⁹) and multiply by ETH price for USD cost

Worked Examples

Input
Simple ETH transfer, 21,000 gas, base fee 25 gwei, tip 2 gwei, ETH = $3,000
Result
Fee = 21,000 × 27 gwei = 567,000 gwei = 0.000567 ETH ≈ $1.70
Input
Uniswap swap, 150,000 gas, base fee 50 gwei, tip 3 gwei, ETH = $3,000
Result
Fee = 150,000 × 53 = 7,950,000 gwei = 0.00795 ETH ≈ $23.85

Common Mistakes to Avoid

  • Confusing gas limit (maximum gas willing to pay) with gas used (actual consumption)
  • Setting gas price too low during congestion, causing transactions to get stuck in the mempool
  • Not realizing that failed transactions still consume and charge gas

Frequently Asked Questions

When are Ethereum gas fees lowest?

Gas fees are typically lowest on weekends and during early morning hours (UTC). US business hours and NFT mint events cause peak congestion. Use gas trackers to monitor real-time prices.

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

EIP-1559 (August 2021) introduced a base fee that adjusts dynamically with network demand and gets burned, plus an optional priority tip. This made fees more predictable but did not necessarily make them cheaper.

Why do DeFi transactions cost more gas than simple transfers?

Simple ETH transfers use 21,000 gas. DeFi interactions execute complex smart contract logic — swaps use 100K-200K gas, adding liquidity 200K-400K, and complex multi-step transactions can exceed 500K gas.

Ready to calculate? Try the free Ethereum Gas Fee Calculator

Try it yourself →

Settings

PrivacyTermsAbout© 2026 DigiCalcs