We lived in US for 10 years and bought (or got RSUs) in the US during this period. 3 years back, we moved to Switzerland -- so are not Swiss residents. When we sell our US stocks in Switzerland this year, do we need to pay US capital gain tax? We are not US citizens.
If we do have to pay taxes, are they prorated based on the number of years the stocks were help in US vs Switzerland?
I assume you were green Card holders, and in that case, yes, you'll be liable for US CG taxes. I believe it's 10 years from when you gave up your green card before you become US tax free - so to speak. I believe you will have to pay the full tax, no prorata, but you may be able to deduct a personal allowance.
If the sum is significant I'd speak to a lawyer specializing in cross border taxation.
US can tax you for a long while after you've moved out. Especially if you had a green card or come for visits in subsequent years. You sure you're not a US tax resident any more? More information needed than just "lived in US for 10 years"
If you had green card for 8+ years you might be already owing taxes to IRS whether you actually sell or not (exit tax)
Bought, got awarded or got vested, which one? Some of those may be tax free, some are going to be taxed as income by both US (prorata per vest days in US) and CH. Pure capital gains are not prorated afaik, you'd owe full tax.
Then who are you?
That's for giving up citizenship. If you give up green card and cut all ties with US, don't visit it any more, you should be in principle tax free from next year. Maybe even same year as a dual status resident. But properly giving up green card is critical, it's not enough to just move abroad or let it expire. Worst of all, you can still be on the clock for exit tax liability while you're living aboard with an uncancelled US green card