Wealthy Habitat

Library · taxes · Published 10/13/2026 · Re-read against its sources 10/13/2026

cost basis methods: FIFO, specific ID, average cost

When you sell shares bought at different times, the cost basis method you pick determines your taxable gain.

In short

A friend of mine once sold some shares and could not tell me how much he had made. He had bought the same stock four times over the years, and every purchase carried a different price. If you are holding shares bought on different dates, the way you pick which ones you sold can change your tax bill. The IRS lets an investor choose among a few methods, and the default is first in, first out, or FIFO. Specific identification lets the seller name the exact shares, but the seller must tell the broker before the trade settles. Average cost applies only to mutual funds and a few other pooled holdings, and it has its own sign up steps. Check your broker's setting this week, because a quiet default may already be making the choice for you.

The whole of it

What it is

I once watched a neighbor try to sort a shoebox of receipts the night before the taxes were due. It was a hard evening for him. Cost basis is the same kind of bookkeeping, only for investments. Basis is, in plain terms, what you paid for something, including fees. When you sell, the gain or loss is the sale price minus the basis. If basis is wrong, the tax is wrong. That is the whole matter.

Here is the trouble. Say you bought shares in a fund on three different days at three different prices. When you sell only some of them, which ones did you sell? The tax law needs an answer. The answer is called a cost basis method, and there are three you will hear about. FIFO treats the oldest shares as the first ones sold. Specific identification lets you point to particular shares, or lots, and say those are the ones. Average cost blends all your purchases into one price per share. Each one is a different way to answer the same question, and each can give a different gain on the same sale.

How it works

You have probably noticed that brokers talk about lots. A lot is simply one purchase, with its own date, share count, and price. Think of each lot as a separate jar on the shelf.

Under FIFO, the oldest jar is emptied first. If no method is named, the IRS treats the shares sold as the earliest ones bought. This is the rule in Publication 550, the IRS guide on investment income and expenses. Because older shares often cost less, FIFO can produce a larger taxable gain in a rising market. It can also produce the opposite. It depends on the prices, not on any rule of thumb.

Specific identification works differently. The seller picks the jar. A person could choose the lots with the highest cost, which shrinks the gain, or the lots held longer than one year, which may qualify for the lower long term rates. The catch is paperwork. Under Treasury Regulation 1.1012-1(c), the seller must identify the shares to the broker at the time of the sale. A note made months later does not count. Most brokers let a customer set this up online, either lot by lot at each sale or as a standing instruction.

Average cost is the third path. A friend of mine called it the smoothie method, and I think that is fair. Every purchase is blended, and each share gets the same basis. The IRS allows this only for shares in a regulated investment company, which means most mutual funds, and a few similar holdings. It does not apply to individual stocks. The investor must also elect the method and keep using it for that fund unless the rules for changing are followed. Publication 550 explains the details.

One more piece matters. Since 2011, brokers have had to report basis to the IRS for most shares bought after certain dates. Form 1099-B carries those figures, and Form 8949 and Schedule D carry them into the return. The broker's report is a starting point, not a final word. The taxpayer still has to confirm it.

The numbers, and where to find yours

If you are wondering where your own figures live, start with your broker's website. Look for a page called cost basis, tax lots, or realized gains. It will list each lot with a date, a share count, and a price. Your year end Form 1099-B shows the same data for shares you sold.

Two numbers shape the tax itself. The first is the holding period line. Gains on assets held one year or less are taxed as ordinary income. Gains on assets held longer get long term rates, which are set by law and change over time. The long term capital gains rate brackets are the current figure, which the official source publishes each year. The second is the income level where the extra net investment income tax begins. That threshold is the current figure, which the official source publishes each year. Both come from IRS pages, and the site fills in the verified figures with the date.

For a fund, also look at your broker's default method. It is usually shown in your account settings under cost basis election. It may say FIFO, or average cost for funds, or something else. Write down what it says and the day you checked.

A worked example

Let me tell you about a woman named Marta. She bought shares of one stock fund in three steps. In January she bought 100 shares at $20, which cost $2,000. In June she bought 100 shares at $30, which cost $3,000. In October she bought 100 shares at $40, which cost $4,000. She holds 300 shares in all, with a total cost of $9,000.

Next spring, Marta sells 100 shares at $50 each. The sale brings in 100 shares at $50, which is $5,000. Now watch what each method does.

With FIFO, the January lot goes first. Her basis is $2,000. Her gain is $5,000 minus $2,000, which is $3,000.

With specific identification, Marta tells the broker to sell the October lot. Her basis is $4,000. Her gain is $5,000 minus $4,000, which is $1,000. She had to give that instruction when she placed the sale, not afterward.

With average cost, assuming this were a mutual fund and she had made the election, the blended price is $9,000 divided by 300 shares, which is $30 a share. Her basis for 100 shares is 100 times $30, or $3,000. Her gain is $5,000 minus $3,000, which is $2,000.

Same sale. Three gains. Notice the sale price never changed, and neither did the total Marta paid. Only the method moved the number. If the October lot was held under a year, that gain would be taxed as ordinary income, so the rate matters as well as the size. A good tax preparer or the IRS publications can help sort that out for a real return.

Where it goes wrong

I have seen smart people trip on this, and it is rarely a matter of intelligence. It is usually a missed step.

The most common slip is waiting too long. A seller who wants specific identification must tell the broker before the trade settles. Saying so at tax time is too late, and the broker's default stands. Another slip comes from reinvested dividends. Each reinvestment buys a few new shares, and each one is its own lot with its own basis. Forget them, and the basis comes out too low, which makes the gain look bigger than it was and the tax bigger too.

Transfers cause trouble as well. When shares move from one broker to another, the basis should travel with them. Sometimes it does not. The new broker may show a blank, and the investor has to rebuild it from old statements. Keep those statements. Gifts and inherited shares have their own basis rules, which Publication 551 covers.

A neighbor of mine once sold a losing stock and bought it back a week later, then wondered why his loss looked smaller. That is the wash sale rule at work. The IRS explains it in Publication 550, and it reaches a loss on shares bought again too close to the sale. The disallowed loss is not simply gone, since it moves into the basis of the new shares. Many brokers watch for wash sales inside a single account, though their practices differ. Purchases made in other accounts may not be caught by that tracking, so the taxpayer is the one responsible for the full picture.

And average cost is not a free pass. Once it is chosen for a fund, the investor cannot hop in and out of it at will. Read Publication 550 before switching.

Questions to answer before you leave this page

Do you know which cost basis method your broker uses for each account right now, and the date you last checked? If you hold mutual funds, have you made an average cost election, or is FIFO quietly doing the work? When did you last compare the lots on your broker's page with your own purchase records? Have your reinvested dividends been counted as separate lots with their own cost? If you moved shares between brokers, did the basis arrive with them? Would specific identification save you tax this year, and if so, do you know how to place that instruction before the sale settles? And is there a tax preparer, or an IRS publication, you plan to lean on when the form comes?

Sources

irs.gov · read 10/13/2026
irs.gov · read 10/13/2026
irs.gov · read 10/13/2026

Each figure on this page was found, word for word, on the official page beside it, on the date shown, and is read again on a schedule. A figure that changes on its page comes down until the page is rewritten.

Related

how to read a brokerage statement
dividends and distributions
gifting appreciated stock
charitable giving with appreciated stock

Was this useful? Counted, never signed.

Ask about this guide

A model reads this page and answers from it. It will say when the answer is not on the page. Education, not personalized advice.

Written by the site's growth engine and checked by its gates: voice, law and ethics, facts, arithmetic, and sources. Not yet read by a human editor; every page carries the correction process. Rules and dollar limits change every year; figures come from the rules table with their source and date.