Skip to content

Investment Income and Expenses›2025 Returns›4. Sales and Trades of Investment Property

How To Figure Gain or Loss

2025 Publ 550 (PDF) · 2026-10-03 edition · updated 2026-10-04 · United States

You figure gain or loss on a sale or trade of property by subtracting the adjusted basis of the property from the amount you realize on the sale or trade.

Note: If you own and use a digital asset for personal or investment purposes, the income would be taxed as a capital gain or loss when you sell or dispose it. To calculate the capital gain or loss of a digital asset that you sold or disposed of in a transaction, you'll need this information:

  • Type of digital asset;

  • Date and time of transaction;

  • Number of units;

  • Fair Market value at time of transaction (as measured in U.S. dollars); and

  • Basis of digital asset sold or disposed of.

To find how to calculate gain or loss, identify the units sold or disposed, and determine fair market value for your situation, go to FAQs on virtual currency transactions.

Gain. If the amount you realize from a sale or trade is more than the adjusted basis of the property you transfer, the difference is a gain.

Loss. If the adjusted basis of the property you transfer is more than the amount you realize, the difference is a loss.

Amount realized. The amount you realize from a sale or trade of property is everything you receive for the property minus your expenses related to the sale (such as redemption fees, sales commissions, sales charges, or exit fees). Amount realized includes the money you receive plus the fair market value of any property or services you receive.

If you finance the buyer's purchase of your property and the debt instrument does not provide for adequate stated interest, the unstated interest that you must report as ordinary income will reduce the amount realized from the sale. For more information, see Pub. 537.

If a buyer of property issues a debt instrument to the seller of the property, the amount realized is determined by reference to the issue price of the debt instrument, which may or may not be the fair market value of the debt instrument. See Regulations section 1.1001-1(g). However, if the debt instrument was previously issued by a third party (one not part of the sale transaction), the fair market value of the debt instrument is used to determine the amount realized.

Fair market value. Fair market value is the price at which property would change hands between a buyer and a seller, neither being forced to buy or sell and both having reasonable knowledge of all the relevant facts.

Example. You trade A Company stock with an adjusted basis of $7,000 for B Company stock with a fair market value of $10,000, which is your amount realized. Your gain is $3,000 ($10,000 – $7,000). If you also receive a note for

66 Chapter 4 Sales and Trades of Investment Property Publication 550 (2025)

$6,000 that has an issue price of $6,000, your gain is $9,000 ($10,000 + $6,000 – $7,000).

Debt paid off. A debt against the property, or against you, that is paid off as a part of the transaction or that is assumed by the buyer must be included in the amount realized. This is true even if neither you nor the buyer is personally liable for the debt. For example, if you sell or trade property that is subject to a nonrecourse loan, the amount you realize generally includes the full amount of the note assumed by the buyer even if the amount of the note is more than the fair market value of the property.

Example. You sell stock that you had pledged as security for a bank loan of $8,000. Your basis in the stock is $6,000. The buyer pays off your bank loan and pays you $20,000 in cash. The amount realized is $28,000 ($20,000 + $8,000). Your gain is $22,000 ($28,000 – $6,000).

Payment of cash. If you trade property and cash for other property, the amount you realize is the fair market value of the property you receive. Determine your gain or loss by subtracting the cash you pay and the adjusted basis of the property you trade in from the amount you realize. If the result is a positive number, it is a gain. If the result is a negative number, it is a loss.

No gain or loss. You may have to use a basis for figuring gain that is different from the basis used for figuring loss. In this case, you may have neither a gain nor a loss. See No gain or loss in the discussion on the basis of property you received as a gift under Basis Other Than Cost, earlier.

Special Rules for Mutual Funds

To figure your gain or loss when you dispose of mutual fund shares, you need to determine which shares were sold and the basis of those shares. If your shares in a mutual fund were acquired all on the same day and for the same price, figuring their basis is not difficult. However, shares are generally acquired at various times, in various quantities, and at various prices. Therefore, figuring your basis can be more difficult. You can choose to use either a cost basis or an average basis to figure your gain or loss.

Cost Basis

You can figure your gain or loss using a cost basis only if you did not previously use an average basis for a sale, exchange, or redemption of other shares in the same mutual fund.

To figure cost basis, you can choose one of the following methods.

  • Specific share identification.

  • First-in first-out (FIFO).

Specific share identification. If you adequately identify the shares you sold, you can use the adjusted basis of those particular shares to figure your gain or loss.

You will adequately identify your mutual fund shares, even if you bought the shares in different lots at various prices and times, if you:

  1. Specify to your broker or other agent the particular shares to be sold or transferred at the time of the sale or transfer, and

  2. Receive confirmation in writing from your broker or other agent within a reasonable time of your specification of the particular shares sold or transferred.

You continue to have the burden of proving your basis in the specified shares at the time of sale or transfer.

FIFO. If your shares were acquired at different times or at different prices and you cannot identify which shares you sold, use the basis of the shares you acquired first as the basis of the shares sold. In other words, the oldest shares you own are considered sold first. You should keep a separate record of each purchase and any dispositions of the shares until all shares purchased at the same time have been disposed of completely.

Table 4-2 illustrates the use of the FIFO method to figure the cost basis of shares sold, compared with the use of the average basis method (discussed next).

Average Basis

You can use the average basis method to determine the basis of shares of stock if the shares are identical to each other, you acquired them at different times and different prices and left them in an account with a custodian or agent, and either:

  • They are shares in a mutual fund (or other regulated investment company);

  • They are shares you hold in connection with a DRIP, and all the shares you hold in connection with the DRIP are treated as covered securities (defined later); or

  • You acquired them after 2011 in connection with a DRIP.

Average basis is determined by averaging the basis of all shares of identical stock in an account regardless of how long you have held the stock. However, shares of stock in a DRIP are not identical to shares of stock with the same CUSIP number that are not in a DRIP. The basis of each share of identical stock in the account is the aggregate basis of all shares of that stock in the account divided by the aggregate number of shares.

Transition rule from double-category method. You may no longer use the double-category method for figuring your average basis. If you were using the double-category method for stock you acquired before April 1, 2011, and you sell, exchange, or otherwise dispose of that stock on or after April 1, 2011, you must figure the average basis of this stock by averaging together all identical shares of stock in the account on April 1, 2011, regardless of the holding period.

Publication 550 (2025) Chapter 4 Sales and Trades of Investment Property 67

Election of average basis method for covered securi- ties. To make the election to use the average basis method for your covered securities, you must send written notice to the custodian or agent who keeps the account. The written notice can be made electronically. You must also notify your broker that you have made the election. Generally, a covered security is a security you acquired after 2010, with certain exceptions explained in the Instructions for Form 8949.

You can make the election to use the average basis method at any time. The election will be effective for sales or other dispositions of stocks that occur after you notify the custodian or agent of your election. Your election must identify each account with that custodian or agent and each stock in that account to which the election applies. The election can also indicate that it applies to all accounts with a custodian or agent, including accounts you later establish with the custodian or agent.

Election of average basis method for noncovered se- curities. For noncovered securities, you elect to use the average basis method on your income tax return for the first tax year that the election applies. You make the election by showing on your return that you used the average basis method in reporting gain or loss on the sale or other disposition.

Revoking the average basis method election. You can revoke an election to use the average basis method for your covered securities by sending written notice to the custodian or agent holding the stock for which you want to revoke the election. The election must generally be revoked by the earlier of 1 year after you make the election or the date of the first sale, transfer, or disposition of the stock following the election. The revocation applies to all the stock you hold in an account that is identical to the shares of stock for which you are revoking the election. Once revoked, your basis in the shares of stock to which the revocation applies is the basis before averaging.

Tip: You may be able to find the average basis of your shares from information provided by the fund.

Average basis method illustrated. Table 4-2 illustrates the average basis method of shares sold, compared with the use of the FIFO method to figure cost basis (discussed earlier).

Even though you include all unsold shares of identical stock in an account to figure average basis, you may have both short-term and long-term gains or losses when you sell these shares. To determine your holding period, the shares disposed of are considered to be those acquired first.

Example. You bought 400 identical shares in the LJO Mutual Fund: 200 shares on May 13, 2024, and 200 shares on May 17, 2025. On November 18, 2025, you sold 300 shares. The basis of all 300 shares sold is the same, but you held 200 shares for more than 1 year, so your gain or loss on those shares is long-term. You held 100 shares for 1 year or less, so your gain or loss on those shares is short-term.

How to figure the basis of shares sold. To figure the basis of shares you sell, use the steps in the following worksheet.

  1. Enter the total adjusted basis of all the shares you owned in the fund just before the sale. (If you made an earlier sale of shares in this fund, add the adjusted basis of any shares you still owned after the last sale and the adjusted basis of any shares you acquired after that sale.) . . . . . . . . . . . . . . . $

  2. Enter the total number of shares you owned in the fund just before the sale . . . . . . . . . . . . . . . . . .

  3. Divide the amount on line 1 by the amount on line 2. This is your average basis per share . . . . . . . . . $

  4. Enter the number of shares you sold . . . . . . . . . .

  5. Multiply the amount on line 3 by the amount on line 4. This is the basis of the shares you sold . . $

Example 1. You bought 300 identical shares in the LJP Mutual Fund: 100 shares in 2021 for $1,000 ($10 per share); 100 shares in 2022 for $1,200 ($12 per share); and 100 shares in 2023 for $2,600 ($26 per share). Thus, the total cost of your shares was $4,800 ($1,000 + $1,200

  • $2,600). On May 6, 2025, you sold 150 shares. The basis of the shares you sold is $2,400 ($16 per share), figured as follows.
  1. Enter the total adjusted basis of all the shares you owned in the fund just before the sale. (If you made an earlier sale of shares in this fund, add the adjusted basis of any shares you still owned after the last sale and the adjusted basis of any shares you acquired after that sale.) . . . . . . . . . . . . . . $4,800

  2. Enter the total number of shares you owned in the fund just before the sale . . . . . . . . . . . . . . . . . 300

  3. Divide the amount on line 1 by the amount on line 2. This is your average basis per share . . . . . . . . $ 16

  4. Enter the number of shares you sold . . . . . . . . . 150

  5. Multiply the amount on line 3 by the amount on line 4. This is the basis of the shares you sold . . $2,400

Remaining shares. The average basis of the shares you still hold after a sale of some of your shares is the same as the average basis of the shares sold. The next time you make a sale, your average basis will still be the same, unless you have acquired additional shares (or have made a subsequent adjustment to basis).

Example 2. The facts are the same as in Example 1, except that you sold an additional 50 shares on December 9, 2025. You do not need to refigure the average basis of the 150 shares you owned at that time because you acquired or sold no shares, and had no other adjustments to basis, since the last sale. Your basis is the $16 per share figured earlier.

Example 3. The facts are the same as in Example 1, except that you bought an additional 150 identical shares at $14 per share on September 9, 2025, and then sold 50 shares on December 9, 2025. The total adjusted basis of

68 Chapter 4 Sales and Trades of Investment Property Publication 550 (2025)

Table 4-2. Example of How To Figure Basis of Shares Sold

This is an example showing two different ways to figure basis. It compares the cost basis using the FIFO method with the average basis method.

Date Action Share Price No. of Shares Total Shares Owned

2/10/2023 Invest $4,000 $25 160 160

8/11/2023 Invest $4,800 $20 240 400

12/15/2023 Reinvest $300 dividend $30 10 410

10/2/2025 Sell 210 shares for $6,720

$32 210 200

COST BASIS (FIFO)

To figure the basis of the 210 shares sold on 10/2/2025, use the share price of the first 210 shares you bought, namely the 160 shares you purchased on 2/10/2023 and 50 of those purchased on 8/11/2023.

$4,000 (cost of 160 shares on 2/10/2023)

  • $1,000 (cost of 50 shares on 8/11/2023)

Basis = $5,000

AVERAGE BASIS To figure the basis of the 210 shares sold on 10/2/2025, use the average basis of all 410 shares owned on 10/2/2025.

$9,100 (cost of 410 shares)

÷ 410 (number of shares)

$22.20 (average basis per share)

$22.20

× 210

Basis = $4,662

all the shares you owned just before the sale is $4,500, figured as follows.

  1. Basis of remaining shares ($16 x 150) . . . . . . . . $2,400
  2. Cost of shares acquired on 9/9/2025 ($14 x
  1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . $2,100
  1. Total adjusted basis of all shares owned ($2,400 + $2,100) . . . . . . . . . . . . . . . . . . . . . . . . . . . $4,500

The basis of the shares sold is $750 ($15 per share), figured as follows.

  1. Enter the total adjusted basis of all the shares you owned in the fund just before the sale. (If you made an earlier sale of shares in this fund, add the adjusted basis of any shares you still owned after the last sale and the adjusted basis of any shares you acquired after that sale.) . . . . . . . . . . . . . . $4,500

  2. Enter the total number of shares you owned in the fund just before the sale . . . . . . . . . . . . . . . . . 300

  3. Divide the amount on line 1 by the amount on line 2. This is your average basis per share . . . . . . . . $ 15

  4. Enter the number of shares you sold . . . . . . . . . 50

  5. Multiply the amount on line 3 by the amount on line 4. This is the basis of the shares you sold . . $ 750

Shares received as gift. If your account includes shares that you received by gift, and the fair market value of the shares at the time of the gift was not more than the

donor's basis, special rules apply. You cannot choose to use the average basis for the account unless you state in writing that you will treat the basis of the gift shares as the fair market value at the time you acquire the shares. You must provide this written statement when you make the election to use the average basis method, as described under Election of average basis method for covered se- curities and Election for average basis method for noncov- ered securities , earlier, or when you transfer the gift shares to an account for which you have made the aver- age basis method election, whichever is later. The statement must be effective for any gift shares identical to the gift shares to which the average basis method election applies that you acquire at any time and must remain in effect as long as the election remains in effect.

Note: Your basis in virtual currency received as a bona fide gift differs depending on whether you will have a gain or a loss when you sell or dispose of it. For purposes of determining whether you have a gain, your basis is equal to the donor’s basis, plus any gift tax the donor paid on the gift. For more information on basis of property received as a gift, see Pub. 551, or go to IRS.gov/ DigitalAssets .

Publication 550 (2025) Chapter 4 Sales and Trades of Investment Property 69

Get a plain-English answer with a citation back to this text.

Ask AI about this code
▸Contents — 2025 Publ 550 (PDF)

GoCodebook provides public access, search, citation, multilingual explanation, and practical interpretation of legally adopted building regulations. It is not a substitute for the official ICC or California code publications.