Gas Fee Calculator
Calculate transaction gas cost from gas price, limit and token value.
About Gas Fee Calculator
Cost is the gas used multiplied by the price per unit, where a simple transfer uses 21,000 gas and contract interactions far more. The base fee is burned while only the priority fee reaches validators. Gas limit is a cap rather than a charge, so unused gas is refunded, but setting it too low causes the transaction to fail while still consuming the gas spent.
Formula
Gas Fee
Cost in tokens = gas limit × (base fee + priority fee) ÷ 10⁹
- gwei
- One billionth of a token, the usual unit for gas prices
- base fee
- Burned rather than paid to validators, and set by network demand
Worked example
With the default values below, Gas Fee Calculator returns Total Transaction Cost of $1.2600. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Gas limitminimum 1
- 21,000
- Base feeminimum 0 gwei
- 18 gwei
- Priority feeminimum 0 gwei
- 2 gwei
- Token priceminimum 0
- 3,000
- Number of transactionsminimum 1
- 1
Results
- Total Transaction Cost
- $1.2600
- Cost in Tokens
- 0.00042000
- Cost per Transaction
- $1.2600
- Effective Gas Price
- 20.00 gwei
- Share Paid as Base Fee
- 90.00%
Step by step
- 1Values used
- 2Gas Fee
- 3Total Transaction Cost= 1.2600
- 4Cost in Tokens= 0.00042000
- 5Cost per Transaction= 1.2600
- 6Effective Gas Price= 20.00 gwei
- 7Share Paid as Base Fee= 90.00
Assumptions and limits
- The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax or compounding frequency into account.
- Figures are rounded for display to 8 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How is Gas Fee calculated?
Cost in tokens = gas limit × (base fee + priority fee) ÷ 10⁹ Cost is the gas used multiplied by the price per unit, where a simple transfer uses 21,000 gas and contract interactions far more. The base fee is burned while only the priority fee reaches validators.
Why does Gas Fee matter?
Gas limit is a cap rather than a charge, so unused gas is refunded, but setting it too low causes the transaction to fail while still consuming the gas spent.
What values do I need to enter?
This calculator takes 5 inputs: Gas limit, Base fee, Priority fee, Token price, Number of transactions. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
