Layer 2 Gas Savings Calculator
Compare Layer 1 vs Layer 2 transaction costs and calculate gas savings from rollup deployment.
About this calculator
This calculator quantifies the two-part cost structure that makes Layer 2 rollups cheaper than Ethereum mainnet. L1 cost is straightforward — the gas your operation consumes times the current base fee, converted to USD. L2 cost is built from two components: a cheap execution fee (your operation's gas times the much lower L2 gas price) plus a fixed L1 data-posting cost, modeled here as a flat 16 bytes of compressed calldata at 16 gas per byte, since that's the per-transaction footprint a rollup leaves on L1 regardless of how complex the L2-side logic is. That data-posting cost is why L2 savings scale with L1 base fee but never quite hit 100% — there's always some L1 footprint to pay for, which is also why the calculator reports both a percentage savings and a "cost reduction factor" (how many times cheaper, e.g.
100x) since the two framings tell different stories at extreme savings ratios. Multiplying per-transaction savings by your monthly transaction count projects the aggregate monthly and annual dollar savings, which is the number that actually matters for a business case around migrating volume to L2. The biggest input sensitivity is L1 gas per transaction: a simple ERC-20 transfer (~65k gas) shows far smaller absolute savings than a complex DeFi swap (~150k+ gas), even though the percentage savings can look similar — so pull the gas-used figure for your actual operation from a block explorer rather than relying on the generic default.
Inputs
Results
Savings per Tx ($)
$13.47
Savings (%)
99.8
How to Use This Calculator
- Enter L1 Gas per Tx for your operation — Uniswap swap ≈ 150,000; NFT mint ≈ 100,000; ERC-20 transfer ≈ 65,000.
- Set the L1 Base Fee in Gwei from etherscan.io/gastracker and the L2 Execution Fee in Gwei (Optimism/Arbitrum typically 0.001–0.1 Gwei).
- Enter current ETH Price ($) for USD conversions.
- Set Monthly Transactions to see aggregate savings at scale.
- Compare L1 Cost vs. L2 Cost per Tx, Savings per Tx, and Annual Savings to build the business case for L2 migration.
How the result changes with L1 Gas per Tx
| L1 Gas per Tx | Savings per Tx ($) | Savings (%) |
|---|---|---|
| 75,000 | $6.72 | 99.6 |
| 112,500 | $10.10 | 99.7 |
| 225,000 | $20.22 | 99.9 |
| 375,000 | $33.72 | 99.9 |
What each input means
- L1 Gas per Tx
- Gas units consumed by the transaction on L1. Uniswap swap ~ 150k, NFT mint ~ 100k.
- L1 Base Fee (Gwei)
- Current Ethereum mainnet base fee in Gwei.
- L2 Execution Fee (Gwei)
- L2 execution gas price in Gwei. Optimism/Arbitrum typically 0.001-0.1 Gwei.
- ETH Price ($)
- Current ETH price in USD.
- Monthly Transactions
- Number of transactions per month to calculate aggregate savings.
What each result means
- L1 Cost per Tx ($)
- Cost of executing this transaction on Ethereum mainnet.
- L2 Cost per Tx ($)
- Cost on L2 including execution fee and L1 data posting.
- Savings per Tx ($)
- Dollar savings per transaction by using L2.
- Savings (%)
- Percentage cost reduction compared to L1.
- Cost Reduction Factor
- How many times cheaper L2 is (e.g., 100x means L2 is 100 times cheaper).
- Monthly Savings ($)
- Total monthly savings across all transactions.
- Annual Savings ($)
- Projected yearly savings from L2 migration.
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersL1 Gas per Tx = 150000, L1 Base Fee (Gwei) = 30, L2 Execution Fee (Gwei) = 0.01, ETH Price ($) = 3000 = 5 input(s) provided
- Calculate Savings per TxSavings per Tx = l1CostUsd - l2CostUsd13.47 = $13.47
- Calculate Savings99.8 = 99.8
- Calculate L1 Cost per TxL1 Cost per Tx = l1CostEth * ethPrice13.5 = $13.5
- Calculate L2 Cost per TxL2 Cost per Tx = l2TotalCostEth * ethPrice0.0275 = $0.028
Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Why does L2 Cost per Tx include an L1 fee if the transaction happens on L2?
Rollups still have to post proof of every transaction back to L1 to inherit Ethereum's security, and that data-posting step costs gas on L1. The calculator models this as a flat 16 bytes of compressed calldata at 16 gas per byte, added to the much cheaper L2 execution fee — so L2 cost is never purely an L2-side number, it always carries this L1 footprint.
What's the difference between Savings (%) and Cost Reduction Factor?
Savings (%) is (L1 cost minus L2 cost) divided by L1 cost, expressed as a percentage — it caps out near 100% and compresses differences at high savings ratios. Cost Reduction Factor is simply L1 cost divided by L2 cost, expressed as a multiple like "100x cheaper," which better distinguishes between, say, 50x and 200x savings that would both round to roughly 99% and 99.5% in the percentage framing.
Why is the L1 data-posting cost fixed at 16 bytes regardless of transaction complexity?
The calculator models the calldata a rollup posts to L1 as a constant per-transaction footprint, since that's the compressed proof data left on L1 independent of how much computation happened on the L2 side. It's a simplification — real calldata size can vary by rollup implementation and transaction type — but it captures why L2 savings scale with L1 base fee yet never reach 100%: there's always some L1 data cost to cover.
Which input changes the result the most?
L1 Gas per Tx has the largest effect on absolute dollar savings, since it's the multiplier behind the entire L1 cost calculation. A simple ERC-20 transfer (~65,000 gas) shows far smaller absolute savings than a complex DeFi swap (~150,000+ gas) even when the percentage savings look similar, so pulling the actual gas-used figure for your operation from a block explorer matters more than any other input here.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Gas Estimation Calculator
Estimate Ethereum transaction gas costs in ETH and USD from gas used, base fee, priority fee, and current ETH price.
Blockchain DevBlockchain Throughput Calculator
Calculate transactions per second (TPS), daily capacity, and data throughput from block size, transaction size, and block time.
Blockchain DevToken Standard Comparison Calculator
Model tokenomics including supply allocation, FDV, initial market cap, vesting schedules, and sell pressure analysis.
More in Technology & Computing.