CCalcNest AI

Crypto Gas Fee Calculator

Calculate Ethereum gas fee.

$0.1$1,000
210005000000
$0$100,000
Enter values above — results appear instantly as you type.
AI Insight: Gas fees are paid in the chain's native token (ETH on Ethereum, SOL on Solana) regardless of which token you're moving. Always keep a small native-token balance for fees — wallets fail mid-transaction otherwise, and the failed transaction still costs gas.
Reviewed by the CalcNest Editorial Team · Last reviewed: May 2026 · Methodology
Looking for a different calculator? Try our AI Finder — describe what you need in plain English. Try AI Finder →

Formula

Cost = (Gwei × Units) / 1e9

Example

30 gwei × 21K units at $3K ETH → $1.89.

Embed this calculator on your site

Add this free calculator to your own website with one line of code. The embedded version is responsive, ad-free, and includes a small attribution link back to CalcNest AI.

<iframe src="https://calcnestai.com/embed/crypto-gas-fee-calculator.html" width="100%" height="700" frameborder="0" style="border: 1px solid #e5e5e5; border-radius: 12px; max-width: 720px;" loading="lazy" title="Crypto Gas Fee Calculator — Free Tool by CalcNest AI"></iframe>

Understanding the Crypto Gas Fee Calculator

A gas fee calculator converts the two numbers Ethereum actually charges you in, gas price and gas units, into a figure you can reason about: the cost in ETH and in dollars. The confusion this resolves is that gas price is quoted in gwei, a unit almost nobody has intuition for, and the total depends on how computationally heavy your transaction is, which varies enormously between sending ETH and interacting with a complex contract.

How it actually works

Enter the gas price in gwei, the gas units your transaction requires, and the current ETH price in dollars. The calculator multiplies gas price by gas units, divides by a billion to convert gwei to ETH, and multiplies by the ETH price for the dollar cost. A simple transfer at 20 gwei uses 21,000 gas units, which is 0.00042 ETH, or $1.26 at an ETH price of $3,000. It also flags whether the resulting fee is high enough to be worth waiting out.

Typical gas units by transaction type
TransactionApprox. gas unitsCost at 20 gweiAt $3,000 ETH
Simple ETH transfer21,0000.00042 ETH$1.26
ERC-20 token transfer~65,0000.00130 ETH$3.90
DEX token swap~150,0000.00300 ETH$9.00
Complex contract / NFT mint~300,0000.00600 ETH$18.00

The deeper context most people miss

Two independent variables drive your fee and they behave completely differently. Gas units are essentially fixed by what your transaction does: a simple transfer always costs 21,000 units, and no amount of waiting changes that. Gas price is set by network demand and swings by an order of magnitude within a single day. This means the only lever you actually control on a given transaction is timing, and the difference between submitting at 12 gwei and 120 gwei is the difference between a $1 fee and a $10 fee for identical work.

What gas actually measures and why the two-part structure exists

Gas is a measure of computational work, not of money. Every operation the Ethereum Virtual Machine can perform has a fixed gas cost attached to it, set by the protocol: reading from storage costs a certain number of units, writing costs considerably more, arithmetic costs very little. A transaction's total gas units are simply the sum of the operations it executes, which is why a plain ETH transfer is always exactly 21,000 units while a token swap routing through several contracts might use 150,000 or more. This decoupling exists for a good reason. If fees were denominated purely in currency, the cost of computation would swing with the ETH price and the network would have no stable way to price resource consumption. By measuring work in gas units and letting the market set the price per unit, the protocol keeps the relative cost of operations constant while allowing the absolute price to respond to demand for block space. The practical consequence for a user is that these two numbers should be reasoned about separately. Gas units are a property of what you're doing, and the way to reduce them is to do something simpler: batch transactions, use a more efficient contract, or avoid unnecessary approvals. Gas price is a property of when you're doing it, and the way to reduce it is to wait for quieter network conditions. Confusing the two leads people to wait hours for a lower gas price on a transaction whose real problem is that it's calling an inefficient contract.

A worked example: the same swap at three different moments

Suppose you want to execute a token swap requiring roughly 150,000 gas units, with ETH at $3,000. During a quiet period at 8 gwei, the fee is 150,000 × 8 = 1,200,000 gwei, which is 0.0012 ETH, or $3.60. At a typical mid-day level of 30 gwei, the same swap costs 0.0045 ETH, or $13.50. During a congestion event, perhaps a heavily anticipated NFT mint or a market-wide liquidation cascade, gas can spike to 200 gwei or beyond, making the identical swap 0.03 ETH, or $90. Nothing about the transaction changed. The same contract, the same tokens, the same computational work, priced between $3.60 and $90 depending purely on when you pressed the button. For a $50,000 swap, even the $90 fee is a rounding error and waiting is pointless. For a $200 swap, a $90 fee consumes 45% of the position and the transaction should simply not happen at that moment. This is why the sensible discipline is to think in terms of fee as a percentage of transaction value rather than in absolute dollars, since the same fee can be trivial or prohibitive depending entirely on what you're moving.

Deciding whether to transact now or wait

The practical question is almost always timing, and it has a reasonably clear decision structure. First, is the transaction time-sensitive? Liquidating a position before a margin call, claiming an expiring reward, or exiting a trade on a signal cannot wait, and the fee is simply a cost of doing business. Second, if it can wait, what is the fee as a proportion of what you're moving? A rough rule many people use is that fees above 1% to 2% of transaction value warrant waiting, and fees above 5% mean the transaction probably shouldn't happen on that network at all. Third, if you're waiting, network activity follows fairly predictable rhythms: demand tends to be lower during off-peak hours for the regions with the most trading activity and on weekends, though major events override these patterns entirely. Fourth, consider whether the transaction needs to happen on the base layer at all. For most routine transfers and swaps, layer 2 networks settle to Ethereum while charging a small fraction of the fee, and moving activity there is usually a far larger saving than any amount of timing optimisation on the base layer. The main consideration is the cost of bridging assets across, which only makes sense if you'll transact enough on the layer 2 to recover it.

How the fee market changed, and what the base fee and priority fee mean

Ethereum's fee mechanism was substantially reworked to make fees more predictable, and understanding the current structure explains behaviour that otherwise seems strange. Rather than a pure blind auction where users guess a price and overpay, each block now carries a base fee that the protocol calculates algorithmically from how full recent blocks have been. When blocks run above the target size, the base fee rises; when they run below, it falls. This base fee is burned rather than paid to validators, permanently removing that ETH from supply, which is why network activity now reduces total ETH issuance. On top of the base fee, users add a priority fee, sometimes called a tip, which goes to the validator and determines how quickly your transaction gets included relative to others. Wallets typically present a single combined number, but the split matters: during congestion, the base fee climbs mechanically and there's nothing you can do about it, while the priority fee is genuinely discretionary and only needs to be large enough to get included in a reasonable timeframe. Setting a very high priority fee during quiet periods is simply wasted money, since a modest tip achieves the same inclusion speed. Wallets also let you set a maximum fee, and any difference between your maximum and the actual base fee is refunded, which means setting a generous maximum during volatile conditions protects against a failed transaction without necessarily costing more.

Variations: layer 2 networks, failed transactions, and other chains

Layer 2 rollups bundle many transactions together and post compressed data to Ethereum, spreading the base layer cost across all of them, which typically reduces fees by one to two orders of magnitude while inheriting Ethereum's security. For routine activity this is usually the correct answer rather than optimising base layer timing. Failed transactions are an important and painful special case: if a transaction runs out of gas or reverts, the computational work was still performed by the network, so the gas consumed is still charged even though nothing happened. This is why setting a gas limit too tight to save money is false economy, since a transaction that fails for insufficient gas costs you the fee and delivers nothing. Other chains use different fee models entirely, some with fixed or near-fixed fees, some with their own dynamic markets, and comparing them meaningfully requires looking at cost per transaction type rather than at headline gas prices, which aren't denominated comparably.

Keeping gas costs under control

Think about gas units and gas price separately, since units are fixed by what your transaction does and price is fixed by when you send it, and only the second is something you can wait out. Judge fees as a percentage of the value you're moving rather than in absolute dollars, because a $10 fee is trivial on a $10,000 transfer and prohibitive on a $150 one. For anything not time-sensitive, wait for quieter network conditions rather than transacting during congestion spikes, where identical work can cost ten times more. For routine transfers and swaps, use a layer 2 network rather than the base layer, which usually saves far more than any timing optimisation, provided you'll do enough there to justify the bridging cost. And don't trim the gas limit to save money, since a transaction that fails for insufficient gas still consumes the fee while accomplishing nothing.

What people get wrong

  • Trying to reduce gas units by waiting, when units are fixed by the transaction's computational work and only the gas price varies with time.
  • Judging a fee in absolute dollars rather than as a share of transaction value, so a $9 fee looks the same on a $200 swap and a $200,000 one.
  • Setting a tight gas limit to save money, when a transaction that runs out of gas still consumes the fee and delivers nothing.
  • Optimising base layer timing for routine transfers instead of using a layer 2 network, where the same activity typically costs a small fraction as much.

Where the math comes from

Gas Cost in ETH = (Gas Price in gwei × Gas Units) / 1,000,000,000, since one gwei is one billionth of an ETH. USD Cost = Gas Cost in ETH × ETH Price. Gas units are determined by the computational operations your transaction performs and are essentially fixed per transaction type, while gas price is set by demand for block space and varies continuously.

Questions and answers

Are these returns guaranteed?

No. DeFi yields can change daily based on protocol activity, token price moves, and liquidity changes. The calculator computes returns at the input rate; that rate is itself volatile.

How is this taxed?

In the US, every swap, staking reward, and airdrop is potentially a taxable event at the time of receipt. Track all transactions; tax software designed for crypto (Koinly, CoinTracker) helps significantly.

What is impermanent loss?

When you provide liquidity to a pool with two assets, divergent price moves between them produce a 'loss' relative to just holding the assets. The loss becomes permanent when you withdraw; if prices revert, it goes away.

How risky are these protocols?

Smart contract risk (bugs, exploits) is real and varies by protocol. Audits help but do not eliminate risk. Established protocols with multiple audits and long track records carry less risk than new ones.

Should I use leverage?

Leverage multiplies both gains and losses. In crypto, where 30%+ price moves happen regularly, leverage can liquidate positions in hours. Most prudent investors avoid it or limit to small allocations.

What is gwei and how does it relate to ETH?

A gwei is one billionth of an ETH, used because gas prices in whole ETH would be unreadably small decimals. A gas price of 20 gwei means 0.00000002 ETH per unit of gas. Multiplying by the transaction's gas units and dividing by a billion converts back to ETH, which is exactly what this calculator does.

Why does a simple transfer always cost 21,000 gas?

Because gas units measure computational work, and a plain ETH transfer performs a fixed, minimal set of operations defined by the protocol. Interacting with contracts costs more because each additional operation, particularly writing to storage, carries its own gas cost. A token transfer typically runs around 65,000 units and a swap around 150,000.

How can I reduce my gas fees?

Timing is the main lever for a given transaction, since the gas price component swings by an order of magnitude with network demand while gas units stay fixed. Beyond that, using a layer 2 network for routine activity typically reduces fees by one to two orders of magnitude, which usually saves far more than any timing optimisation on the base layer.

What's the difference between base fee and priority fee?

The base fee is calculated algorithmically from how full recent blocks have been and is burned rather than paid to validators, so it rises mechanically with congestion and can't be negotiated. The priority fee is a tip to the validator that influences how quickly you're included. Wallets often show one combined figure, but only the priority portion is genuinely discretionary.

Do I pay gas if my transaction fails?

Yes, generally. If a transaction reverts or runs out of gas, the network still performed the computation, so the gas consumed is charged even though the intended action didn't happen. This is why setting a gas limit too tightly is counterproductive, since a failure costs the fee and delivers nothing.

When are gas fees usually lowest?

Network demand follows rough patterns, tending to be lower during off-peak hours for the most active trading regions and often on weekends. However, major events such as popular NFT mints, token launches, or market-wide liquidations override these patterns entirely and can spike fees regardless of the time of day.

Is a $10 gas fee expensive?

It depends entirely on what you're doing. On a $20,000 transfer it's 0.05% and irrelevant. On a $150 swap it's nearly 7% and the transaction probably shouldn't happen at that moment. Thinking about fees as a percentage of transaction value rather than as an absolute figure is what makes this decision straightforward.

Sources & References

Authoritative references consulted in building this calculator and educational content. These are primary sources — check directly for the most current figures.

Related calculators

Staking Rewards · Crypto Tax Cost Basis · Token Vesting · Yield Farming APR · Crypto Portfolio Allocation