# 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 )
```
