Ethereum Gas Cost Calculator
Calculate Ethereum transaction gas costs in ETH and USD. Enter gas limit, gas price in Gwei, and ETH price to determine the exact cost of any Ethereum transaction.
Calculate potential profit from DeFi flash loan arbitrage. Enter trade revenue, flash loan fee, and gas costs to determine net flash loan profitability.
| Component | Amount | % of Revenue | % of Cost | Bar |
|---|---|---|---|---|
| Flash Loan Fee | $500.00 | 20.00% | 85.8% | |
| Gas | $80.00 | 3.20% | 13.7% | |
| Slippage | $2.50 | 0.10% | 0.4% | |
| Total Cost | $582.50 | 23.30% | 100% | |
| Net Profit | $1,917.50 | 76.7% |
| Protocol | Fee Rate | Fee Amount | Net Profit | Viable? |
|---|---|---|---|---|
| Aave V3 | 0.05% | $500.00 | $1,917.50 | Yes |
| Aave V2 | 0.09% | $900.00 | $1,517.50 | Yes |
| dYdX | 0% | $0.00 | $2,417.50 | Yes |
| Uniswap V3 (flash swap) | 0.3% | $3,000.00 | -$582.50 | No |
| Balancer | 0% | $0.00 | $2,417.50 | Yes |
| MakerDAO | 0% | $0.00 | $2,417.50 | Yes |
| Network | Est. Gas | Net Profit | Gas % of Revenue |
|---|---|---|---|
| Ethereum Mainnet | $80.00 | $1,917.50 | 3.200% |
| Arbitrum | $0.50 | $1,997.00 | 0.020% |
| Optimism | $0.30 | $1,997.20 | 0.012% |
| Polygon | $0.05 | $1,997.45 | 0.002% |
| Base | $0.20 | $1,997.30 | 0.008% |
| BSC | $0.15 | $1,997.35 | 0.006% |
Flash loans let you borrow millions in crypto with zero collateral โ as long as you repay within the same transaction. They're used for arbitrage, liquidation, and collateral swaps. The key question: does your trade revenue exceed the flash loan fee plus gas costs?
This Flash Loan Profit Calculator determines the net profit of a flash loan operation. Enter the loan amount, fee percentage, expected revenue, and gas cost to see if the opportunity is profitable.
Flash loan profitability depends on finding price discrepancies large enough to cover fees. This calculator helps you evaluate opportunities before committing to complex smart contract development.
Use the result to map token-release or fee scenarios and revisit the model when market conditions, unlock terms, or portfolio assumptions change.
Flash loan opportunities are time-sensitive and thin-margin. This calculator shows whether an opportunity covers fees and gas before you risk execution. No wallet connection or sign-up is needed, and you can re-run calculations as often as market prices and network conditions change.
Flash Loan Fee = Loan Amount ร Fee%. Net Profit = Gross Revenue โ Flash Loan Fee โ Gas Cost. ROI = Net Profit / Gas Cost ร 100%.Result: $1,550 net profit
Flash loan fee = $1,000,000 ร 0.0009 = $900. Net profit = $2,500 โ $900 โ $50 = $1,550. ROI on gas = $1,550 / $50 = 3,100%. Profitable โ the arbitrage spread exceeds the flash loan fee and gas.
The beauty of flash loans is zero capital risk โ your only cost on failure is gas. On success, you keep the profit minus the protocol fee. This asymmetric risk/reward makes flash loans the purest form of risk-free arbitrage in DeFi.
Most flash loan arbitrage opportunities are captured by MEV bots that monitor the mempool and backrun transactions. Retail flash loan users compete against sophisticated bots with custom infrastructure. Unique strategies or cross-chain opportunities offer better chances.
Flash loans gained notoriety from oracle manipulation attacks. Legitimate uses โ arbitrage, liquidation, collateral swaps โ strengthen market efficiency. The technology is neutral; intent determines the ethics.
Last updated:
You borrow tokens at the start of a transaction, use them for any operation (arbitrage, liquidation, collateral swap), and repay the loan plus fee in the same transaction. If you can't repay, the entire transaction reverts as if it never happened.
The transaction reverts entirely. You only lose the gas fee for the failed transaction. No borrowed funds are at risk because the loan is atomic โ it either completes fully or not at all.
Arbitrage between DEXes, liquidating under-collateralized positions, collateral swaps (changing your lending collateral without repaying first), and self-liquidation to avoid penalties. Consult a professional for advice tailored to your specific situation.
Yes โ flash loans require writing smart contracts that execute the borrow, trade, and repay in one transaction. Tools like Furucombo offer no-code flash loan builders, but custom strategies need Solidity development.
Up to the total available liquidity in the lending pool. On Aave, this can be hundreds of millions of dollars for popular tokens. The loan size is limited only by pool liquidity.
Flash loans themselves are legal โ they're simply smart contract interactions. However, using them to exploit protocol bugs or manipulate oracle prices may have legal consequences. Legitimate arbitrage and liquidation are standard DeFi activities.
Calculate Ethereum transaction gas costs in ETH and USD. Enter gas limit, gas price in Gwei, and ETH price to determine the exact cost of any Ethereum transaction.
Convert gas prices from Gwei to USD for any EVM chain. Enter gas price, gas units, and native token price to calculate the exact dollar cost of blockchain transactions.
Calculate your governance voting power from token holdings and lock duration. Enter tokens, lock period, and multiplier to determine your veToken vote weight in DeFi DAOs.