Gas Fee Calculator
Convert gas price and gas limit into a transaction cost in crypto and in your own currency, at rates you set.
A gas fee is two things multiplied together, and confusing them is the source of most of the surprise people feel at the till. The gas limit is a quantity of computation, fixed by what the transaction does; the gas price is what the network happens to be charging for a unit of that computation at the moment it lands. Neither can be worked out from the other, which is why this gas fee calculator asks for both rather than guessing either.
Formula: fee = gas limit x gas price in gwei / 1,000,000,000, valued at your own rate
Your figures
Gas units the transaction consumes, from your wallet's estimate. A plain transfer is 21,000 on every EVM chain; a contract call is whatever the wallet quotes.
Per gas unit. Set by the protocol from how full recent blocks were, and burned rather than paid to anyone.
Per gas unit. The tip you choose, paid to the validator. This is the only part of the gas price you set.
How many transactions of this shape, for pricing a whole job rather than one send.
Optional — the price of one native coin in the currency selected above, which is what turns the fee into money.
Optional — runs the sum backwards and reports the gas price at which the job costs exactly this.
Results
Transaction fee
US$1.35
21.500 gwei × 21,000 gas · 0.0004515 coins
- Gas price20.000 gwei base fee plus 1.500 gwei priority fee — what a wallet displays as one number.
- 21.500 gwei
- Priority fee's share of the gas priceThe share of the price that is the tip you chose. The rest is set by the protocol and burned.
- 6.977%
- Fee per transaction, in the coinGas limit multiplied by the gas price, converted from gwei at exactly 10⁹ gwei to the coin.
- 0.0004515 coins
- Fee per transaction, in gwei
- 451,500 gwei
- Fee per transaction, in weiThe same figure in the base unit: exactly 10¹⁸ wei to one coin.
- 451,500,000,000,000 wei
- Total fee, in the coinFor the single transaction entered.
- 0.0004515 coins
- Fee per transactionAt the US$3,000.00 coin price entered.
- US$1.35
- Total fee
- US$1.35
- Transactions priced
- 1
- Gas price the budget allowsThe gas price at which the whole job costs exactly the budget entered — the figure to compare against a wallet's gas display.
- 79.365 gwei
- Headroom before the budget is reachedHow far the gas price can rise from where it is before the job costs the budget.
- +269.14%
- Job fits the budgetThe total fee above measured against the budget entered.
- Yes
What this means
21,000 gas units at 21.500 gwei each costs 0.0004515 coins per transaction. At the US$3,000.00 coin price entered that is US$1.35. The gas limit is a quantity of computation and the gas price is what the network is charging for it, so the fee is the product of the two and neither term can be worked out from the other.
- Every rate, price, fee and commission above is yours to enter. Nothing is fetched, and no validator's, pool's, wallet's or exchange's figure is preset — where a field opens with a number it is a round illustration to overwrite, because the figure that applies to a position is the one that account is actually paid or charged.
- The gas limit is a ceiling, not a charge. An EVM transaction is billed for the gas it actually uses, so a limit set generously above the estimate costs nothing extra — while a limit set below what the transaction needs runs out of gas, fails, and is still charged for everything it consumed.
- The base fee is set by the protocol from how full recent blocks were, and it is burned rather than paid to anyone. Only the priority fee is a lever you have, which is why its share of the price is reported separately.
- A gas price is a quote for the next block, not for the one your transaction lands in. The base fee moves every block, so a fee priced here is the fee at the price entered rather than the fee that will be charged.
- Assumes the coin price and the budget are both in the currency selected above, and that the fee is paid in the chain's native coin. No exchange rate is applied.
Transaction fee: US$1.35
The link reopens this calculator with the same numbers. Nothing you enter is sent to a server.
Continue with these figures
About the Gas Fee calculation
It turns those two numbers into a fee in gwei, in wei, in the chain's native coin and — if you supply a price for that coin — in your own currency. Nothing about it is chain-specific, so it serves as an Ethereum gas calculator and behaves identically on any other EVM chain. It handles one transaction or a batch of identical ones, which is what makes it useful for pricing a whole job: a mint plus two approvals plus a swap, rather than a single send.
The base fee and the priority fee are entered separately because they behave nothing alike. The base fee is set by the protocol from how full recent blocks were, and it is burned rather than paid to anyone. The priority fee is a tip you choose, and it is the only part of the gas price you control. Wallets add them together and show one number, which hides the distinction just when it matters.
There is also a budget box that runs the whole calculation backwards. Give it a ceiling for the job and it solves for the gas price at which the job costs exactly that, which converts a question about money into a gwei figure you can hold against the gas display in your wallet without doing any arithmetic in your head.
Gas Fee formula
gas price = base fee + priority fee gwei per gas unit
fee per tx (gwei) = gas limit × gas price
fee per tx (wei) = fee in gwei × 1,000,000,000
fee per tx (coin) = fee in gwei ÷ 1,000,000,000
fee per tx (cash) = fee in coin × coin price
total fee = fee per tx × transactions
budget gas price = budget × 1,000,000,000
÷ (transactions × gas limit × coin price)
headroom = (budget gas price − gas price) ÷ gas price- gas limit
- Gas units the transaction consumes. A plain transfer is 21,000 on every EVM chain and always has been; a contract call is whatever the wallet estimated, which is why it is a box rather than a constant.
- base fee
- The protocol's own charge per gas unit, in gwei, set by how full recent blocks were and destroyed rather than paid to a validator. It moves every block.
- priority fee
- The tip per gas unit, in gwei, chosen by the sender and paid to whoever includes the transaction. The only component of the gas price anyone sending a transaction actually sets.
- gwei
- A billionth of a coin — exactly 10⁹ wei, and exactly 10⁹ gwei to one coin. A decimal subdivision with no rounding anywhere in its definition.
- wei
- The base unit: exactly 10¹⁸ to one coin. Everything on chain is denominated in whole wei, which is why the wei figure is the only one of the three that is never a rounded number.
- coin price
- What one native coin is worth in the currency you selected, entered by you. It is the only bridge between the gas figures and any cash figure on the page.
The gas limit is typed rather than assumed because there is no way to guess it. Transaction cost on an EVM chain is a function of the opcodes executed and the storage touched, so a transfer is 21,000 gas everywhere and always, while a swap through a router that writes to four contracts is whatever those four contracts cost that day. The wallet has already done that estimate before it shows a confirmation screen, and copying that figure in is both faster and more accurate than any table of typical values a calculator could carry.
The three denominations are shown because the classic gas-calculator failure is not a subtle modelling error, it is a factor of a thousand. Gwei and wei are exact powers of ten — 10⁹ wei to a gwei, 10¹⁸ wei to a coin — so none of these conversions loses anything, and printing the same fee in all three lets a reader check against a block explorer, which reports wei, and against a wallet, which reports gwei, without converting either by hand.
Separating the base fee from the tip is worth the extra box because only one of them is a decision. The base fee is set by the protocol from recent block fullness and is burned, so raising or lowering your own tip changes what a validator earns and does not change what the network charges. When the tip is 10% of the gas price, as in the example below, dropping it to nothing saves a tenth of the fee at most — which is a very different picture from the one a single combined gas price implies.
The budget line is the same equation solved for the price instead of the cost. Rearranging fee = transactions × gas limit × gas price ÷ 10⁹ × coin price for the gas price gives budget × 10⁹ ÷ (transactions × gas limit × coin price), and what comes out is directly comparable with the number a wallet is showing. The headroom beside it states the same thing as a percentage move, which is the form in which gas prices are actually discussed.
Gas Fee: a worked example
Four contract calls that a wallet estimates at 145,000 gas each, sent at an 18 gwei base fee with a 2 gwei tip, with the native coin priced at $2,400 by hand and a $20 ceiling on the whole job.
- Gas price18 + 2 = 20 gwei
- The tip's share of it2 ÷ 20 = 10%
- Fee per transaction, in gwei145,000 × 20 = 2,900,000 gwei
- The same fee in wei2,900,000 × 10⁹ = 2,900,000,000,000,000 wei
- The same fee in coin2,900,000 ÷ 10⁹ = 0.0029 coins
- Fee per transaction0.0029 × 2,400 = $6.96
- Total for four0.0029 × 4 = 0.0116 coins = $27.84
- Gas price the budget allows20 × 10⁹ ÷ (4 × 145,000 × 2,400) = 14.3678 gwei
- Headroom(14.3678 − 20) ÷ 20 = −28.16%
The job costs 0.0116 coins, or $27.84, against a $20 ceiling — so it does not fit, and it needs the gas price down at 14.3678 gwei to do so, a fall of 28.16%. The useful detail is where that fall would have to come from. The tip is only 2 gwei of the 20, so setting it to zero still leaves an 18 gwei base fee and a $25.06 job. Everything between 18 and 14.37 is protocol-set and burned, which means the arithmetic offers no lever here at all beyond a quieter block.
How to use the Gas Fee calculator
- Copy the gas limit from the wallet confirmation screen rather than estimating it. A plain transfer is 21,000 on every EVM chain, and anything touching a contract is whatever the wallet quoted for that specific call.
- Enter the base fee and the tip separately. A wallet usually shows them added together, but a block explorer reports them apart, and only the tip is a number you decide.
- Set the number of transactions to the whole job, not to one send. Approving a token and then swapping it is two transactions with different gas limits, so price the larger one and treat the result as a ceiling.
- Enter the coin price for the chain's own native coin, not for whatever token you are moving, and in whichever currency you want the answer in — a dollar price makes this a gwei to USD calculator, while a sterling price gives the same fee in pounds. Fees are paid in the native coin on every EVM chain, so a stablecoin transfer still costs coin.
- Use the budget box to turn the question round. It reports the gas price at which the job costs exactly your ceiling, which is a figure you can watch for in a wallet rather than recalculating the cost each time you look.
Limitations of the Gas Fee calculator
Every calculation makes assumptions. These are the ones that matter here.
- The gas limit is a ceiling rather than a charge. A transaction is billed for the gas it actually uses, so a generous limit costs nothing extra — while a limit set too low runs out of gas, fails, and is still charged for everything it consumed.
- A gas price is a quote for the next block and not for the block your transaction lands in. The base fee moves every block, so this prices the fee at the numbers entered rather than the fee that will finally be charged.
- Assumes the fee is paid in the chain's native coin and that both the coin price and the budget are in the currency selected. No exchange rate is applied anywhere.
- Layer 2 chains charge a second component for publishing data to their settlement layer, which this does not model. On those chains the figure here is the execution part of the bill only.
- Excludes anything the transaction itself moves or spends: the amount being sent, a swap's price impact, slippage, and any protocol fee charged inside the contract call.
- Batching several different actions means several different gas limits. Multiplying one limit by a transaction count prices a batch of identical calls, not a mixed sequence.
Frequently asked questions about Gas Fee
Why is the fee so different from one chain to another for the same action?
The gas limit barely changes — a transfer is 21,000 gas everywhere — so almost all of the difference is the gas price and the coin price multiplied together. A chain whose fees are quoted in millionths of a gwei and whose coin trades for cents produces a fee several orders of magnitude below one quoted in tens of gwei on an expensive coin, for identical computation.
Does raising the gas limit make the transaction cost more?
No. The limit is the maximum you authorise, and the chain bills only for the gas actually consumed, refunding nothing because nothing extra was taken. Setting it too low is the expensive mistake: the transaction runs out of gas partway, fails, and is still charged for every unit it burned getting there.
What is the difference between the base fee and the priority fee?
The base fee is calculated by the protocol from how full recent blocks were and is destroyed when the transaction is included, so nobody receives it. The priority fee is a tip you set, paid to whoever includes your transaction, and it is the part that influences how quickly that happens. Wallets add them together into a single gas price, which is why the split is reported separately here.
How do gwei and wei relate to the coin?
By exact powers of ten, with no rounding anywhere in the definition. One coin is 10¹⁸ wei, one gwei is 10⁹ wei, and so one coin is 10⁹ gwei. Gas prices are quoted in gwei because it puts typical values in a readable range, and everything settled on chain is denominated in whole wei underneath.
Why does the calculator not fetch the current gas price?
Because a fetched figure would be stale by the block after it arrived, would cover only whichever chains a provider happened to support, and would be useless for pricing a transaction that already happened. Typing the number keeps the page working on any chain, at any block, and for any historic question, and it keeps the assumption visible instead of buried.
Can I use this as a crypto transaction fee calculator for a transaction already sent?
Yes, and it is one of the cases it handles best. Take the gas used and the effective gas price from the block explorer's receipt, enter those in place of the estimate and the quoted price, and the fee comes out exactly. Adding the coin price at the time of that block then values it correctly for a historic period rather than at today's price.
Last reviewed . See our methodology and editorial policy.
More crypto calculators