TradePortfolio

Gas Fee Converter

Convert gas prices from gwei to USD for common Ethereum transaction types.

gwei
$
Transaction TypeGas UnitsCost (ETH)Cost (USD)
Simple ETH Transfer21,0000.000630$2.02
ERC-20 Transfer65,0000.001950$6.24
ERC-20 Approve46,0000.001380$4.42
Uniswap V2 Swap150,0000.004500$14.40
Uniswap V3 Swap184,0000.005520$17.66
NFT Mint (ERC-721)150,0000.004500$14.40
OpenSea Sale200,0000.006000$19.20
Aave Deposit250,0000.007500$24.00
Uniswap V3 Add Liquidity500,0000.015000$48.00
Contract Deployment1,000,0000.030000$96.00

Formula

Transaction Cost (USD)

Gas price in gwei × gas units consumed = cost in ETH. Multiply by ETH price for USD value.

Gwei to ETH

1 gwei = 0.000000001 ETH (10⁻⁹). 1 ETH = 1,000,000,000 gwei.

Total Gas Cost (ETH)

The ETH amount consumed by the transaction, independent of ETH price.

Examples

Example 1: Simple ETH transfer at 30 gwei ($3,200 ETH)
  • Gas units: 21,000 (fixed for ETH transfers)
  • Gas price: 30 gwei
  • Cost in ETH = 21,000 × 30 × 10⁻⁹ = 0.00063 ETH
  • Cost in USD = 0.00063 × $3,200 = $2.02
A simple ETH transfer costs $2.02 at 30 gwei
Example 2: Uniswap V3 swap at 50 gwei ($3,200 ETH)
  • Gas units: ~184,000 (varies by route complexity)
  • Gas price: 50 gwei
  • Cost in ETH = 184,000 × 50 × 10⁻⁹ = 0.0092 ETH
  • Cost in USD = 0.0092 × $3,200 = $29.44
A Uniswap V3 swap costs ~$29.44 at 50 gwei — wait for lower gas if your trade is small
Example 3: Contract deployment at 20 gwei ($3,200 ETH)
  • Gas units: ~1,000,000 (complex contracts use more)
  • Gas price: 20 gwei
  • Cost in ETH = 1,000,000 × 20 × 10⁻⁹ = 0.02 ETH
  • Cost in USD = 0.02 × $3,200 = $64.00
Deploying a contract costs $64.00 at 20 gwei — a good price for deployment

Key Concepts

What Is Gas?

Gas is the unit of computational effort on Ethereum. Every operation (addition, storage write, contract call) costs a fixed amount of gas. Gas units measure work done; gas price (in gwei) is what you pay per unit. Total cost = gas units × gas price.

What Is Gwei?

Gwei (gigawei) is a denomination of ETH. 1 gwei = 0.000000001 ETH = 10⁻⁹ ETH. Gas prices are quoted in gwei because the numbers are more readable. At $3,200 ETH, 1 gwei = $0.0000032.

EIP-1559 Fee Structure

Since the London upgrade, Ethereum uses a base fee (set by the network, burned) plus a priority tip (paid to validators). The base fee fluctuates with network demand. Users set a max fee and max priority fee — actual cost is usually lower than the max.

Gas Limits vs Gas Used

Gas limit is the maximum gas a transaction can consume (you set this). Gas used is the actual amount consumed. You only pay for gas used. Setting the limit too low causes the transaction to revert — you still pay for the gas consumed before the revert.

L2 Gas Savings

Layer 2 rollups (Arbitrum, Optimism, Base) reduce gas costs by 10-100x compared to Ethereum mainnet. A Uniswap swap costing $30 on L1 might cost $0.10-$1.00 on an L2. L2s still post data to L1, so costs aren't zero.

Gas Optimization Tips

Transact during low-demand periods (weekends, early morning UTC). Use gas trackers to find optimal timing. Batch transactions when possible. Use L2s for small trades. Set a max fee you're comfortable with and let the transaction confirm when gas drops.

Understanding Ethereum Gas Fees

Every Ethereum transaction requires gas — a measure of computational work performed by the network. Gas fees compensate validators for processing and securing transactions. The cost varies by transaction type: a simple ETH transfer uses 21,000 gas, while a complex DeFi interaction can use 500,000+ gas.

Gas prices are denominated in gwei (1 gwei = 10⁻⁹ ETH) and fluctuate based on network demand. During high-activity periods (NFT mints, market crashes), gas prices can spike from 20 gwei to 200+ gwei, making transactions 10x more expensive. The total USD cost also depends on the ETH price.

This converter shows you the real dollar cost of common transaction types at your specified gas price. Use it to determine whether a trade, swap, or contract interaction is cost-effective relative to the value being transacted.

Frequently Asked Questions

Why does gas vary so much between transaction types?

Each Ethereum operation (opcode) has a fixed gas cost. Simple transfers only move ETH (few opcodes), while Uniswap swaps involve multiple contract calls, storage reads/writes, and token transfers — each adding to the gas bill. More complex logic = more gas.

Are gas costs different on L2s?

Yes, dramatically. Arbitrum, Optimism, and Base reduce gas costs by 10-100x by batching transactions and posting compressed data to Ethereum mainnet. The same Uniswap swap that costs $30 on L1 might cost $0.10-$1.00 on an L2.

When is the cheapest time to transact?

Gas prices are typically lowest on weekends and during 2-6 AM UTC (when US and European activity is lowest). Gas trackers like Etherscan Gas Tracker show historical patterns and real-time prices to help you time transactions.

What happens if gas price changes during my transaction?

With EIP-1559, you set a max fee per gas. If the base fee drops below your max, you pay less (the actual base fee + your priority tip). If the base fee rises above your max, your transaction stays pending until gas drops or you cancel/replace it.