What Are Investment Taxes and How Do They Work?
A clear guide to the tax rules affecting your investment portfolio. Learn how different account structures and holding periods impact what you owe the IRS.
A clear guide to the tax rules affecting your investment portfolio. Learn how different account structures and holding periods impact what you owe the IRS.
When you own investments like stocks or bonds, the income they generate or the profits from their sale can be subject to federal taxes. This occurs when you realize gains by selling an asset for more than its purchase price or when you receive distributions like interest or dividends. The amount of tax owed depends on how long the asset was held, the type of income, and your overall income level.
A primary way investments generate taxable income is through capital gains, which occur when you sell an asset for more than your original purchase price. The tax treatment of these gains is determined by the holding period.
Gains from assets held for one year or less are short-term capital gains and are taxed at ordinary income rates. For the 2025 tax year, these rates range from 10% to 37%, depending on your filing status and total taxable income. For example, a single filer with a taxable income of $100,000 would fall into the 22% bracket, and any short-term gains would be taxed at that rate.
Gains from assets held for more than one year are long-term capital gains and are taxed at lower rates of 0%, 15%, or 20%. For 2025, a single filer with a taxable income up to $48,350 would pay 0% on long-term gains. An income between $48,351 and $533,400 would result in a 15% rate, while income above that amount is subject to the 20% rate.
Dividends, which are payments from a corporation to its shareholders, are another form of investment income. Non-qualified dividends are taxed at your ordinary income rate. Qualified dividends receive the same preferential tax treatment as long-term capital gains. For a dividend to be qualified, you must have held the stock for more than 60 days during the 121-day period that begins 60 days before the ex-dividend date.
Interest income from sources like bank accounts, certificates of deposit (CDs), and corporate bonds is taxable as ordinary income. An exception is the interest earned from most municipal bonds, which are debt securities issued by state and local governments. This interest income is exempt from federal income tax and may also be exempt from state and local taxes if you reside in the issuing state.
To determine your taxable investment income, you must first establish the cost basis of your asset. The cost basis is the original value of an investment, including the purchase price plus any associated costs like commissions. This figure is subtracted from the sale price to calculate your capital gain or loss.
When selling a portion of holdings acquired at different times, brokerage firms may default to the First-In, First-Out (FIFO) method, where the first shares bought are the first sold. Many brokers also allow the Specific Identification method, letting you select which shares to sell. This can help manage your tax liability by choosing shares with a higher cost basis to reduce gains.
A capital loss occurs when you sell an asset for less than its cost basis. Losses can be used to offset capital gains through a process called netting. The IRS requires you to first net short-term losses against short-term gains and long-term losses against long-term gains. If a net loss remains in one category, it can then be used to offset a net gain in the other.
If your total capital losses exceed your total capital gains, you can deduct up to $3,000 of the excess loss against your ordinary income in a single tax year. Any remaining capital loss can be carried forward to offset gains or up to $3,000 of ordinary income in future tax years until the loss is fully used. This gives rise to tax-loss harvesting, a strategy of intentionally selling investments at a loss to offset gains from other investments.
When tax-loss harvesting, you must be aware of the wash-sale rule. This regulation prevents you from claiming a loss on a security if you purchase a “substantially identical” one within 30 days before or after the sale. If a wash sale occurs, the loss is disallowed for the original sale and is instead added to the cost basis of the newly purchased security.
Higher-income investors may also be subject to the Net Investment Income Tax (NIIT). This is an additional 3.8% tax on the lesser of your net investment income or the amount by which your Modified Adjusted Gross Income (MAGI) exceeds certain thresholds. For 2025, the thresholds are $200,000 for single filers and $250,000 for those married filing jointly.
You can manage the tax impact of investing by using tax-advantaged accounts designed to encourage saving for long-term goals. These accounts alter the standard tax rules, with benefits applied either when you contribute money or when you withdraw it.
Tax-deferred retirement accounts, such as a traditional 401(k) or a traditional Individual Retirement Arrangement (IRA), offer an upfront benefit. Contributions are often tax-deductible, lowering your immediate tax bill. The investments grow tax-deferred, and you only pay ordinary income tax on withdrawals in retirement.
In contrast, tax-exempt accounts like the Roth 401(k) and Roth IRA use post-tax contributions, so there is no upfront deduction. The benefit comes later, as investments grow completely tax-free, and qualified withdrawals in retirement are also tax-free.
A Health Savings Account (HSA) offers a triple-tax benefit. Contributions are tax-deductible, the funds grow tax-free, and withdrawals are also tax-free if used for qualified medical expenses. This makes an HSA an efficient vehicle for both healthcare and supplemental retirement savings.
For education savings, 529 plans are a popular choice. While contributions are not federally deductible, the money grows tax-deferred. Withdrawals are federally tax-free as long as they are used for qualified education expenses, including tuition, fees, books, and room and board.
After the tax year, your financial institutions will send tax forms summarizing your investment activity. You should receive Form 1099-DIV for dividends, Form 1099-INT for interest, and Form 1099-B for proceeds from broker transactions.
Form 1099-B is particularly detailed, reporting the sale date, proceeds, and cost basis for each transaction. It will also indicate whether the gain or loss was short-term or long-term. You are responsible for ensuring the information your broker reports is accurate.
The information from your 1099-B is used to complete Form 8949, Sales and Other Dispositions of Capital Assets. On this form, you must list each sale, separating short-term transactions from long-term ones, by transferring the details directly from your 1099-B.
The summary totals from Form 8949 are then transferred to Schedule D, Capital Gains and Losses. This form is used to formally calculate your net short-term and long-term capital gain or loss for the year.
The final number from Schedule D is carried over to your main tax return, Form 1040. It is included with your other income to determine your total tax liability, ensuring all capital transactions are properly accounted for and taxed.