You pay federal income tax on stock gains and dividends, but the amount and timing depend on how long you held the stock and what type of income it is
The IRS taxes two things that happen with stocks: the profit you make when you sell (called a capital gain) and the money companies pay you for owning shares (called dividends). You do not pay tax on the stock itself while you own it — only on the money that comes out of it. The tax rate you pay depends on whether you held the stock for more than a year, what your total income is, and whether the dividend is ordinary or may have access to.
State and local taxes may also explore, depending on where you live and where the company is based. Some states tax capital gains and dividends; others do not. This guide covers federal tax rules, which explore everywhere, but you will need to check your state's rules separately.
Key Takeaways
- Short-term capital gains (stocks held one year or less) are taxed as ordinary income at your regular tax rate, which can be as high as 37 percent federally.
- Long-term capital gains (stocks held more than one year) are taxed at lower rates: 0, 15, or 20 percent depending on your income level.
- may have access to dividends are taxed at the same long-term capital gains rates; ordinary dividends are taxed as regular income.
- You report capital gains and dividends on your federal tax return using Form 1040 and Schedule D, and you owe tax in the year you sell or receive the dividend.
- Your broker sends you a Form 1099-B (for sales) and Form 1099-DIV (for dividends) by January 31, which lists the transactions the IRS also receives.
How short-term and long-term capital gains are taxed differently
A capital gain is the profit you make when you sell a stock for more than you paid for it. If you bought 100 shares at $50 each and sold them at $75 each, your capital gain is $2,500. The tax you owe on that gain depends on how long you owned the stock.
If you held the stock for one year or less, it is a short-term capital gain. The IRS taxes this as ordinary income, meaning it is added to your wages, self-employment income, and other earnings and taxed at your regular tax bracket. For 2024, federal tax brackets range from 10 percent to 37 percent depending on your total income and filing status. Short-term gains can push you into a higher tax bracket, which means you may pay more tax on all your income, not just the gain.
If you held the stock for more than one year, it is a long-term capital gain. These are taxed at preferential rates: 0 percent, 15 percent, or 20 percent, depending on your income level. For 2024, the 0 percent rate applies to single filers with income up to $47,025; the 15 percent rate applies to income between $47,025 and $518,900; and the 20 percent rate applies to income above that. These thresholds are different for married filing jointly and other filing statuses. Long-term gains are calculated separately from your ordinary income, so they do not push your wages into a higher bracket.
The difference matters significantly. A $10,000 short-term gain taxed at 37 percent costs $3,700. The same gain taxed at 15 percent costs $1,500. This is why holding a stock past the one-year mark can reduce your tax bill substantially.
How dividends are taxed
A dividend is a payment a company makes to shareholders, usually from its profits. Some companies pay dividends quarterly; others pay annually or not at all. Dividends are taxed differently depending on whether they are may have access to or ordinary.
may have access to dividends are taxed at the same preferential long-term capital gains rates (0, 15, or 20 percent). To be may have access to, the dividend must come from a U.S. company or a company in a country with a tax treaty with the United States, and you must have owned the stock for more than 60 days during the 121-day period centered on the ex-dividend date (the date the company sets as the cutoff for who receives the dividend). Most dividends from U.S. stocks meet these rules.
Ordinary dividends are taxed as regular income at your tax bracket rate (up to 37 percent). These include dividends from real estate investment trusts (REITs), master limited partnerships (MLPs), and some preferred stocks. Your broker will tell you on Form 1099-DIV which dividends are may have access to and which are ordinary.
Reinvested dividends — dividends you use to buy more shares instead of taking as cash — are still taxable in the year you receive them. The fact that you did not withdraw the money does not change the tax obligation.
Capital losses and how they reduce your tax bill
If you sell a stock for less than you paid for it, you have a capital loss. You can use capital losses to offset capital gains, which reduces the amount of gain you owe tax on. If you have $5,000 in long-term gains and $3,000 in long-term losses, you report a net gain of $2,000 and pay tax only on that amount.
If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against your ordinary income (wages, salary, and other non-investment income). Any losses beyond $3,000 carry forward to future years, and you can use them to offset gains or ordinary income in those years with the same $3,000 annual limit.
Losses must be matched with gains of the same type: long-term losses offset long-term gains first, and short-term losses offset short-term gains first. If you have both types of gains and losses, the IRS has specific rules for how they combine. Your broker's year-end statements and tax software usually handle this calculation, but understanding the basic rule helps you plan sales strategically.
What forms you receive and what you report to the IRS
Your broker sends you two main tax forms by January 31 of the year after you trade:
Form 1099-B reports stock sales. It shows the date you bought the stock, the date you sold it, the sale price, and your cost basis (what you paid). The IRS receives a copy, so the information must match what you report on your tax return. If you sold stocks through multiple brokers, you receive a separate 1099-B from each one.
Form 1099-DIV reports dividends. It breaks down may have access to dividends, ordinary dividends, capital gain distributions, and other types of income. Again, the IRS receives a copy.
You report capital gains and losses on Schedule D (Capital Gains and Losses), which attaches to your Form 1040 federal tax return. Short-term gains and losses go in one section; long-term gains and losses go in another. The form calculates your net gain or loss, which you then transfer to your Form 1040. Dividends are reported on Schedule B (Interest and Ordinary Dividends) if your total dividends and interest exceed $1,500, or you can report them directly on Form 1040 if they are below that threshold.
You owe tax in the year you sell the stock or receive the dividend, regardless of when you actually pay the tax. If you sell in December 2024, you report it on your 2024 return due in April 2025.
How wash sales affect your losses
A wash sale occurs when you sell a stock at a loss and buy the same or a substantially identical stock within 30 days before or after the sale. The IRS disallows the loss in the year you claim it, and instead adds the loss to the cost basis of the new shares. This rule prevents people from selling stocks to claim a tax loss and then when ready buying them back.
The 30-day window is strict: it runs from 30 days before the sale through 30 days after. If you sell on January 15, you cannot buy the same stock between December 16 and February 14 without triggering the wash sale rule. If you do, you cannot deduct the loss on your 2024 return, but the loss is not gone — it increases what you paid for the new shares, so you will pay less tax when you eventually sell those shares.
Substantially identical means the same stock or a very similar security. Buying a different company's stock or a mutual fund that holds the same stock does not trigger the rule, but buying the same stock through a different broker does. If you own the stock in a taxable account and also in a retirement account (like an IRA), a purchase in the retirement account within the 30-day window can trigger the wash sale rule in the taxable account.
State and local taxes on stocks
Federal tax is not the only tax on stocks. Some states tax capital gains and dividends; others do not. The rules vary widely and change frequently.
As of 2024, states with no income tax (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming) do not tax capital gains or dividends. States with income tax generally tax both, though a few have special rules. California, for example, taxes long-term capital gains at the same rate as ordinary income. New York taxes both capital gains and dividends as ordinary income. Some states offer preferential rates for long-term gains or exemptions for certain types of dividends.
If you live in one state and the stock is issued by a company in another state, you typically owe tax only to your state of residence. Your state tax return will ask for capital gains and dividend income, and you report the same amounts you reported to the IRS. Check your state's tax authority website or speak with a tax professional to understand your specific state's rules.
Frequently Asked Questions
Do I owe tax if I have not sold my stock yet?
No. You owe tax only when you sell the stock (on the gain) or when you receive a dividend. The increase in value while you own the stock is not taxable until one of those events happens. This is called an unrealized gain, and it is not reported to the IRS.
What if my stock went down in value — do I get a tax break?
You can claim a capital loss when you sell, which reduces your taxable gains. If losses exceed gains, you can deduct up to $3,000 against your ordinary income in that year, with any excess carrying forward to future years. You cannot claim a loss just because the stock is worth less; you must actually sell it.
How do I know if a dividend is may have access to or ordinary?
Your broker reports this on Form 1099-DIV, which breaks out may have access to dividends separately. If you are unsure, check the form or contact your broker. Most dividends from U.S. companies are may have access to if you held the stock for more than 60 days around the ex-dividend date.
Can I avoid taxes by holding a stock forever?
You can avoid capital gains tax by not selling, but you still owe tax on any dividends the stock pays. When you die, your heirs receive a "step-up in basis," meaning the cost basis resets to the stock's value on the date of death, so they owe no tax on gains that occurred during your lifetime. This is a feature of the current tax code, but it may change.
What if I made a mistake on my tax return about stocks?
If you reported a gain or loss incorrectly, you can file an amended return using Form 1040-X. The IRS will match your reported gains and losses to the 1099-B your broker sent, so discrepancies are usually caught. If the IRS contacts you, respond promptly with documentation of your actual cost basis and sale price.