UtilityToolsLab

© 2026 UtilityToolsLab. Built and maintained by the UtilityToolsLab Team.

Free eBooks·About·Changelog·Privacy Policy·Terms of Service·Report a bug
HomeSmart Contracts & EVMGas Fee Calculator

Related Tools

Function SelectorENS NamehashMerkle Tree BuilderABI Encoder

ETH Gas Fee Calculator (EIP-1559)

Calculate Ethereum gas fees in ETH and USD. Supports EIP-1559 (base fee + tip) and legacy gas price. Six transaction type presets included.

You Might Also Like

All Smart Contracts & EVM

Function Selector

Compute the 4-byte Ethereum function selector from a Solidity signature using Keccak-256, entirely in your browser. Paste names or types.

ENS Namehash

Compute the ENS namehash (EIP-137) for any .eth domain, label by label, using Keccak-256 in your browser. See every recursive hashing step.

Merkle Tree Builder

Build a Keccak-256 Merkle tree from an address allowlist, read off the root, and copy an inclusion proof for any leaf. OpenZeppelin sorted pairs.

ABI Encoder

Encode a Solidity function call to calldata or decode raw calldata to typed values. Supports uint/int, bool, address, bytesN, bytes and string. No upload.

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.

Fee model

Transaction type preset

Network base fee — burned per EIP-1559

Miner tip — goes to the validator

Use a preset above or enter a custom value (max 30,000,000)

Actual Fee

base + tip (burned + validator)

0.0004515 ETH

451500 Gwei

Max Fee

2× base + tip (worst case)

0.0008715 ETH

871500 Gwei

Calculation breakdown

Actual fee = (20 + 1.5) Gwei × 21,000 units

Max fee = (20 × 2 + 1.5) Gwei × 21,000 units

Base fee is burned. Priority fee goes to the validator. You pay at most the max fee.