A curved gold slide running down through the clouds at night with a gold coin rolling along it (AI-generated image)
AIAI-generated image

Crypto slippage calculator: price impact and slippage tolerance

Set an order size and a pool depth to see what a trade costs before fees. Below the calculator: the math behind it, how slippage tolerance protects a swap, and why a loose setting invites sandwich attacks.

Omega.one editorsEdition: October 29, 202610 min read6 sources

Inputs

Average price vs spot
+2.50%
Tokens short of spot
2.44%
Pool side used
$10,000,000

Price impact

2.44%

Cost of impact $6,098

Constant-product model (x · y = k). Illustrative, not a quote: fees, gas and other traders are left out.

In 30 seconds

Slippage tolerance is the largest gap between the quoted and the executed result that a trader accepts before a swap is canceled. Crypto slippage itself is that gap, and price impact is the part of it caused by the trade's own size. The calculator above estimates price impact from order size and pool depth.

Crypto slippage and price impact are not the same thing

Two numbers get mixed up on swap screens. Price impact is the move a trade causes by consuming liquidity: the larger the order relative to the depth available, the worse the average price. It can be estimated in advance, because the pool's reserves or the order book are visible when the quote is made.

Slippage is the difference between the result expected when the order was sent and the result actually received. It includes price impact, but also whatever changes between quote and execution: other trades landing first, a block produced a few seconds later, a market maker pulling quotes. On a centralized exchange this window lasts milliseconds. On a blockchain, a swap waits in public view until it is included in a block, which gives the market time to move and other traders time to react.

So a $1,000 swap in a deep pool can show negligible price impact and still slip if the market moves fast, and a $250,000 swap in a shallow pool can show large price impact even if nothing else changes. Crypto slippage can also be positive: if the price moves in the trader's favor before execution, the fill is better than quoted. Whether the trader keeps all of that improvement depends on the interface and its fee terms.

Price impact in a constant-product pool

In a constant-product pool, the two reserves x and y must keep their product constant as trades occur (before fees). When a trader pays an amount Δx of token X into the pool, the pool pays out the amount of Y that keeps the product unchanged: out = y · Δx / (x + Δx). At the pre-trade spot price, the same Δx would have bought y · Δx / x. Comparing the two, the trader receives a fraction x / (x + Δx) of the spot amount, so the shortfall, which the calculator reports as price impact, is Δx / (x + Δx).

In plain words, impact depends only on how large the order is compared with the reserve it is paid into. While the order is small, doubling it roughly doubles the impact; as it grows toward the size of the reserve, the loss climbs more slowly than the order but never stops climbing. Doubling the pool roughly halves it.

The two pools in the picture hold the same tokens. A coin dropped into the shallow one throws up a big splash; the same coin barely disturbs the deep one. That is the idea behind the depth input in the calculator: total value locked, split 50/50 between the two sides, is the size of the pool the order lands in.

Two gold bowls on the clouds, a coin landing in each, one splash small and one large (AI-generated image)
AIAI-generated image

The calculator's pool mode, worked through

Take a pool with $20 million of total value locked, so x = $10 million sits on the stablecoin side. Suppose the token is worth $100 at spot, so the pool holds 100,000 tokens. A trader buys with Δx = $250,000.

  1. Tokens out: 100,000 × 250,000 / (10,000,000 + 250,000) = about 2,439.02.
  2. At spot, $250,000 would buy 2,500 tokens, so the trade receives about 60.98 fewer.
  3. Price impact: 250,000 / 10,250,000 = about 2.44%, the shortfall in tokens received versus spot.
  4. Average price paid: spot × (x + Δx) / x = $100 × 1.025 = $102.50, which is 2.5% above spot.
  5. Cost of impact: Δx² / (x + Δx) = 250,000² / 10,250,000 = about $6,098, the dollar value of the tokens not received.

The 2.44% and the 2.5% describe the same trade from different sides: about 2.44% fewer tokens for the money, or 2.5% more paid per token. The calculator labels the first as price impact and shows the average fill against spot alongside it. After the trade the pool holds $10,250,000 and about 97,561 tokens, so the next buyer faces a spot price near $105.06. The pool price has moved about 5.1%, roughly twice the average premium, because the fill took place along a price that climbed from $100 to $105.06.

Order book mode: walking the book

On a centralized exchange there is no curve to read. A buy order fills against the lowest ask, then the next, until its size is used up, and the price impact is the distance between the best ask and the average fill. The calculator's order book mode walks a hypothetical book in exactly this way.

In the illustrative book below, the best bid is $99.90 and the best ask $100.00. An order to buy 10 units takes all 3 units at $100.00, all 4 at $100.10, and 3 of the 5 at $100.25. It costs $1,001.15, an average of $100.115: about 0.12% above the best ask and about 0.17% above the $99.95 midpoint. The midpoint is the fairer benchmark, because it includes the half-spread a taker always pays. The guide to crypto liquidity uses the same book for a 20-unit order that reaches the fourth level.

Illustrative order book walk: buying 10 units (hypothetical numbers)
Ask levelPriceSize offeredUnits filledCost
1$100.0033$300.00
2$100.1044$400.40
3$100.2553$300.75
4$100.5080$0.00
TotalAverage $100.11520 on four levels10$1,001.15

Slippage tolerance and the minimum received

A DEX swap is not executed when the trader clicks. It is signed, broadcast and included in a block some seconds later, and the pool may have changed by then. Slippage tolerance caps how much worse the result may be. The interface takes the quoted output, applies the tolerance and writes a minimum amount into the transaction. If the pool would pay less than that minimum at execution, the swap reverts and only the network fee is spent.

Using the worked example, the quote is about 2,439.02 tokens. With a 0.5% tolerance the minimum received is about 2,426.83; with 1% it is about 2,414.63; with 5% it falls to about 2,317.07. The tolerance sits on top of the price impact already in the quote. A trade with 2.44% impact and a 1% tolerance can end up roughly 3.4% short of the spot amount in the worst case that still executes.

Setting the tolerance is a trade-off. Too tight, and ordinary movement makes swaps fail, which matters most for volatile tokens and for tokens that charge a fee on transfer. Too loose, and the transaction gives away a margin that other actors can take.

From swap quote to settled trade

  1. QuoteThe interface reads pool reserves and estimates the output.
  2. Set toleranceA minimum received amount is written into the transaction.
  3. BroadcastThe signed swap waits in the public mempool.
  4. Block inclusionOther trades may land first and move the pool.
  5. Check minimumIf output falls below the minimum, the swap reverts.
  6. SettleTokens arrive in the wallet at the actual fill.
A simplified AMM swap, showing where crypto slippage can enter.

Sandwich attacks, MEV and a loose tolerance

While a swap waits to be included, anyone watching the public mempool can see it, including bots that look for profitable reordering. Value extracted by choosing which transactions go into a block, and in what order, is called maximal extractable value, or MEV.

A sandwich attack is the textbook case. A bot sees a large buy with a loose slippage tolerance and buys the same token just before it, pushing the pool price up. The victim's swap then executes at the worse price, still inside its tolerance. The bot sells right after, into the price the victim's trade has raised, and its profit comes out of the victim's fill. The tolerance is the ceiling on what can be taken: a 5% setting tells the market that up to 5% can be extracted without the swap reverting.

The value drains in the narrow gap between the quote and the block. Defenses include tighter tolerances, smaller orders, private transaction relays that keep swaps out of the public mempool until inclusion, and aggregators or intent-based systems that settle orders in batches or through solvers. None removes the risk entirely, and each comes with its own trust assumptions.

Gold dust pouring through the neck of a tall hourglass above the clouds (AI-generated image)
AIAI-generated image

How to reduce crypto slippage

Slippage cannot be removed, but its size responds to a few levers, each with a cost.

  • Smaller clips. Splitting one large order into several smaller ones lowers the impact of each, as long as the pool or book refills between them. On-chain, every clip pays its own network fee, and the market can move between clips.
  • Limit orders. A limit order on an order-book venue, or a signed limit order through an aggregator, fixes the worst price at the cost of possibly not filling.
  • Deeper venues. The same order is smaller relative to a deeper pool or book, and depth for a pair varies widely between venues and chains.
  • Routing. Aggregators and a smart order router split one order across several pools or exchanges, so no single source is pushed too far.
  • Timing. Liquidity thins in quiet hours and around sharp moves, and the same order costs more then.

For institutions, these choices are part of best execution, the duty in regulated securities markets to seek the most favorable terms reasonably available, and they are measured afterwards with transaction cost analysis.

How the slippage calculator works, and its limits

The calculator above has two modes. Pool mode treats the depth input as the total value locked in a two-token constant-product pool, splits it equally so that x is half the depth, and applies out = y · Δx / (x + Δx) to the order size. It reports price impact as Δx / (x + Δx), the average price paid against spot, and the cost of impact in dollars. Order book mode walks a hypothetical book level by level and reports the average fill against the best ask and the midpoint.

Both modes are illustrative. The calculator uses no live data and knows nothing about any real pool or exchange. It excludes swap fees, network gas, transfer fees, MEV and any price movement while a transaction waits. Real pools may use concentrated liquidity, different curves for stablecoin pairs, or several hops through an aggregator, and all of these change the result. Real order books change many times a second. The venue's own quote, with current reserves and fees, is the figure that applies to an actual swap.

Short answers

Crypto slippage FAQ

What is crypto slippage?

Crypto slippage is the difference between the price a trader expects when sending an order and the price actually received. It includes price impact from the order's own size, plus any market movement between the quote and execution. On a blockchain, a swap can wait several seconds in public view before inclusion in a block, which gives prices time to move and other traders time to react.

How does slippage tolerance work on a DEX?

Slippage tolerance is a percentage that sets the minimum amount a swap must return. The interface applies it to the quoted output and writes that minimum into the transaction. If the pool would pay less at the moment of execution, the swap reverts and only the network fee is spent. A tight tolerance causes more failed swaps, while a loose one leaves more value exposed to sandwich attacks.

What does high price impact mean?

High price impact means the order is large relative to the liquidity available, so the trade itself moves the price against the trader. In a constant-product pool with $10 million on each side, a $250,000 purchase receives about 2.44% fewer tokens than it would at the pre-trade spot price, before fees. Larger orders and shallower pools magnify the effect.

Is price impact the same as slippage?

Price impact and slippage are related but not the same. Price impact is the price move caused by the trade's own size and can be estimated from pool reserves or an order book before trading. Slippage is the total gap between the expected and executed result, which includes price impact and any market movement before execution. Slippage can be positive if the market moves in the trader's favor.

What is a sandwich attack?

A sandwich attack is a form of MEV in which a bot spots a pending swap, buys the same token just before it to push the price up, lets the victim's swap execute at the worse price within its slippage tolerance, and sells immediately after. The bot's profit comes from the victim's fill, and a looser tolerance leaves more room for the attack.

How accurate is a crypto slippage calculator?

A crypto slippage calculator like the one on this page is a model, not a quote. It shows how order size and pool depth interact under a simple constant-product formula or a hypothetical order book. It excludes fees, gas, MEV and price movement while a transaction waits, and it uses no live data. The quote on the actual venue, with current reserves and fees, is the figure that applies.

Try it

Tools and games, no sign-up

All of them run in the browser and send nothing anywhere. The numbers are illustrative, never live prices.

Midpoint simulatorLit book or dark poolSend a block into an illustrative order book and compare the fill with a cross at the midpoint.Open it
Fill the blockRoute one big orderSplit a bitcoin block across four venues, send it and score the fill against the best mix.Open it
Daily puzzleTwo puzzles a dayGuess a market structure term from five clues, then sort sixteen words into four groups.Open it