Q: I'm planning to sell some of my stocks this year. What will this mean for my tax bill?

The answer depends on a few factors. Specifically, what type of account are the stocks in, how much will you profit from the sale, how long have you owned them, and did they pay you any dividends before you sold them? Let's take these things one at a time.

If you own the stocks in a Roth IRA and you've had the account for at least five years, you'll owe no taxes at all. With a traditional IRA or other tax-deferred retirement account, you won't owe any taxes unless you withdraw the money, in which case it will be considered ordinary taxable income.

If you own the stocks in a taxable (standard) brokerage account, it's a bit more complicated.

First, did you make a profit when you sold the stock? If so, and you owned it for at least a year and a day, you'll pay long-term capital gains tax on the profit. If you owned it for less time, your profit will be considered ordinary income. If you lost money on the sale, not only will you owe no capital gains tax, but you may be able to offset your other income with the loss.

Finally, don't forget about taxes on the dividends that you've been paid by the stock before the sale. I realize that this isn't a sale-related expense, but it's easy to forget about dividend income derived from a stock you no longer own, so it's important to keep in mind.

The Motley Fool has a disclosure policy.