> For the complete documentation index, see [llms.txt](https://cetus-1.gitbook.io/cetus-developer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cetus-1.gitbook.io/cetus-developer-docs/developer/via-sdk/features-available/price-impact.md).

# Price impact

## How to calculate price impact?

Price impact means the variation rate between the prices of the two coins in actual transactions and the pre-calculated prices.&#x20;

The SDK providers the `sdk.Swap.calculateSwapPriceImpact` method to calculated it.

#### Example

```ts
    const res = await sdk.RouterV2.getBestRouter(USDT, USDC, 100000000, true, 5, '', undefined, true, false)

    const priceImpact =  sdk.Swap.calculateSwapPriceImpact(res.result.splitPaths)
    console.log('priceImpact: ', priceImpact )
```
