Workspace / Research tools
Liquidity pools

AMM Price Impact Calculator

Price impact can be quoted in different directions, so this calculator uses input tokens per output token throughout. It compares the average price paid for a hypothetical constant-product swap with the initial reserve price x divided by y. The comparison includes the user-entered swap fee as well as curve movement. Enter reserve quantities, trade size, and fee in your browser to inspect a reproducible scenario. The result is a local calculation and does not provide a live execution quote, slippage setting, or prediction of transaction ordering.

Enable JavaScript to edit assumptions, calculate and compare a baseline locally. The formula and methodology below remain available without JavaScript.

Define the average-price comparison

Effective input is dx × (1 − f), and output is dy = y × effective input ÷ (x + effective input). Average price paid is dx ÷ dy in input tokens per output token. Starting price is x ÷ y. Impact is (average price ÷ starting price − 1) × 100. Because average price uses full input, the reported impact includes the fee; it is not a fee-free curve-only measure.

Calculate a hypothetical trade

With reserves of 100 and 20,000, input of 1, and a 0.30% fee, output is approximately 197.4316. Starting price is 0.005 input tokens per output token; average price is about 0.00506505. Reported impact is therefore about 1.301%. Post-trade reserves are 101 and 19,802.5684. Their ratio is a new marginal reserve price, which differs from the average price across the whole trade.

Avoid reciprocal and fee confusion

Reversing token direction requires reversing reserves and redefining which token is input. A percentage computed from output per input will differ from one computed from its reciprocal. The post-trade input reserve includes the full input amount, not only the fee-adjusted amount. Gas and other external fees are excluded. At zero input, output is zero and average execution price is undefined; a tiny positive trade still carries the modeled fee contribution.

Your research workspace

Save selected inputs and research notes explicitly in this browser. Compare assumptions and restore a saved setup without submitting a trade. JavaScript enables the controls.

Find a tool or research page