Skip to main content

Ethereum Gas Calculator

Calculate Ethereum transaction costs in ETH and USD. Set gas limit, gas price (gwei), and current ETH price to see the exact fee. Common operations reference table included.

✓ ETH + USD cost ✓ Common ops reference ✓ Runs 100% in your browser

ETH transfer = 21,000 · ERC-20 transfer ≈ 65,000 · Contract deploy ≈ 1,500,000

Current mainnet: check ethgasstation.info or Etherscan

Common Operations

Transaction Cost

Gas Used 21,000
Gas Price 20 gwei
Cost in ETH 0.00042 ETH
Cost in USD $1.34

Gwei Breakdown

1 gwei = 0.000000001 ETH
Gas cost in gwei = 420,000 gwei
Gas cost in wei = 420,000,000,000 wei

Common Operations Gas Reference

Operation Gas (approx) Cost (ETH) Cost (USD)

Frequently Asked Questions

What is gas in Ethereum?▼

Gas is the unit that measures the computational work required to execute operations on the Ethereum network. Every operation — from a simple ETH transfer to a complex smart contract interaction — consumes a specific amount of gas. Gas prevents abuse of the network by ensuring each computation has a cost. You pay gas fees in ETH (in gwei units) to compensate validators who process your transaction.

What is gwei?▼

Gwei is a denomination of ETH used for gas prices. 1 ETH = 1,000,000,000 gwei (1 billion gwei). Gas prices are quoted in gwei because the values are easier to work with — saying '20 gwei' is clearer than '0.00000002 ETH'. After EIP-1559, gas price consists of a base fee (burned) plus a priority fee (tip to validators).

What is the gas limit?▼

The gas limit is the maximum amount of gas you're willing to let a transaction consume. For a simple ETH transfer, 21,000 gas is always sufficient. For smart contract interactions, you set a higher limit (e.g. 200,000) to ensure the transaction doesn't run out of gas. Unused gas is refunded — you only pay for gas actually consumed. If gas runs out mid-execution, the transaction fails but you still pay the gas used.

How does EIP-1559 change gas fees?▼

EIP-1559 (August 2021) replaced the first-price auction model with a base fee + priority fee model. The base fee is set algorithmically by the network based on demand and is burned (destroyed), reducing ETH supply. The priority fee (tip) goes to validators. You set a max fee (maximum total you'll pay) and the actual cost is base fee + priority fee. This made fee estimation more predictable.

Why do different operations cost different amounts of gas?▼

Each EVM opcode has a fixed gas cost based on its computational complexity. Reading data from storage costs 100-2100 gas. Writing to storage costs 20,000 gas (first write) or 2,900 gas (update). A simple ETH transfer (no code) always costs exactly 21,000 gas. ERC-20 transfers cost ~65,000 gas because they execute contract code. Deploying a contract costs much more (500K–3M+ gas) depending on bytecode size.

What are Layer 2 gas fees?▼

Layer 2 networks like Arbitrum, Optimism, Base, and Polygon process transactions off-chain and periodically post batches to Ethereum mainnet. This dramatically reduces per-transaction costs — often 10-100x cheaper than mainnet. However, L2 transactions still use gwei and gas units, just at lower amounts. This calculator focuses on Ethereum mainnet; L2 costs vary by network.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →