AMM swap calculator
See what a swap in a constant product (x × y = k) liquidity pool pays out, the price impact, the fee and the pool's new price. Works for any pool where you know the two balances. Free, no sign-up, nothing leaves your browser.
The pool sizes are only an example, not a live pool. This covers simple constant product pools; other designs price swaps differently, and network fees are not included.
How a constant product pool prices a swap
A simple automated market maker holds two tokens and keeps the product of their balances fixed. If a pool holds x of token A and y of token B, then x × y stays the same after every trade. Swapping in some A leaves the pool with more A and less B, so B gets more expensive for the next trader.
Price impact and fees
The more you swap compared with the pool's size, the further the pool's price moves against you, which is called price impact. It is why large swaps in small pools get a much worse price than the quoted one. On top of that, the pool charges a fee, often 0.3%, which is kept in the pool for the people who supplied the tokens.
Run your own crypto app
SendPay platforms let customers buy, sell and hold crypto, held with regulated partners, alongside GBP, EUR and USD accounts, powered by licensed partners. SendPay doesn't offer trading tools, DeFi or lending.