How to Estimate Gas Costs

Gas cost estimation is multiplication: gas units times gas price. This post explains what each number represents, how EIP-1559 changed the fee structure, and how to read the estimate your wallet shows before you confirm.
Lewis Jackson
CEO and Founder

Gas estimation sounds more complicated than it is. The number your wallet shows you before you confirm a transaction is the product of two separate quantities — once you understand what each one represents, the estimate becomes legible rather than mysterious.

Most confusion comes from treating "gas" as a single number. It isn't. Gas units measure the computational work required by an operation: how much processing the network has to perform. Gas price is what you pay per unit of that work, denominated in gwei (one gwei is one billionth of ETH). Multiply units by price and you have your total cost.

The reason the distinction matters: you control one of these numbers but not the other.

How Gas Units Are Set

Gas units aren't negotiable. They're determined by the type of operation, at the protocol level, because every instruction the Ethereum Virtual Machine executes has a fixed cost assigned to it.

Some common benchmarks:

  • A simple ETH transfer uses exactly 21,000 gas units. Every time.
  • An ERC-20 token transfer uses roughly 45,000–65,000 gas units, depending on the token's contract.
  • A Uniswap swap runs about 100,000–200,000 gas units.
  • Complex DeFi interactions — multi-hop routes, lending, collateral management — can run 300,000–500,000 gas units or more.

A token transfer costs more than an ETH transfer because it executes smart contract code rather than just updating a balance. The gap between a simple transfer and a complex DeFi transaction is entirely real, not arbitrary.

What you can set is the gas limit — the maximum units you authorize the transaction to consume. Your wallet typically sets this automatically with a small buffer above the estimated requirement. If the operation finishes early, unused gas is refunded. If it runs out mid-execution, the transaction fails and you lose whatever was consumed up to that point — the network still did work, and that work still costs something.

How Gas Price Works After EIP-1559

Since Ethereum's London upgrade in August 2021, gas price has two components.

Base fee: Set algorithmically by the network based on how full the previous block was. When blocks are consistently more than 50% full, the base fee rises. Below 50%, it falls. Users can't control this. It's also burned — it doesn't go to validators.

Priority fee (tip): An optional addition that goes to the validator who includes your transaction. Higher tips improve your chances of getting into the next block; lower tips mean you might wait a few extra blocks during busy periods.

Your wallet will show a suggested gas price that incorporates the current base fee plus a recommended tip. Most wallets offer speed tiers (slow/standard/fast) that correspond to different tip levels. During quiet network periods, the differences are negligible. During congestion, a higher tip matters.

The Calculation

Total cost = gas units × (base fee + priority fee)

The result is in ETH. Your wallet converts to your local currency using the current price.

Two examples at a base fee of 20 gwei and a 1 gwei priority fee:

Simple ETH transfer:
21,000 × 21 gwei = 441,000 gwei = 0.000441 ETH ≈ $1.54 at $3,500 ETH

Uniswap swap (150,000 gas):
150,000 × 21 gwei = 3,150,000 gwei = 0.00315 ETH ≈ $11.03 at $3,500 ETH

This is why gas costs feel disproportionate for small trades — the fee doesn't scale with transaction size. A $20 token swap and a $20,000 token swap consume the same gas units and pay the same fee. The only variable is the network's current base fee and your chosen tip.

Reading the Estimate in Your Wallet

Before you confirm, your wallet shows a cost estimate. It's a reasonable approximation, not a guarantee — the base fee updates every block (roughly every 12 seconds), so the actual cost can differ slightly from what was shown when you opened the transaction screen.

For most routine operations, this is fine. For larger transactions or during unusually high congestion, it's worth checking Etherscan's gas tracker, which shows the current base fee in real time. Historical charts are also available and reveal predictable patterns — mainnet gas is typically cheaper on weekends and during Asian and North American overnight hours when transaction demand drops.

Where Constraints Live

The base fee is the binding constraint. It reflects real-time network demand and can't be influenced by individual users. You can reduce your priority tip to near-zero during quiet periods without consequence, but you can't undercut the base fee. And you can't reduce the gas units a specific operation type requires — those are set at the protocol level.

The gas limit is the lever you technically have. Setting it too low causes transaction failures; setting it too high costs you nothing extra (unused gas is refunded). Wallets handle this automatically in most cases.

What's Changing

Ethereum's EIP-4844 (implemented March 2024) introduced blob data storage, which dramatically reduced the cost of Layer 2 networks posting transaction data to Ethereum mainnet. The practical result: fees on Arbitrum, Optimism, Base, and similar rollups dropped 80–90% in typical scenarios. For users running frequent transactions, migrating to an L2 is currently the most effective way to reduce gas costs — the operations are identical, the fees are a fraction.

Account abstraction (ERC-4337) is introducing another pattern: "paymasters" that sponsor gas on behalf of users, or that accept payment in tokens other than ETH. Adoption is still early, but the direction is toward consumer applications where gas becomes invisible to end users.

What would confirm this direction: Continued migration of activity to L2s; further blob capacity increases reducing L2 costs further; paymaster integration in mainstream wallets.

What would invalidate it: Sustained reversal of L2 adoption back to mainnet; mechanism changes that make base fee behavior less predictable.

Timing Perspective

Now: The gas estimate your wallet shows is accurate enough for routine transactions. For larger operations or unusual network conditions, cross-check against Etherscan's gas tracker before confirming.

Next: If you're running frequent transactions, assess whether the chain you're using has adopted EIP-4844 optimizations — the cost difference is substantial.

Later: Account abstraction and paymasters may eventually abstract gas estimation entirely in consumer-facing apps. When that happens, understanding the mechanism will matter less for end users — but understanding what's happening underneath remains useful.

Boundary Statement

This covers gas estimation mechanics on Ethereum and EVM-compatible networks. It doesn't address Solana's fee model (which operates differently), non-EVM chains, or the tax treatment of gas fees (which varies by jurisdiction). The formula above is accurate at the protocol level; wallet interfaces add convenience layers on top of it.

Related Posts

See All
Crypto Research
New XRP-Focused Research Defining the “Velocity Threshold” for Global Settlement and Liquidity
A lot of people looking at my recent research have asked the same question: “Surely Ripple already understands all of this. So what does that mean for XRP?” That question is completely valid — and it turns out it’s the right question to ask. This research breaks down why XRP is unlikely to be the internal settlement asset of CBDC shared ledgers or unified bank platforms, and why that doesn’t mean XRP is irrelevant. Instead, it explains where XRP realistically fits in the system banks are actually building: at the seams, where different rulebooks, platforms, and networks still need to connect. Using liquidity math, system design, and real-world settlement mechanics, this piece explains: why most value settles inside venues, not through bridges why XRP’s role is narrower but more precise than most narratives suggest how velocity (refresh interval) determines whether XRP creates scarcity or just throughput and why Ripple’s strategy makes more sense once you stop assuming XRP must be “the core of everything” This isn’t a bullish or bearish take — it’s a structural one. If you want to understand XRP beyond hype and price targets, this is the question you need to grapple with.
Read Now
Crypto Research
The Jackson Liquidity Framework - Announcement
Lewis Jackson Ventures announces the release of the Jackson Liquidity Framework — the first quantitative, regulator-aligned model for liquidity sizing in AMM-based settlement systems, CBDC corridors, and tokenised financial infrastructures. Developed using advanced stochastic simulations and grounded in Basel III and PFMI principles, the framework provides a missing methodology for determining how much liquidity prefunded AMM pools actually require under real-world flow conditions.
Read Now
Crypto Research
Banks, Stablecoins, and Tokenized Assets
In Episode 011 of The Macro, crypto analyst Lewis Jackson unpacks a pivotal week in global finance — one marked by record growth in tokenized assets, expanding stablecoin adoption across emerging markets, and major institutions deepening their blockchain commitments. This research brief summarises Jackson’s key findings, from tokenized deposits to institutional RWA chains and AI-driven compliance, and explains how these developments signal a maturing, multi-rail settlement architecture spanning Ethereum, XRPL, stablecoin networks, and new interoperability layers.Taken together, this episode marks a structural shift toward programmable finance, instant settlement, and tokenized real-world assets at global scale.
Read Now

Related Posts

See All
No items found.
Lewsletter

Weekly notes on what I’m seeing

A personal letter I send straight to your inbox —reflections on crypto, wealth, time and life.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.