Suddenly, I have a curious question: if I make quite some money from stock market this year, obviously, I need to pay additional tax to IRS/State. But that is not my question.
My question: I have regular salary job, and employer withholds social security tax/medicare tax based on my salary. Now suddenly, my income has increased due to stock capital gain, how will the extra income affect social security tax/medicare tax? Do I also need to pay additional social security tax/medicare tax?
Just curious how it works? Does social security tax/medicare tax apply to capital gain? If not, what if someone is a full time stock trader (he has to pay social security tax/medicare tax, how does he pay)?
Yes. See form 8960 for extra Medicare tax on investments.
IRS Form 8960
There is no Social Security tax on capital gains.
There isn't really any Medicare tax on capital gains either. Although some years ago the Net Investment Income Tax (Form 8960) used to sometimes be referred to as the Medicare surtax or Medicare Contribution tax, it does not go to the Medicare trust fund. It goes to the federal government's general funds. So it's just an additional income tax on investment income over certain amounts. Although it was created by the Affordable Care Act, it is not, and never was, earmarked for Medicare. The terms Medicare surtax or Medicare Contribution tax aren't commonly used anymore. Everyone just calls it Net Investment Income Tax.
There is also an Additional Medicare Tax (Form 8959) that does go to Medicare. But, like the regular Medicare tax that is withheld from your salary, the Additional Medicare Tax applies to salary (wages), not to investment income.
If someone's only income is from trading stocks, and he has no job and no business income, he does not pay Social Security and Medicare taxes (and does not get any credit towards future Social Security benefits).