When you transfer shares to your spouse's account, it's generally not considered a sale for Capital Gains Tax purposes at the time of transfer. The capital gain tax liability will typically arise in your hands only when your spouse sells those shares from their demat account. This is often treated as a gift, but it's important to be aware of potential clubbing provisions.