Skip to content
Calculator Collection

Ethereum Gas Fee Calculator

Calculate the USD cost of an Ethereum transaction from its gas limit, gas price in gwei, and the current ETH price. Use it to budget for swaps, mints and contract interactions before signing.

Last updated: May 2026

Compare with similar

About this calculator

The formula is Fee (USD) = (gasLimit × gasPrice × ethPrice) / 1,000,000,000 — gas limit (a unit of computational work) multiplied by gas price (in gwei, where 1 ETH = 10⁹ gwei) gives the fee in gwei, dividing by 10⁹ converts to ETH, and multiplying by ethPrice produces dollars. Gas limit varies sharply by operation: a simple ETH transfer uses 21,000 gas, an ERC-20 token transfer ~65,000, a Uniswap v2 swap ~150,000–200,000, a Uniswap v3 swap ~180,000–250,000, an NFT mint 100,000–400,000+ depending on contract complexity, and a complex DeFi composability call can exceed 1,000,000. Gas price is what the market is paying per unit of gas at the time you submit; it fluctuates from <1 gwei during quiet hours on L2s to several hundred gwei during NFT-mint frenzies on mainnet. Edge cases: the formula assumes a legacy (pre-EIP-1559) transaction price, but post-London the actual paid price is base fee + priority tip, both denominated in gwei, so you should sum them and enter the total. If a transaction reverts you still pay for the gas consumed up to that point — the gas limit acts as a ceiling, but the actual usage (and thus fee) is what hits your wallet. Layer-2 rollups (Arbitrum, Optimism, Base) typically cost 10–100× less than mainnet for the same operation.

How to use

Example 1 — simple ETH transfer at low gas price. gasLimit 21,000, gasPrice 20 gwei, ETH price $2,500. Step 1: 21,000 × 20 = 420,000 gwei. Step 2: 420,000 × $2,500 = 1,050,000,000. Step 3: 1,050,000,000 / 1,000,000,000 = $1.05. Verify: 420,000 gwei is 0.00042 ETH, and 0.00042 × $2,500 = $1.05 ✓. This is roughly what a simple transfer costs on a quiet day on Ethereum mainnet. Example 2 — Uniswap swap during congestion. gasLimit 180,000, gasPrice 80 gwei, ETH price $3,000. Step 1: 180,000 × 80 = 14,400,000 gwei. Step 2: 14,400,000 × $3,000 = 43,200,000,000,000. Step 3: 43,200,000,000,000 / 1,000,000,000 = $43,200 — wait that's wrong. Let me redo: the units are gwei × ETH-USD-price, but ethPrice should be applied after converting gwei → ETH. Step 1: total gwei = 180,000 × 80 = 14,400,000. Step 2: convert to ETH: 14,400,000 / 1,000,000,000 = 0.0144 ETH. Step 3: USD = 0.0144 × $3,000 = $43.20. Verify: same calc, just reordered — at 80 gwei a Uniswap swap on a $3,000 ETH day costs about $43; if you wait until gas falls to 20 gwei the same swap costs only ~$11. ✓

Frequently asked questions

What is gas and why is it denominated in gwei?

Gas is Ethereum's unit of computational work — every operation in the EVM (adding numbers, reading storage, hashing) has a fixed gas cost, and the total gas a transaction consumes reflects how much computation it required. Denominating gas price in gwei (1 gwei = 10⁻⁹ ETH, or one billionth of an ether) keeps the per-unit price legible: at 30 gwei per gas unit you can talk about prices in two- or three-digit gwei rather than 0.0000000300 ETH. Gas was introduced as a separate concept from ETH itself so that block-space pricing can move independently of ETH's spot price — high computational demand pushes gas price up regardless of what ETH is doing in dollars. Since EIP-1559 (London hardfork, 2021), each block has a 'base fee' that adjusts up or down based on the previous block's fullness; you also include a 'priority fee' (tip) to incentivise validators to include your transaction quickly. The total you pay is (base fee + priority fee) × gas used.

How do I find the right gas limit and price for my transaction?

Your wallet (MetaMask, Rabby, Frame) estimates a gas limit automatically by simulating the transaction; you can usually trust its estimate, with a 10–20% buffer for safety. For gas price, real-time gas trackers — Etherscan's Gas Tracker, Blocknative, ETH Gas Station — show the current base fee and recommended priority tips for fast (~15s), average (~30s) and slow (~5min+) inclusion. During high congestion (NFT mints, market crashes triggering liquidations), prices can spike 10–50× the quiet-period baseline; if your transaction is not time-sensitive, waiting until off-peak hours (typically weekends or US night) can cut costs by 70–90%. For L2 networks (Arbitrum, Optimism, Base, zkSync) gas prices are typically 10–100× lower than mainnet because they batch transactions before posting to L1, and you should configure your wallet's network selector accordingly. Never blindly accept a sky-high gas suggestion from a dApp UI without sanity-checking it on Etherscan.

What happens if my transaction runs out of gas or reverts?

If your transaction tries to consume more gas than the limit you set, it will revert (state changes are undone) but you still pay for all the gas consumed up to that point — the gas limit is a ceiling, not a refund. The same is true for any revert: a swap that reverts because of slippage, an approve that fails because of a contract bug, or a mint that runs out of allocated NFTs all cost you the gas used. This is why setting an absurdly low gas limit to 'save money' is risky: if the transaction needs 180,000 gas to complete and you set the limit to 100,000, it will revert at 100,000 and you waste 100,000 × gasPrice × ETH for nothing. On the other hand, setting a generous gas limit costs nothing extra if the transaction succeeds — only the actually-consumed gas is charged. Always use your wallet's estimate (or simulator's estimate) plus a 10–20% buffer rather than guessing a low limit.

What are the common mistakes when estimating gas fees?

The biggest mistake is mixing units — entering gas price in wei instead of gwei (a factor of 10⁹ difference) gives a fee that is either trivial or astronomical, and either way wrong. The second is forgetting that EIP-1559 transactions cost base fee + priority tip; entering only the priority tip massively under-estimates the fee. The third is using a mainnet gas price for an L2 transaction (or vice versa) — gas economics differ by orders of magnitude across chains. People also forget that NFT mints and complex DeFi interactions can use 5–10× the gas of a simple swap, so a calculator estimate based on 'typical' values can be far off for unusual transactions. Reverts are a quiet drain on funds — failing a $30 transaction five times during a volatile market session costs $150 with nothing to show for it, so simulate before sending in production tools like Tenderly or your wallet's built-in simulation. Finally, do not assume current gas prices will hold; mempool dynamics can spike fees in seconds when a popular mint launches.

When should I not use this calculator?

Do not use it to estimate fees on non-Ethereum-compatible chains — Bitcoin (sat/vbyte fees), Solana (compute units), Cosmos chains (fixed fees) and others use entirely different fee structures. For L2 networks (Arbitrum, Optimism, Base, zkSync) the calculator's basic formula still works but L2 fees include a 'L1 data cost' that varies with mainnet gas price; specialised L2 fee estimators capture this more accurately. Do not use it for cross-chain bridges or aggregator transactions, where multiple gas-fee components on different chains stack together and need a bridge-specific cost calculator. It is not a real-time fee estimator — by the time you fill in the form, on-chain gas prices may have moved meaningfully, so always cross-check against your wallet's quote at the moment of signing. Finally, it is not a predictor of future gas prices; for sizing a budget for many future transactions, use median or 90th-percentile gas prices from historical data rather than a single point-in-time snapshot.

Sources & references