Do You Have To Pay Taxes on Stocks? Rules, Rates, Examples

You generally have to pay taxes on stocks when you sell them for a profit, known as a capital gain. You may also owe taxes on stock dividends, even if you haven’t sold your shares. This guide explains when you do and don’t pay taxes on stocks and how those rules can affect your tax bill.
Key Takeaways
Selling stock triggers the tax: You generally don't owe taxes on stocks you hold, even if their value rises. Taxes on stocks usually apply when you sell for a profit, which creates a capital gain.
Dividends can be taxable before you sell: The IRS generally treats stock dividends as taxable income in the year you receive them, even if you reinvest them. Qualified and nonqualified dividends are taxed at different rates.
Holding period affects your rate: Gains on stocks held one year or less are taxed as ordinary income, while gains held more than one year generally qualify for federal rates of 0%, 15% or 20%.

When Do You Pay Taxes on Stocks?
You generally don’t have to pay taxes on money you’ve invested in stocks, even if the shares increase in value. Selling a stock is what typically triggers a tax event. If you sell your share for a profit, you may owe capital gains taxes.
Brokers generally provide annual tax forms, including Form 1099-B, in January or February after the tax year ends. These forms detail your investment sales and can help you calculate your capital gains and losses and determine whether you owe Uncle Sam.
If you don’t receive the necessary tax forms, contact your broker and ask when you can expect them. Once you have the documents you need, learn how to file your taxes.
Do You Pay Taxes on Stocks You Don’t Sell?
You typically don’t owe taxes on stocks you don’t sell, even if their price goes up. That’s because you haven’t yet cashed in on that increase in value. You’ve only made a profit on paper, known as an unrealized gain.
Once you sell the stock, any profit you make becomes a realized gain and may be subject to capital gains taxes.
One big caveat applies, however: You may owe taxes on dividends from stock you haven’t sold. Dividends are distributions of company profits paid to shareholders. The IRS generally considers dividends taxable in the year you receive them, even if you reinvest them by purchasing additional shares.
How Do You Calculate Taxes on Stock Sales?
Generally speaking, you pay taxes on stock sales when you turn a profit. Whether you’ve turned a profit depends on the investment’s cost basis, which is what you originally paid for your shares plus fees or brokerage commissions.
If you sell your shares for more than their cost basis, you’ve realized a capital gain and may owe taxes on the difference.
For example, say Robby bought $100 worth of Apple stock two years ago, and now it's worth $150. Assuming no fees or other adjustments, Robby realizes a $50 capital gain and may owe taxes on the difference.
Robby won't owe taxes on the initial $100 he invested in Apple stock. However, he may owe taxes on the $50 capital gain earned through the investment.
How Are Short-Term and Long-Term Capital Gains Taxed?
How much you pay on a capital gain largely depends on how long you’ve held the asset. The IRS differentiates between short-term and long-term capital gains as follows:
Type of gain | Holding period | Tax treatment | Rate range |
|---|---|---|---|
Short-term capital gains | 1 year or less | Taxed as ordinary income | 10% to 37% |
Long-term capital gains | Over 1 year | Taxed at preferential rates | 0% to 20% |
The tax rates that apply to your capital gains vary based on taxable income and filing status. Some higher-income tax bracket investors may owe an additional 3.8% net investment income tax on some or all of their capital gains.
How Are Dividends Taxed?
Dividends are a company's way of rewarding investors with payments based on the number of shares they own. The IRS generally treats dividends as taxable income. However, how much you owe depends on your total taxable income, filing status and whether you receive qualified or nonqualified dividends.
Qualified dividends meet specific IRS requirements. For example, they must be issued by a U.S. corporation or qualifying foreign corporation, and you must hold the stock for a minimum period. Qualified dividends are taxed at the preferential long-term capital gains rates of 0%, 15% and 20%.
Nonqualified dividends don’t meet these requirements. They’re taxed as ordinary income, at the standard federal income tax rates ranging from 10% to 37%.
When Don’t You Pay Taxes on Stocks?
You generally don't pay capital gains taxes when you sell stocks for less than their cost basis. That’s considered a capital loss because you didn’t turn a profit. In some cases, capital losses can reduce your tax liability.
You can buy and sell stocks through tax-advantaged retirement accounts without paying taxes on your gains immediately. Whether you’ll eventually owe taxes on those earnings depends on the account type.
How Are Stocks Taxed in Retirement Accounts?
Investments in traditional IRAs and 401(k)s grow tax-deferred. This means you generally won’t owe taxes until you withdraw money from the account.
Contributions to Roth IRAs and Roth 401(k)s are made with after-tax dollars. Your investment can grow tax-free, and you generally won’t pay taxes on qualified withdrawals.
Capital Losses and Tax-Loss Harvesting
Capital losses may reduce your tax liability because you can deduct up to $3,000 in excess losses from your other income each year, or $1,500 if married filing separately. The IRS lets you carry any remaining losses forward to future tax years.
Many investors take advantage of this tax break via tax-loss harvesting, a strategy that involves intentionally selling investments at a loss to offset capital gains from other assets.
For example, say you sell one stock for a $5,000 profit and another for a $2,000 loss. You can generally use that loss to reduce your taxable capital gains to $3,000.
Bottom Line
When it comes to stocks, federal tax rules generally offer more favorable rates for long-term investments than short-term ones. You typically don’t owe capital gains taxes until you sell your shares for a profit, and gains on shares held for more than one year qualify for preferential tax rates. Understanding these rules can help you plan for your tax bill and make more informed investment decisions.
Key Terms
Capital gain: The profit you realize when you sell an asset, such as a stock, for more than your adjusted basis.
Cost basis: What you paid for an investment, plus fees or commissions, which is used to figure your gain or loss.
Unrealized gain: A profit on an investment you still own. It isn't taxed until you sell.
Realized gain: A profit locked in when you sell an investment. It may be taxable.
Qualified dividend: A dividend that meets IRS requirements and is taxed at long-term capital gains rates.
Tax-loss harvesting: Selling investments at a loss to offset capital gains from other investments.
Net investment income tax: An extra 3.8% federal tax that may apply to investment income for higher-income taxpayers.
Sources
IRS: What taxpayers can do if they haven’t received all their tax documents
IRS: Topic no. 404, Dividends and other corporate distribution
Cameron Walch contributed to the reporting for this article.
Information is accurate as of Dec. 2, 2026.
FAQs
You generally don’t have to pay taxes on stocks you haven’t sold. Any increase in value is considered an unrealized capital gain. However, you may owe taxes on any stock dividends you receive as a shareholder.
You typically owe capital gains tax on stocks sold at a profit. However, how much you owe depends on your taxable income, filing status, how long you held your shares before the sale and whether you have capital losses to offset your gains.
It depends on your total taxable income, filing status and how long you’ve held your shares. Capital gains on stocks held for one year or less are taxed at ordinary federal tax rates of 10% to 37%, while gains on stocks held for more than one year generally qualify for preferential rates of 0%, 15% or 20%.
Yes, you typically owe taxes on stock dividends in the tax year you receive them, even if you haven't sold your shares or reinvested them. Qualified dividends are taxed at preferential federal rates of 0%, 15% or 20%, while nonqualified dividends are taxed at ordinary income tax rates of 10% to 37%.
You generally don’t owe taxes when you buy or sell stocks in an IRA or 401(k). Investments in traditional IRAs and 401(k)s grow tax-deferred, meaning you typically pay taxes when you withdraw money. Investments in Roth IRAs and Roth 401(k)s grow tax-free, meaning you won’t owe taxes on qualified withdrawals.


You may like
On this page
Disclosures
MoneyLion does not provide, own, control or guarantee third-party products or services accessible through its Marketplace (collectively, “Third-Party Products”). The Third-Party Products are owned, controlled or made available by third parties (the "Third-Party Providers"). Should you choose to purchase any Third-Party Products, the Third-Party Providers’ terms and privacy policies apply to your purchase, so you must agree to and understand those terms. The display on the MoneyLion website, app, or platform of any of a Third-Party Product or Third-Party Provider does not-in any way-imply, suggest, or constitute a recommendation by MoneyLion of that Third-Party Product or Third-Party Financial Provider. MoneyLion may receive compensation from third parties for referring you to the third party, their products or to their website.
This material is for informational purposes only and should not be construed as financial, legal, or tax advice. You should consult your own financial, legal, and tax advisors before engaging in any transaction. Information, including hypothetical projections of finances, may not take into account taxes, commissions, or other factors which may significantly affect potential outcomes. This material should not be considered an offer or recommendation to buy or sell a security. While information and sources are believed to be accurate, MoneyLion does not guarantee the accuracy or completeness of any information or source provided herein and is under no obligation to update this information. For more information about MoneyLion, please visit https://www.moneylion.com/terms-and-conditions/.





