Every Ethereum transaction costs gas. The fee you pay depends on the type of transaction, current network congestion, and how much of a tip you offer the validator. This calculator handles both the modern EIP-1559 model (post-London) and the legacy gas price model, so it works regardless of which era your toolchain targets.
Load Sample sets up a typical ETH transfer: base fee 20 Gwei, priority fee 1.5 Gwei, 21,000 gas units, ETH price at $3,200. The result shows both the actual fee (what you pay under normal conditions) and the max fee (the absolute ceiling EIP-1559 lets you commit to). Swap to a preset like Uniswap Swap or NFT Mint to see how higher gas usage affects the total cost at the same gas price.
The Controls and What Each Field Does
- Base fee (EIP-1559): the minimum fee the network requires per gas unit. It is set by the protocol and burned — it does not go to the validator. Check a block explorer for the current base fee.
- Priority fee / tip (EIP-1559): the amount above the base fee you offer as a validator incentive. A higher tip gets your transaction included faster during congestion. 1 to 2 Gwei covers most non-urgent transfers.
- Gas price (legacy): the single Gwei value for pre-EIP-1559 chains or legacy transaction types. The full amount goes to the miner.
- Gas units: how much computation the transaction consumes. A simple ETH transfer always costs exactly 21,000 units. Token transfers and DEX swaps use more because they execute contract code. Use the presets for common operations or enter a custom estimate from a gas simulation tool.
- ETH/USD rate: optional. Enter the current spot price to see the fee in dollars alongside the ETH figure. The rate is never fetched automatically — you supply it so no network call is made.
EIP-1559 Formulas
- Actual fee: (base fee + priority fee) × gas units. This is what you pay when the transaction confirms.
- Max fee: (base fee × 2 + priority fee) × gas units. EIP-1559 wallets commit to this upper bound. If the actual base fee is lower, the difference is refunded. The factor of 2 accounts for a base fee that can at most double in the next block.
- Fees are computed in Gwei then converted to Wei via BigInt multiplication to avoid the floating-point precision loss that would otherwise affect the 18th decimal place of an ETH value.
Accuracy Limits
- Gas unit presets are approximate. A Uniswap swap can range from 120,000 to 200,000+ units depending on the pool, token type, and route complexity. Use a simulation tool or your wallet's gas estimate for precision.
- The calculator accepts gas unit values up to 30,000,000 — the Ethereum block gas limit. Entering a value above the block limit would mean the transaction can never be included in a single block.
- Base fee can change by up to 12.5% per block. The actual fee shown here is correct for the base fee you entered; the true cost at inclusion may differ if the base fee moves before your transaction lands.