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.

Inputs

%
%
%

Results

Net profit per execution ($)

$352.50

≈ 6 tanks of gas

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 ($)
10,000,000-$100,629.90
35,000,000-$100,637.11
65,000,000-$100,638.45
90,000,000-$100,638.88

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
    4 parameters
    Flash loan amount ($) = 100000, Flash loan fee (%) = 0.09, Buy price ($) = 1000, Sell price ($) = 1015 = 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.

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

More in Investing & Retirement.