# Capital Gains Tax Calculation Worksheet

Building a worksheet to calculate capital gains shows how the math works. It also illustrates how you can organize your investment data for tax purposes. Here's what you'll need to get started:

• One worksheet for each stock, bond, or other investment you have.
• Keep all the purchases on the left side.
• Order the purchases in chronological order from first to last.
• Keep all the sales transactions on the right side.
• Use formulas to calculate gain or loss using the data in the other cells if you use spreadsheet software.

### Key Takeaways

• Capital gains are short-term or long-term, depending on how long you owned the assets before selling them.
• Long-term tax rates are lower in most cases, set at 0%, 15%, or 20% as of 2022. Short-term gains are taxed according to your tax bracket for your ordinary income.
• You can offset capital gains with capital losses, which can provide another nice tax break, although certain rules apply.

## Worksheet 1: Simple Capital Gains Worksheet

Here we have a single transaction where 100 shares of XYZ stock were purchased. A second transaction then sold 100 shares of XYZ stock. There are no other investment purchases or sales. It's simple to match the sale with the purchase. We must organize the data. This comes from records or statements provided by the brokerage firm. Then, in the final column, we calculate the gain or loss.

The positive gain here is equal to the selling price, minus the buy price, minus the buy commission, minus the sale commission:

\$1,400 – \$1,200 – \$25 – \$25 = \$150

The investor made a profit of \$150 on this investment. Now let's move on to a more complicated scenario.

## Worksheet 2: Capital Gains Worksheet/Multiple Purchases

Here we're organizing data from multiple buy transactions. This individual invested XYZ stock, buying 100 shares in January and another 100 shares in February. They sold off 150 shares the following January.

The question is, Which shares did this person sell? Did they sell all 100 of the January shares plus 50 of the February shares? Was it 100 of the February shares and 50 of the January shares, or did they sell 75 shares from each lot? The IRS says that the basis of the shares works out to the purchase price plus the costs of purchase. Costs might include transfer fees and commissions.

So we have the purchase price plus the costs of purchase. These are the commissions organized in our worksheet in this case. The IRS indicates that their basis is the cost of the particular shares if you can identify those you sold. Otherwise, their basis would be the basis of those shares that you acquired first.

We would use these shares to calculate our capital gains if we had told our broker, "Sell these specific shares."

Our gain would look like this if we were to tell the broker to sell all 100 shares we bought in February, and 50 of the shares we bought in January:

\$2,100 – (\$1,225/100*50) – \$1,250 = \$225

We want to calculate the basis of 50 shares from the January purchase. We would take the cost basis of \$1,225, which includes the commission, then divide it by the number of shares purchased. This results in a cost per share. We would then multiply this by 50. This is the number of shares we sold, and it results in a basis of \$612.50.

Subtract the \$612.50 and the \$1,250 of basis from all 100 shares we bought in February. The resulting gain is \$225.

It's worksheet is just a matter of some simple spreadsheets and basic math.

But what if we didn't tell our broker to sell specific shares? The IRS indicates that we should use the first-in, first-out (FIFO) method in this case. Notice on the right side of the worksheet that we sold 150 shares. Then look to the left side. We first bought 100 shares, then we bought another 100 shares. We take the basis of the shares we acquired first, all 100 shares of the January purchase, with a cost basis of \$1,225.

So now we've identified the basis for 100 shares out of the 150 shares we sold. We'd move on to the securities purchase next. We need basis for only 50 shares. But the February purchase was for 100 shares. So we'll divide the February cost basis. Here's our formula for gain using the first-in, first-out method:

\$2,100 – \$1,225 – (\$1,250/100*50) = \$2,100 – \$1,225 – \$625 = \$250