
If you own a lot of stock, does that mean you’ll owe a lot of taxes?
The answer is a bit complicated, but it comes down to this: only when you sell.
You pay taxes on the profit from selling stock. How much and when depends on a few factors. Here’s what you need to know.
How stocks are taxed
When you sell a stock for a profit, it’s called a capital gain, so you’ll owe capital gains tax. The amount of the tax depends on your income, filing status, and how long you held the stock.
Also, expect to pay taxes on dividends, which are distributions paid by companies to their shareholders. Those rules differ slightly.
Read more: How are dividends taxed?
The IRS considers stocks capital assets much like a home, car, and just about everything you own. While invested, a stock’s value can rise or fall based on changes in the market. These changes in value are called unrealized gains, or losses, and are not taxed. Once you sell, you have realized capital gains or losses, and capital gains are subject to the capital gains tax.
Stock profits can be taxed at a short- or long-term tax rate.
To calculate how long you’ve had a stock, start on the day after purchasing the stock and end on the day you sold it.
What is the capital gains tax rate?
Your capital gains tax rate depends on your tax filing status and income. The rates are the same for 2024 and 2025, but the income thresholds will increase.
Up Next
What is a capital loss?
When you lose money on the sale of a stock, you have a capital loss. To calculate a gain or loss, take your earnings and subtract the cost basis, which is the stock’s purchase price plus related expenses like commission.
For example, if you purchased 15 shares at $80 each using a brokerage account that charged a 2% commission, your cost basis is ($80 x 15) + (2% x $1,200), or $1,224.
If you later sell the same 15 shares for $50 each, you’ll have earned $750 on the sale. Since you received less than your costs, you’ll have a capital loss of $750 - $1,224, or $474.
You don’t pay taxes on capital losses. Instead, losses can lower your capital gains and the associated tax. If your capital losses are more than your gains, you have a net capital loss.
How to calculate net loss
A net capital loss is your total gains minus your total losses. If you have more losses than gains, you can use the excess loss to lower your taxable income up to $3,000 (or $1,500 if married filing separately). Net losses above $3,000 can roll over, lowering your tax bill in future years, known as capital loss carryover.
When do you pay taxes on stocks?
You only pay taxes when you sell a stock and only on the profit. You don’t pay taxes on stocks you still own, no matter how much they may have increased in value. When it’s time to file your annual tax return, you should receive Form 1099-B from your brokerage firm. The 1099-B reports your transactions for the tax year and any resulting gains and losses. You or your tax professional can use this form to complete your tax return (Schedule D Form 1040).
If your taxable gain is large enough, you may need to pay an estimated tax throughout the tax year. The IRS recommends paying an estimated tax if you expect to owe $1,000 or more in taxes for the year.
Taxes on dividends
Some companies pay its shareholders dividends, a portion of the profits or earnings. Dividends are taxable when you receive them, even if you don't sell the stock. The amount of the dividend tax depends on how it’s classified.
You can see how your dividends are categorized on Form 1099-DIV. Use this form to report them accurately on your federal tax return.
What is the net investment income tax?
Investors who earn above an income threshold may have to pay an additional tax on their investment income or modified adjusted gross income, whichever is less.
The net investment income tax (NIIT) is 3.8% for 2024 and applies if you have investment income, including dividends and capital gains, and meet the following earning thresholds:
Use Form 8960 to calculate your NIIT and report this number on your income tax return.
How to avoid capital gains tax on stocks
There are a few strategies you can use to avoid or lower your taxes when selling stocks.
Stay invested
Since you’re only taxed when you sell a stock, you can continue holding the stock to avoid paying capital gains tax — but only if it makes sense given your investment goals.
Holding the stock for at least a year helps you avoid paying the income tax rate on short-term gains. Depending on your tax bracket, this could result in significant savings.
For example, a single filer who earns $110,000 in 2024 falls into the 24% federal income tax bracket. Any short-term gains for 2024 would be taxed at this rate. However, the tax filer can hold the stock for at least a year and instead qualify for the 15% long-term capital gains tax rate.
Offset gains with losses
You may choose to sell a stock at a loss to offset your capital gains in what’s known as tax loss harvesting. Up to $3,000 of excess losses can lower your taxable income (this limit is $1,500 if married filing separately).
Tax loss harvesting may not work for everyone, and it comes with restrictions like the wash sale rule. Under this rule, you cannot deduct a capital loss if you buy a similar stock within 30 days before or after the sale.
Consider working with a tax professional to see if tax loss harvesting makes sense for you.
Maximize savings in tax-advantaged accounts
If you’re looking to lower taxes on your investments, consider putting more money in accounts with tax benefits, like a 401(k) or IRA. Retirement accounts can be tax-deferred or tax-free.
Tax-deferred accounts, like a traditional 401(k) or traditional IRA, can lower your tax bill up front because you generally fund them with pretax or tax-deductible money. Accounts like a Roth 401(k) or Roth IRA lower your tax bill later because you can withdraw from the account income-tax-free, including dividends and capital gains.
Retirement accounts have their own sets of rules, including when you can take money out. You generally can’t touch the money until you turn 59 ½, or you’ll pay a 10% early withdrawal fee.
Talk with an expert
Knowing the best ways to lower your taxes on stocks can be complicated. Enlist the help of a tax professional and a financial advisor to help you find the best strategy.
Taxes on stocks FAQs
How much is the tax on stocks?
How much you pay in taxes on stocks depends primarily on how long you’ve held the stock. Stocks held for less than a year are subject to the short-term capital gains tax, which is taxed at ordinary income tax rates. Stocks held for longer than a year qualify for long-term capital gains tax, which is 0%, 15%, or 20%, depending on your income and tax filing status.
What are the rules for capital gains tax?
The long-term capital gains tax is based on income and tax filing status. For example, an individual tax filer pays a 0% long-term capital gains tax on income up to $47,025, 15% on income between $47,026 and $518,900, and 20% for income over $518,900. The IRS income thresholds are expected to increase for the 2025 tax year.
How long do you have to hold a stock to avoid capital gains?
You can avoid a short-term capital gains tax by holding the stock for more than a year. However, if you make a profit from selling a stock you held for more than a year, you may still be subject to the long-term capital gains tax, depending on your income. It’s possible to pay a 0% long-term capital gains tax if your income is $47,025 or less as an individual filer or married filing separately. If you’re married filing jointly, you have a higher limit of $94,050 for 2024.
Do you pay taxes on stocks you don’t sell?
No, you only pay taxes on stocks that you sell for a profit, known as a capital gain. You won’t pay taxes on stocks you still own, no matter how high the value may rise. If you sell for a profit, you’ll either pay a short-term or long-term capital gains tax, depending on how long you hold the stock. Keeping the stock longer could result in a lower tax rate, particularly if you fall into a higher income tax bracket.
Do you pay taxes on stocks if you lose money?
No, you only pay taxes on profits from selling a stock. If you lose money in the stock sale, that’s known as a capital loss. You should still report these losses because they can offset capital gains and even your taxable income (up to a limit) if your losses are large enough.