logo School of Rich Programmers: 7495.org

Offline Fee Calculator

Transaction Hash: 0a50ef2510baf1d6...
Transaction Type ? Gas Limit represents the maximum work. Simple transfers are always 21,000.
Base Fee ? Current network market price. Found in Etherscan as "Base".
Priority Fee ? Your tip to the validator. Known as "Max Priority Fee" in MetaMask.
Max Fee (Ceiling) ? The absolute maximum you are willing to pay. MetaMask usually adds a safety buffer here.
Real Gas Price (Etherscan): 149.00 Gwei
MetaMask Safety Buffer: +7.3%
ETH Price ($)
0.003129 ETH
≈ $11.72

Matching with Etherscan

To verify a real transaction, look at the "More Details" section on Etherscan. The Gas Price you see there is actually the sum of the Base Fee and the Priority Fee.

Why do fees change?

Ethereum uses an auction model. When many people want to swap tokens at the same time, the Base Fee rises automatically. If you want to skip the line, you increase your Priority Fee.

Real-World Examples

Understanding gas fees is like understanding fuel for a car. You don't just pay for the distance, but also for how heavy your vehicle is and how busy the highway is at the moment.

Scenario A: Sending ETH to a friend.

This is the "lightest" transaction. It always uses exactly 21,000 gas. In the example above, if the gas price is 20 Gwei, you pay just a few cents.

Scenario B: Swapping tokens on Uniswap.

Smart contracts are complex. Swapping ETH for USDT requires many more calculations, taking up to 180,000 gas. This is why swaps are always more expensive than simple transfers.


Example 1: Simple Transfer

Transaction Hash: 0a50ef2510baf1d6...
Comparison Gas Limit: 21,000

Gas Price: 149 Gwei

Gas Fees: Base: 94.695666299 Gwei

ETH Price: $3746.14

Priority = Gas Price - Gas Fees = 149 - 94.695666299 = 54.304333701 Gwei


Result:

Txn Fee = Limit * (GasFee + Priority)

21,000 * (94.69 + 54.304333701) = 3,128,881.00772 Gwei

3,128,881.00772 / 1,000,000,000 = 0.003129 ETH

ETH Price * Txn Fee = $11.72


Example 2: Transfer to SmartContract

Transaction Hash: 9da79f450287ef34...
Comparison Gas Limit: 25,054

Gas Price: 34.032626801 Gwei

Gas Fees: Base: 33.932626801 Gwei

ETH Price: $2,013.84

Priority = Gas Price - Gas Fees = 34.032626801 - 33.932626801 = 0.1 Gwei


Result:

Txn Fee = Limit * (GasFee + Priority)

25,054 * (33.932626801 + 0.1) = 852,653.431872 Gwei

852,653.431872 / 1,000,000,000 = 0.000852653431872 ETH

ETH Price * Txn Fee = $1.72


Case Study #1: Failed Transaction

Transaction Hash: 22cdb47c2cdcb9eb...
Comparison Gas Limit: 72,212

Gas Price: 243.42641838 Gwei

Gas Fees: Base: 241.708950329 Gwei

ETH Price: $2,826.04

Priority = Gas Price - Gas Fees = 243.42641838 - 241.708950329 = 1.717468051


Result:

Txn Fee = Limit * (GasFee + Priority)

72,212 * (241.708950329 + 1.717468051) = 17,578,308.5241 Gwei

17,578,308.5241 / 1,000,000,000 = 0.0175783085241 ETH

ETH Price * Txn Fee = $49.68


Case Study #2: Token Swap

Transaction Hash: 001653f553f65aae...
Comparison Gas Limit: 252,868

Gas Price: 238.052316584 Gwei

Gas Fees: Base: 236.436350895 Gwei

ETH Price: $2,826.04

Priority = Gas Price - Gas Fees = 238.052316584 - 236.436350895 = 1.615965689


Result:

Transaction Fee = Limit * (GasFee + Priority)

252,868 * (236.436350895 + 1.615965689) = 60,195,813.19 Gwei

60,195,813.19 / 1,000,000,000 = 0.06019581319 ETH

ETH Price * Txn Fee = $170.12


Example: Old Transaction (2017)

Transaction Hash: 2cb29a12145a3d36...
Comparison Gas Limit: 21,000

Gas Price: 50 Gwei

ETH Price: $240.94


Result:

Transaction Fee = Gas Limit * Gas Price

21,000 * 50 Gwei = 1,050,000 Gwei

1,050,000 Gwei / 1,000,000,000 = 0.00105 ETH

ETH Price * Txn Fee = $0.25


Example: Old Transaction 2 (2017)

Transaction Hash: fcb26e09cfa1e38b...
Comparison Gas Limit: 21,000

Gas Price: 42 Gwei

ETH Price: $257.77


Result:

Transaction Fee = Gas Limit * Gas Price

21,000 * 42 Gwei = 882,000 Gwei

882,000 Gwei / 1,000,000,000 = 0.000882 ETH

ETH Price * Txn Fee = $0.23


Example: Old Transaction 3 (2020)

Transaction Hash: 24958e89460daf7b...
Comparison Gas Limit: 21,000

Gas Price: 51 Gwei

ETH Price: $158.12


Result:

Transaction Fee = Gas Limit * Gas Price

21,000 * 51 Gwei = 1,071,000 Gwei

1,071,000 Gwei / 1,000,000,000 = 0.001071 ETH

ETH Price * Txn Fee = $0.17


Example: Binance

Transaction Hash: eb127e1772517f29...
Comparison Gas Limit: 21,000

Gas Price: 6 Gwei

BNB Price: $247.84


Result:

Transaction Fee = Gas Limit * Gas Price

21,000 * 6 Gwei = 126,000 Gwei

126,000 Gwei / 1,000,000,000 = 0.000126 BNB

BNB Price * Txn Fee = $0.03


🦊 Learning MetaMask Logic

MetaMask uses Max Fee to protect your transaction from failing if the network suddenly gets busy. However, you only ever pay the actual market price (Base + Priority).

Why "Max Fee" is higher?

When you set up a transaction, MetaMask adds a small buffer (usually 10-20%) to the Max Fee. This ensures that if the network gets busier in the few seconds before your transaction is confirmed, it still goes through.