In a mediated settlement where capital gains are an issue, the parties can agree to a transfer of title in their portfolio as part of their divorce decree and so no sales are involved until after their marital property is split. Normally, what happens is that the marital property division results in the securities simply being split 50/50 rather than the securities being sold and the net cash being divided equally.
In this example Wife receives half of stock “x” purchased on “y” date at “z” price and Husband get the other half of the same acquisition.
Occasionally the ratio is other than 50/50, depending on personal circumstances such as when one party owned shares prior to the marriage and then the couple buys more shares in the same company while married.