For many investors, selling stocks or mutual funds can create both opportunities and challenges at tax time. Whether you’ve made a profit or taken a loss, knowing how to properly report investment sales and leverage tax strategies can significantly impact your refund. With some planning and attention to detail, you can legally reduce your tax burden and possibly increase your refund. This guide explains everything you need to know about maximizing your tax refund when selling securities.
Understanding Capital Gains and Losses
When you sell a stock or mutual fund, you either realize a capital gain (profit) or a capital loss (loss below your cost basis). The IRS taxes these gains and allows you to deduct losses, but the tax rate and treatment depend on how long you held the investment.
- Short-Term Capital Gains: Applies to securities held for one year or less; taxed at your ordinary income tax rate (up to 37%).
- Long-Term Capital Gains: Applies to securities held for more than one year; taxed at preferential rates—0%, 15%, or 20% based on your taxable income.
Capital gains and losses must be reported on your tax return using Schedule D and Form 8949.
Use the Correct Cost Basis
Your cost basis is what you originally paid for the investment, including commissions or fees. Subtracting the cost basis from the sale price determines your capital gain or loss.
Many investors make the mistake of forgetting to include reinvested dividends in their cost basis for mutual funds, which can result in overstating gains. Make sure to:
- Track reinvested dividends and capital gains distributions.
- Include all purchase commissions or fees in the cost basis.
- Adjust for stock splits and mergers.
Brokerage firms typically provide a 1099-B form with this information, but it’s important to verify it for accuracy.
Offset Gains with Capital Losses (Tax-Loss Harvesting)
If you have investments that lost value, you can sell them to realize capital losses and use them to offset your capital gains. This technique, known as tax-loss harvesting, is a powerful way to minimize tax liability.
- Losses offset gains of the same type (short-term with short-term, long-term with long-term).
- If your losses exceed your gains, you can deduct up to $3,000 ($1,500 if married filing separately) from ordinary income.
- Any unused losses can be carried forward to future years indefinitely.
Avoid the Wash-Sale Rule
The IRS disallows a capital loss deduction if you buy a “substantially identical” security within 30 days before or after selling it at a loss. This is known as the wash-sale rule.
To avoid triggering the rule:
- Wait at least 31 days before repurchasing the same security.
- Purchase a similar (but not identical) investment instead.
- Be cautious with automatic dividend reinvestment plans (DRIPs) and retirement accounts.
If the wash-sale rule is violated, your disallowed loss is added to the basis of the new purchase, postponing the deduction until you sell again.
Understand Net Investment Income Tax (NIIT)
High-income earners may be subject to an additional 3.8% Net Investment Income Tax on capital gains. This applies if your Modified Adjusted Gross Income (MAGI) exceeds:
- $250,000 for married couples filing jointly
- $200,000 for single filers
- $125,000 for married individuals filing separately
Properly planning your sales to stay below these thresholds can help you avoid this extra tax.
Donate Appreciated Securities Instead of Selling
If you want to give to charity and have stocks or mutual funds that have significantly increased in value, consider donating them directly. Benefits include:
- No capital gains tax is due on the appreciated amount.
- You can deduct the full fair market value of the donation if you itemize deductions.
- It can help lower your AGI, potentially increasing other deductions or credits.
Be sure to transfer the securities to a qualified charitable organization and obtain proper documentation.
Sell in a Low-Income Year
Long-term capital gains may be taxed at 0% if your total taxable income is below certain thresholds:
- $44,625 for single filers (2025)
- $89,250 for married filing jointly
Consider deferring gains to a lower-income year, or accelerating losses in a high-income year, to pay less tax or receive a larger refund.
Utilize Retirement Accounts for Tax-Free Growth
Selling investments within a tax-advantaged account like a Roth IRA or Traditional IRA does not trigger capital gains tax.
To maximize refund potential and tax deferral:
- Hold actively traded funds inside tax-advantaged accounts.
- Use taxable accounts for investments that are more tax-efficient, such as ETFs or municipal bonds.
- Harvest gains and rebalance more freely inside retirement accounts.
Be Strategic with Mutual Fund Distributions
Mutual funds often make capital gains distributions at year-end, which are taxable—even if you reinvest them. Before buying new mutual fund shares late in the year:
- Check the fund’s distribution schedule to avoid paying tax on gains you didn’t benefit from.
- Sell underperforming mutual funds before distributions to harvest losses.
Also consider holding index funds or ETFs, which typically generate fewer taxable distributions.
Track Form 1099-B and Report on Schedule D
Your broker will issue a Form 1099-B reporting the sales of securities. It includes:
- Date of acquisition and sale
- Proceeds and cost basis
- Type of gain (short-term or long-term)
You’ll use this data to complete:
- Form 8949: Report each individual transaction and its details
- Schedule D: Summarize gains and losses from all investments
- Form 1040: Net capital gains or losses appear on Line 7 of Schedule 1, then flow into Line 8 of Form 1040
Keep Accurate Records
To avoid errors and maximize your refund, maintain detailed records of your investment activity:
- Purchase and sale confirmations
- Dividend reinvestment statements
- Split and merger documentation
- Cost basis calculations (especially for inherited or gifted stocks)
Tax software or a CPA can help reconcile and report large volumes of transactions efficiently.
Watch for State-Specific Tax Benefits
Some states conform to federal capital gains rules, while others have their own tax treatment. A few considerations:
- Some states do not tax capital gains at all (e.g., Florida, Texas, Nevada).
- Others offer exclusions or credits for long-term investments or reinvestments in state-based funds.
- Be sure to check your state’s rules to avoid underreporting or missing out on potential refunds.
Conclusion
Selling stocks and mutual funds doesn’t have to be a tax burden. With smart planning, you can turn these transactions into opportunities to boost your tax refund. By properly tracking your cost basis, harvesting losses, avoiding the wash-sale rule, and taking advantage of charitable giving or low-income years, you can minimize tax and retain more of your investment returns. Always review IRS rules carefully, use accurate tax reporting tools, and consider working with a financial advisor or CPA to optimize your tax position when selling investments.