Independent guide · Crypto
Crypto Transaction Fees: Calculate the Full Cost
Learn to calculate Ethereum gas costs using EIP-1559. See worked examples for transfers and token interactions, plus service charge distinctions.

Why this matters
Accurate fee calculation requires separating on-chain execution costs from service charges and using actual gas usage rather than maximum limits.
Understanding the EIP-1559 Fee Structure
Ethereum transaction costs are dynamic, depending on gas actually used and prevailing network conditions. The EIP-1559 standard splits fees into a base fee and a priority fee. The base fee is burned, while the priority fee goes to validators. This structure makes costs variable rather than static.
You must distinguish between the maximum fee you are willing to pay and the actual fee charged. The maxFeePerGas is a ceiling, not necessarily the final price. The actual cost is determined by the base fee plus the effective priority fee. Using the maximum limit as your cost estimate may overstate the real expense, but it can also equal the actual fee if network demand is high.
The Reproducible Calculation Formula
For a rate expressed in gwei, execution fee in ETH = gas actually used * (base fee + effective priority fee) * 10^-9. One gwei is 10^-9 ETH. A currency valuation is a separate multiplication using a clearly labelled exchange-rate assumption or timestamped quote. All valuations below use the hypothetical EUR 2500 per ETH, not a live price.
This calculation applies to the execution layer only. It does not include exchange withdrawal fees, bridge costs, or slippage. These are separate line items. If you add them to the gas cost without checking if they are inclusive, you will double count. Always verify whether the quoted price includes the network fee or adds it on top.
Scenario A: Simple ETH Transfer
Suppose a hypothetical transfer uses 21000 gas, with a base fee of 10 gwei and effective priority fee of 2 gwei. Its execution fee is 21000 * (10 + 2) * 10^-9 = 0.000252 ETH. This is an Ethereum execution example, not a universal gas allowance for every transfer or network.
To express this in euros, we use an illustrative valuation of 2,500 EUR per ETH. Multiplying 0.000252 by 2,500 gives 0.63 EUR. This is a hypothetical example. Live prices fluctuate. Do not treat 2,500 EUR as a current market rate. The key takeaway is the method: multiply gas by the effective rate, then convert.
Scenario B: Token Transfer Cost
For a second hypothetical contract interaction, assume 65000 gas, base fee 18 gwei and effective priority fee 2 gwei. Execution fee = 65000 * (18 + 2) * 10^-9 = 0.0013 ETH. The gas quantity is a stated assumption, not a fixed charge for all token transfers.
Using the same illustrative 2,500 EUR/ETH rate, the cost is 3.25 EUR. This demonstrates how gas usage scales with complexity. However, you cannot assume every token transfer uses 65,000 gas. Some are cheaper, some are more expensive. Always check the specific gas estimate for the contract interaction you are performing.
Distinguishing Service Charges
Many platforms add a service charge on top of the network fee. In our hypothetical example, assume a service charge of 0.0005 ETH. At 2,500 EUR/ETH, this is 1.25 EUR. If this fee is billed in addition to the network fee, the total cost for Scenario B becomes 0.0013 + 0.0005 = 0.0018 ETH. This equals 4.50 EUR. The network fee is only part of the total.
If the service charge already includes the network fee, you must not add the gas cost again. Double counting is a common error. Read the terms carefully. Does the quote say 'plus network fees' or 'all-inclusive'? The distinction changes your total cost significantly. Always verify the billing structure before confirming the transaction.
Verifying Actual Costs Post-Transaction
After execution, a receipt supplies gasUsed and effectiveGasPrice. The raw effectiveGasPrice is normally in wei: execution fee in ETH = gasUsed * effectiveGasPrice / 10^18. Thus 21000 * 12000000000 / 10^18 = 0.000252 ETH. Only after converting the rate to gwei should the 10^-9 factor be used; confusing these units produces a billion-fold error.
An on-chain execution that fails can still consume gas. Ethereum execution arithmetic is not a universal Bitcoin or layer-2 fee formula; additional data fees may apply on other systems. A fee quote guarantees neither inclusion time nor a service’s crediting time. Check network, receipt units, fee scope and provider charges separately.
Practical checklist
- Identify the exact gas limit and actual gas used for the specific transaction type.
- Determine if the quoted fee includes the network gas cost or adds it separately.
- Use the effective gas price from the receipt for accurate post-transaction analysis.
- Convert ETH costs to local currency using a current, clearly labelled spot price.
Sources and further reading
Fact-checked: . External sources open in a new tab.
- Gas and feesEthereum.org
- EIP-1559: Fee market changeEthereum Improvement Proposals