When you sell stocks, bonds, and other investments, you'll typically generate either a capital gain or a capital loss. Capital gains happen when you sell an investment for a profit; capital losses happen when you sell an investment at a loss. In either case, you need to report the transaction on the tax form called Schedule D and turn it in with the rest of your tax return. Luckily, the tax statement from your brokerage -- also known as your 1099-B -- often has all the information you need.

Reading your 1099-B form

Every year, usually sometime in February, the brokerage holding your investments will send you a 1099-B form that provides tax info on all your transactions from the previous year. Some brokerages will combine this document with your 1099-DIV and 1099-INT forms, which contain information on the dividends and interest you received during the year, respectively.

While 1099-B forms can vary wildly in format, they all have roughly the same information that you'll see in this 1099-B template. The first few fields tell you the name or description of the property that you sold (i.e., 100 shares of Company X stock), the date you purchased that property, the date you sold the property, how much you sold it for, and how much you originally paid for it. This is the most important information for tax purposes, as it will help you determine the amount of your profit or loss and whether it was short-term or long-term.

List of transactions and calculator

Image source: Getty Images.

Schedule D and Form 8949

If you take a look at the first page of your Schedule D form, you'll see a couple of different tables that you're expected to fill out. The first row of each table refers to transactions "for which you have no adjustments," and the next three rows refer to "transactions reported on Form(s) 8949." So what does it mean by "adjustments," and what the heck is this Form 8949?

Form 8949 is yet another IRS form helping to complicate taxpayers' lives. The purpose of Form 8949 is to give you a place to report transactions for which you need to provide extra information, typically for one of the following reasons:

  • Those transactions didn't appear on your 1099-B form or any other tax reporting form;
  • There are complications or oddities related to the transaction, such as market discounts or a disallowed wash sale loss; or
  • The transaction counts as an ordinary gain or loss, rather than a capital gain or loss.

You can tell whether or not you'll need to fill out Form 8949 by looking at your 1099-B. You can skip Form 8949 this year if all the following apply:

  • Your transactions for the year appear on your 1099-B;
  • None of them have anything in the fields 1f or 1g;
  • The "ordinary" box is not checked in field 2 for any transaction; and
  • The box in field 3 is checked for every transaction.

Filling out Schedule D (if Form 8949 is not required)

Assuming you lucked out and you don't need to fill out Form 8949, then Schedule D will be a bit simpler to complete. The totals for all your short-term capital gains and losses will go on row 1a of Part I, and the totals for your long-term capital gains and losses will go on row 8a of Part II.

Start by going over your 1099-B form and noting all the transactions with the "short-term" box checked in field 2. Add up the totals from field 1d (the proceeds) for these short-term transactions and put the total in the proceeds column for row 1a of your Schedule D. Next, add up the totals from field 1e for the short-term transactions on your 1099-B and put the total in the cost column of row 1a. Finally, subtract the total in the cost column from the total in the proceeds column on Schedule D and put the result in the gain or loss column at the far right end of row 1a.

Lines 4 through 6 of the Schedule D give you a place to include other short-term gain and loss information, such as gain or loss from partnerships and capital loss carryovers from previous years. Fill in those lines if applicable, then add up the totals as instructed on the form and put the final result in line 7. You'll go through the exact same process for your long-term transactions in Part II of the Schedule D.

Finally, Part III walks you through how to summarize all your capital gains and losses so that you can determine whether or not you had an overall gain or loss for the year, and how much it was.

Filling out Schedule D (if Form 8949 is required)

Many investors will need to fill out Form 8949 in addition to Schedule D, most often because some or all of the transactions from their 1099-B did not have their basis reported to the IRS (i.e., the box in field 3 is not checked). In that case, Schedule D acts as a summary of Form 8949. After you transfer all your transaction information to Form 8949, you simply transfer the totals at the bottom of each section of the form to the appropriate row on your Schedule D. For example, after you list all the short-term transactions for which basis was reported to the IRS on the first section of Form 8949, you can then transfer the totals for this section to row 1b of your Schedule D. Once you've transferred all the information from Form 8949 to Schedule D, you can then fill out the remaining fields as described in the above section.

Having a Schedule D for the year means you won't be able to use Form 1040A or 1040EZ for your tax return. The final total from Schedule D, which appears on line 16 of this schedule if you had an overall gain for the year or line 21 if you had an overall loss, should be transferred to line 13 of your Form 1040. You can then complete the rest of your tax return -- and heave a sigh of relief that you're done messing around with taxes for another year.