How to calculate capital gains on mutual fund sale — what actually goes on Form 8949?

Finally sold out of a mutual fund I've held for years across multiple purchases. My 1099-B came in and it's showing a bunch of different lots with different dates and cost bases. I know I need to report this but I'm confused about how the gain is actually calculated. Do I just subtract what I paid from what I received? And does it matter that some lots are short-term and some are long-term? I tried reading the Schedule D instructions but they kept pointing me back to Form 8949 and I got turned around. The fund company used average cost basis — I'm not sure if that changes anything. Any help walking through the actual math and which forms to use would be really appreciated.

35 comments

The gain on each lot is simply proceeds minus adjusted cost basis. Your 1099-B should show both numbers per lot. The fund's use of average cost basis means they already blended the per-share cost across all your purchases — so the basis shown is that average times the shares sold, not the original purchase price of a specific lot. For Form 8949: short-term lots (held 1 year or less) go in Part I, long-term lots (held more than 1 year) go in Part II. The holding period for exchange-traded securities runs from the day after the trade date you bought to the trade date you sold. Publication 550 has the detail on that counting rule.

Kevin H.

Author

So the fund already did the averaging math for me? I was trying to figure out which specific shares were sold and panicking about FIFO vs specific ID. If average cost is on the 1099-B I just use that number?

Exactly. If the fund elected average cost and shows it on your 1099-B, that is the basis you use in column (e) of Form 8949. You don't recalculate it yourself unless you believe it's wrong.

One thing worth checking: look at box 1b (date acquired) on your 1099-B for each lot. If it says "various" that usually means the fund is reporting the whole position as one line. You might still have both short- and long-term shares mixed in there. Some funds break it out, some don't — if they don't you may need to split the entry yourself using your account statements.

Kevin H.

Author

Mine actually does say various on a couple of the lines. How do I handle splitting that on Form 8949?

You'd need your account statements or the fund's gain/loss report to separate the short-term proceeds and basis from the long-term. Then report two lines on Form 8949: one in Part I with the short-term totals, one in Part II with the long-term totals. The 1099-B total should still match when you add them.

Average cost is one of those things that's fine until you switch funds or do a partial redemption over many years — then it gets complicated because the average resets or layers. For a one-time full redemption like yours it's straightforward: the 1099-B basis is your column (e), proceeds are column (d), gain or loss is column (h). That flows to Schedule D line 1a or 8a if there are no adjustments needed, or stays on Form 8949 if there are.

Before I filed last year I uploaded my 1099-B and the fund's year-end gain/loss summary to taxr.ai and it cross-checked every lot — flagged two where the basis the fund reported didn't match what the confirmation statements showed. Turned out one lot had a reinvested dividend that wasn't reflected. Those dividend reinvestments increase your cost basis and forgetting them is a classic way to overpay. I adjusted column (e) on Form 8949 with code B in column (f) and a negative adjustment in column (g) since my correct basis was higher than what the 1099-B showed.

Kevin H.

Author

Wait — reinvested dividends raise my basis? I had dividend reinvestment turned on for years. How do I find what those added?

The fund should have records of every reinvestment — each one is a separate purchase at that day's NAV. Your account history or year-end tax statements should list them. If the basis on your 1099-B already includes reinvestments (most funds do now for covered securities), you're fine. If it doesn't, you need to add them and use code B to flag the correction on Form 8949.

Are these covered or noncovered securities? That matters for which box you check in Form 8949's Part II. Covered securities (generally purchased 2012 or later for mutual funds) have basis reported to the IRS — box D. Noncovered ones have basis not reported — box E. The 1099-B will say which. If you have both, you need separate sections.

Kevin H.

Author

Some of my older lots might be noncovered then. Does that change how I calculate the gain or just which box I check?

Just the box. The gain calculation is the same — proceeds minus basis. But for noncovered lots, you enter the correct basis in column (e) yourself and put -0- in column (g), because there's no IRS-reported basis to correct against.

Don't forget that mutual funds also distribute capital gains during the year — those show up on your 1099-DIV in box 2a, not on your 1099-B. Those are separate from the gain on the sale you're reporting. People mix them up sometimes and either double-count or miss one.

Is that true even if you reinvested those distributions? I always reinvested and assumed it was a wash.

Reinvesting doesn't make them tax-free — the distribution is still income in the year distributed. What reinvesting does is add to your basis for the new shares purchased, which helps reduce your gain later when you sell. So yes, still taxable in the year of distribution, reported on Schedule D via the 1099-DIV.

I had a similar redemption two years ago and the part that tripped me up was figuring out whether my net loss in one fund could offset a gain in another. It can — you net everything on Schedule D. I ran my whole picture through Taxr: uploaded the 1099-Bs from three different funds and it listed the short- and long-term totals, showed where losses offset gains, and drafted the Schedule D summary so I could see the net before I touched my return.

Kevin H.

Author

Does the netting happen automatically in tax software or do I have to do it manually?

Software handles it automatically once you enter all the Form 8949 lines. Schedule D does the netting: short-term net on line 7, long-term net on line 15, then they combine on line 16. If you end up with a net loss there's a cap on how much you can deduct against other income in one year — the Schedule D instructions have the limit and the carryover worksheet.

If your net capital losses exceed your gains, you can't deduct the full loss in one year. The deductible amount against other income is capped, with the rest carrying forward to future years. Topic 409 on irs.gov and the Schedule D instructions both spell out the carryover worksheet.

What method did the fund use before you redeemed? Average cost is common but some funds default to FIFO. Worth confirming in the 1099-B or in your fund account — the basis method should be noted somewhere in the documentation.

Kevin H.

Author

The 1099-B header says average cost. I actually never changed it from whatever the default was when I opened the account.

That's fine — average cost is a valid IRS-accepted method for mutual funds. As long as it's on the 1099-B and you haven't previously notified the fund to change methods, you're good to use it. Just make sure you don't switch to specific ID on a future partial redemption without telling the fund first.

Proceeds go in column (d), basis in column (e). Gain or loss is column (h) and is column (d) minus column (e) after any adjustments in column (g). That subtraction is the entire capital gain calculation. Everything else — which part, which box, adjustment codes — is about correctly describing the transaction, not changing the math.

For anyone holding the fund in a tax-advantaged account like an IRA: gains inside the account are not reported on Form 8949 when you sell within the account. You only report distributions when they come out. I've seen people get confused about this and try to report fund sales inside their IRA on Schedule D — that's not right.

Does that apply to Roth IRAs too? I have a fund in both a taxable account and a Roth.

Yes, same principle for a Roth. Sales inside the Roth are not reported on Form 8949. Only the taxable account redemption goes through Form 8949 and Schedule D. Qualified Roth distributions have their own treatment covered in Publication 590-B.

Publication 550 and Publication 551 are the two IRS publications most relevant here — 550 covers capital gains and holding periods in detail, 551 covers basis of assets including how to adjust for things like reinvested dividends and return-of-capital distributions. Both are free on irs.gov.

What if the fund had any return-of-capital distributions over the years? Those reduce your basis below what you originally paid, which means your taxable gain ends up larger than the difference between sale price and purchase price.

Exactly right. Return of capital is reported in box 3 of the 1099-DIV in the year received and reduces your basis. If your basis was reduced below zero the excess becomes capital gain immediately. The fund's tax guide or your year-end statements should show any return-of-capital history.

Kevin H.

Author

Is there an easy way to tell if I had any? I don't remember seeing box 3 amounts on past 1099-DIVs but I should probably double-check.

Say the basis the fund reported is just plain wrong — not a code error, not a reinvestment miss, but actually incorrect — then you have two choices: use code B in column (f) and correct it in column (g) with the right adjustment, or if it's uncovered, just enter the correct basis directly in column (e). The Form 8949 instructions at irs.gov walk through both scenarios.

To put the whole sequence together: your 1099-B gives you proceeds and basis per lot. You sort lots into short-term (Part I) and long-term (Part II) on Form 8949. You check the right box (A/B for short-term covered/noncovered, D/E for long-term). Gain or loss per lot is column (d) minus column (e) plus or minus column (g). Totals from Form 8949 feed into Schedule D, where everything nets out.

Kevin H.

Author

This is the clearest walkthrough I've seen. Thank you. I think I have enough to actually fill this out now — just need to pull my account history to sort the "various" dated lots.

Honestly, the Form 8949 instructions on irs.gov read better than most IRS docs — worth opening alongside your 1099-B while you fill it out. The column-by-column breakdown makes the process a lot less intimidating once you see it laid out.