Capital gains tax depends on how long you hold the stock. If you sell within a year, it's considered short-term and taxed at your ordinary income rate. If you hold it for over a year, it's long-term and usually taxed at a lower rate (0%, 15%, or 20% depending on your income). Losses can offset gains, so if you sell some stocks at a loss, it can reduce your taxable gains.