Estimate transaction costs for common blockchain operations
Gas is the unit of computational effort required to execute operations on the Ethereum blockchain. Every transaction and smart contract execution requires gas, which you pay for in ETH.
When you send a transaction, you specify two key parameters:
The total transaction fee is calculated as:
Transaction Fee = Gas Used × Gas Price
The gas limit is the maximum amount you're willing to spend, but you only pay for what's actually used. If your transaction uses less gas than the limit, the excess is refunded.
You set a gas limit of 50,000 at 30 Gwei:
| Operation | Typical Gas | Description |
|---|---|---|
| ETH Transfer | 21,000 | Simple transfer between wallets |
| ERC-20 Transfer | 65,000 | Transfer tokens |
| ERC-20 Approve | 45,000 | Approve spending allowance |
| Uniswap Swap | 150,000-180,000 | Swap tokens on DEX |
| NFT Mint | 100,000 | Mint a new NFT |
| NFT Transfer | 85,000 | Transfer NFT ownership |
| Contract Deploy | 300,000+ | Deploy smart contract |
Since August 2021, Ethereum uses EIP-1559, which changed how gas fees work:
The minimum fee required to include a transaction, burned (removed from circulation) rather than paid to miners.
Additional fee to incentivize miners to include your transaction faster. Goes directly to miners/validators.
Maximum total you're willing to pay per gas. Formula:
Total Fee = (Base Fee + Priority Fee) × Gas Used
To reduce gas costs, consider using Layer 2 networks: