Skip to main content
Calcimator

Flash Loan Calculator

Size a flash loan arbitrage opportunity by calculating net profit after protocol fees, DEX fees, gas costs, and slippage. Determine break-even spreads and daily/monthly profit projections.

About this calculator

The Flash Loan Calculator sizes a DeFi arbitrage trade by working through every cost layer a flash loan actually incurs, not just the headline price difference between two venues. A flash loan lets you borrow the Flash Loan Amount with no collateral, provided it's repaid — plus a protocol fee — within the same blockchain transaction, so Required Capital is only the Gas Cost, since the borrowed principal itself never has to come from your own funds. Gross Profit is simply what buying at Buy Price and selling at Sell Price nets before costs; Net Profit subtracts four separate cost layers from that figure: the Flash Loan Fee charged by the lending protocol, DEX (decentralized exchange) trading fees paid on both the buy and sell swap, Slippage — the gap between an expected execution price and what a trade actually fills at when moving size through a liquidity pool — and Gas Cost, the fixed blockchain transaction fee regardless of trade size.

Because gas cost and fees don't shrink proportionally with a small price spread, Break-Even Spread % reports the minimum price gap needed to clear all four cost layers combined, which is the number that actually determines whether a given arbitrage opportunity is worth executing. Daily and Monthly Profit simply multiply Net Profit per Execution by how often the opportunity is expected to recur, which is inherently speculative — real arbitrage opportunities close as other bots compete for the same spread, so Executions per Day is an assumption, not a guarantee.

Inputs

%
%
%

Results

Net profit per execution ($)

$352.50

Profitable?Yes
Gross profit ($)$1,500.00
Total costs ($)$1,147.50
Flash loan fee ($)$90.00
DEX fees ($)$604.50
Slippage cost ($)$403.00
Break-even spread (%)1.15%
Daily profit ($)$1,762.50
Monthly profit ($)$52,875.00
ROI on gas capital (%)705%
How to Use This Calculator
  1. Enter the Flash Loan Amount ($) — the size of the uncollateralized loan from a protocol like Aave.
  2. Set the Flash Loan Fee % (Aave = 0.09%) and the Buy Price and Sell Price on the two venues you are arbitraging.
  3. Enter DEX Swap Fee % (Uniswap V3 pools are 0.05%, 0.3%, or 1%) and expected Slippage %.
  4. Set Gas Cost ($) for the entire flash loan transaction and Executions per Day to project daily income.
  5. Review Net Profit per Execution, Break-Even Spread %, and Daily/Monthly Profit — a negative net profit means the trade is not viable at current prices.

How the result changes with Buy price ($)

Buy price ($)Net profit per execution ($)
500$101,345.00
750$34,016.67
1,500-$33,311.67
2,500-$60,243.00

What each input means

Flash loan amount ($)
Amount borrowed via flash loan (repaid in same transaction).
Flash loan fee (%)
Protocol fee for the flash loan (Aave = 0.09%, dYdX = 0%).
Buy price ($)
Token price on the cheaper venue (where you buy).
Sell price ($)
Token price on the more expensive venue (where you sell).
DEX swap fee (%)
Trading fee per swap (Uniswap V3 typical: 0.05%-1%).
Slippage (%)
Expected slippage on each swap based on liquidity depth.
Gas cost ($)
Total gas cost for the flash loan transaction in USD.
Executions per day
Expected number of profitable executions per day.

What each result means

Net profit per execution ($)
Profit after all fees, slippage, and gas. Must be positive to be viable.
Profitable?
Whether the trade is profitable after all costs.
Gross profit ($)
Profit from the price difference before any costs.
Total costs ($)
Sum of flash loan fee, DEX fees, slippage, and gas.
Flash loan fee ($)
Fee paid to the flash loan protocol.
DEX fees ($)
Trading fees across buy and sell swaps.
Slippage cost ($)
Estimated cost of price slippage on both trades.
Break-even spread (%)
Minimum price spread needed to cover all costs.
Daily profit ($)
Projected daily profit if executed at target frequency.
Monthly profit ($)
Projected monthly profit (30 days).
ROI on gas capital (%)
Return relative to the only capital at risk (gas cost).

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    8 parameters
    Flash loan amount ($) = 100000, Flash loan fee (%) = 0.09, Buy price ($) = 1000, Sell price ($) = 1015, DEX swap fee (%) = 0.3, Slippage (%) = 0.2, Gas cost ($) = 50, Executions per day = 5 = 8 input(s) provided
  2. Calculate Net profit per execution
    Net profit per execution = grossProfit - totalCosts
    352.5 = $352.5
  3. Calculate Profitable?
    Yes = Yes
  4. Calculate Gross profit
    Gross profit = sellGross - loanAmount
    1500 = $1,500

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 is Required Capital only the gas cost, not the full loan amount?

A flash loan is uncollateralized specifically because the entire borrow-trade-repay sequence happens atomically within one blockchain transaction — if the loan can't be repaid (plus its fee) by the end of that transaction, the whole transaction reverts as if it never happened. That means the borrowed principal is never actually at risk from the trader's own funds; only the gas cost paid to attempt the transaction is real capital at stake.

What does Break-Even Spread % actually measure?

It's the minimum percentage price difference between the buy and sell venues needed to cover every cost in the trade — the flash loan fee, both legs of DEX trading fees, slippage on both trades, and gas — expressed as a percentage of the loan amount. If the actual spread between Buy Price and Sell Price is smaller than this figure, the trade loses money even though there's technically a price difference to exploit.

Why do I need to account for slippage on both the buy and sell trades?

Slippage is the difference between a quoted price and the price a trade actually executes at once it moves through a liquidity pool of finite depth, and it affects both legs of an arbitrage trade independently — buying pushes the price up on the cheap venue, and selling pushes it down on the expensive venue, both working against the trader. This calculator applies the slippage percentage to both the buy-side loan amount and the sell-side proceeds separately, rather than just once.

How reliable is the daily and monthly profit projection?

It's a direct multiplication of Net Profit per Execution by Executions per Day (and then by 30 for the monthly figure), which assumes the same profitable spread recurs at that frequency indefinitely — a strong assumption, since real arbitrage spreads close quickly as competing bots and traders act on the same opportunity. Treat these projections as an upper-bound scenario rather than a reliable income forecast.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Investing & Retirement.