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 transfer = 21,000 · ERC-20 transfer ≈ 65,000 · Contract deploy ≈ 1,500,000
Current mainnet: check ethgasstation.info or Etherscan
Common Operations
Transaction Cost
Gwei Breakdown
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.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
Multi-Chain Wallet Address Validator
Validate cryptocurrency wallet addresses across Ethereum, Bitcoin, Solana, TRON, and EVM chains. Check EIP-55 checksum and detect address format.
Open free tool →
EVM Calldata Decoder
Decode Ethereum transaction calldata from raw hex. Parse function selectors, decode ABI-encoded arguments for all Solidity types, and analyze transaction input data.
Open free tool →
Smart Contract Gas Estimator
Estimate Ethereum smart contract gas costs in USD. Compare operation costs across mainnet, Arbitrum, Optimism, and Base L2 networks.
Open free tool →
More Free Tools
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →