As follows, we will cover all the possible scenarios in case you are holding positions with the same company both outside and inside the pie.

First thing, we must calculate the total number of shares before the split. Once we have this information, we can encounter one of the following three cases:

**The total number of shares before the split is a whole number.**

The shares are split and allocated as per usual to their locations (investments or pie).

*For example:*

*You hold a position with Tesla of 1.5 quantity outside the pie and 0.5 quantity inside the pie. The split ratio is 5:1.*

*The total number of shares before the split is 2.*

*After the split, you will have 7.5 outside the pie and 2.5 inside the pie.*

**The total number of shares before the split is a fractional number and the total quantity after the split is more than 1.**

The total quantity after the split is rounded down and the remaining fraction is paid to the account.

*For example:*

*You hold a position of 1.5 quantity outside the pie and 1 quantity inside the pie. The split ratio is 3:1.*

*The total number of shares before the split is 2.5.*

*The total number of shares after the split is 7.5*

*After the split, you will have 0.5 paid to your account according to the last available price before the split /split coefficient.*

We will use the following formula to calculate how the split shares will be distributed inside and outside your pie:

* **Shares outside the pie after the split = Shares outside the pie before the split * (Total quantity after the split (rounded down) / Total quantity before the split)**

***Shares inside the pie after the split = Shares inside the pie before the split * (Total quantity after the split / Total quantity before the split)**

To clarify the matter further, below, you will see the aforementioned formulas applied to the example.

**Shares outside the pie after the split = 1.5 (shares outside the pie before the split) * ( 7 (total quantity after the split) / 2.5 (total quantity before the split)) = 4.2 *

*Tip: Once you have calculated the first one, you can simply deduct it from the total quantity after the split to have the shares inside the pie after the split.*

*7 (Total quantity before the split (rounded)) - 4.2 (After split quantity outside the pie) = 2.8 (After split quantity inside the pie).*

**Total quantity after the split is a fractional number (<1).**

Suppose the rounded down total quantity after the split equals 0. In that case, the fractions are paid to the account according to the last available price before the split / split coefficient, and the positions will be removed from the pies and your Investment section.

*For example,*

*You hold a position of 0.1 quantity outside the pie and 0.1 quantity inside the pie. The split ratio is 3:1.*

*You have 0.2 before the split and 0.6 after the split.*

*Rounding down the total quantity after the split results in 0, meaning that 0.6 will be paid to the account and the positions will be removed from the account.*