Formula
out = y·Δ(1 − f) / (x + Δ(1 − f)) ; constant product pool x·y = k
Worked example
With these values
- Pool reserve of the token you sell
- 1,000,000
- Pool reserve of the token you buy
- 500
- Amount you sell
- 10,000
- Pool swap fee
- 0.3 %
The calculator gives
- Amount you receive
- 4.9358
- Price impact including fee
- 1.28 %
- Effective price
- 2,026.0181
These values are only an illustration. Replace them with yours in the form above.
How "Price impact including fee" changes with "Pool reserve of the token you sell"
| Pool reserve of the token you sell | Price impact including fee |
|---|---|
| 500,000 | 2.25 % |
| 800,000 | 1.53 % |
| 1,000,000 | 1.28 % |
| 1,200,000 | 1.12 % |
| 1,500,000 | 0.96 % |
All other values stay as in the example.
When to use it
- Anticipate how much a large swap moves the price in a constant product pool.
Limits of this calculation
- Network values, rewards and fees change continuously: enter current figures from an official source.
- Smart contract bugs, lock-up periods, penalties and hardware wear are not part of the calculation.
Official and scientific sources
Questions
How is the result calculated?
The calculator applies this rule: out = y·Δ(1 − f) / (x + Δ(1 − f)) ; constant product pool x·y = k
Is it free?
Yes. It is free, needs no account, and works on phone and desktop.
Are my numbers stored?
Everything runs in your browser. Nothing you type is sent to a server.