In this lesson
- §1 — "What's my basis?" — the fear, set down
- §2 — The three methods: FIFO, specific ID, and average cost
- §3 — The same sale, three methods, three tax bills
- §4 — Where your basis comes from: covered, non-covered, and basis you didn't buy
- §5 — Choosing (and electing) your method at sale
- Scam Radar: the "we'll fix your cost basis" hustle — and the temptation to fix it yourself
- If you already sold — and the basis wasn't handled the way you'd want
- The Advisor's Move, Decoded — "We'll manage your tax lots for you"
- Reassurance
- Common questions
- Check yourself
- Glossary
Cost basis tracking — FIFO, specific ID, and average cost
Your cost basis is just what you paid — the number your gain is measured against. When you've bought the same thing more than once, which shares you're treated as selling sets that basis, and basis sets the tax. That choice is a lever most investors never touch — and it's yours.
What you'll learn
- Define cost basis as what you paid, and identify what adjusts it — purchase costs and reinvested dividends raise it, a return of capital lowers it — so only your true profit is ever taxed.
- Distinguish FIFO, specific identification, and average cost, and pick the method that yields the smallest taxable gain when you sell only part of a multi-lot position.
- Execute a specific-identification election correctly by naming your lots to the broker at or before settlement (now one business day) and keeping the written confirmation — before the deadline that locks in FIFO.
- Tell a covered security from a non-covered one, and know when the broker reports your basis versus when reconstructing and documenting it is your job.
- Determine your basis on shares you didn't buy — a step-up to date-of-death value for inherited shares, and a carryover of the giver's basis for gifted shares.
§1 — "What's my basis?" — the fear, set down
Here is a small panic that arrives the first time you sell. You log in to sell some shares — to raise cash, to rebalance, to trim something that grew too large — and the screen asks you a question you've never been asked before, about "cost basis" or "tax lots" or which "method" to use, with a dropdown you don't understand. Or you sell, and weeks later a form shows up with a gain on it, and you have no idea where the number came from or whether it's even right. Three worries tend to land at once. The first: I sold some shares and I have no idea what my "basis" even is. The second: did I just trigger a bigger tax bill than I had to? The third, quietly the worst: the broker picks for me — am I just stuck with whatever it decides? This lesson is about turning all three from a source of dread into a place where you actually hold the controls.
Let's shrink each worry now, before we teach anything, because each is smaller than it feels. First, your basis is not a mystery — it's simply what you paid for the investment, the number the tax is measured against (we met cost basis back in Lesson 25, and used it in Lesson 38: your gain is the sale price minus your basis). Second, the bigger-bill fear has it exactly backwards: when you've bought the same fund more than once at different prices, you usually get to choose which shares you're treated as selling — and that choice can make your taxable gain, and the tax on it, several times smaller. Third, you are not stuck with the broker's pick. The broker has a default, yes, but you can change it, and on most sales you can hand-pick the exact shares to sell right on the order screen. The thing you were afraid of — that the computer decides your tax for you — is actually one of the few places in the tax code where you, not the computer, get to decide.
Three threads make this concrete. Maya Chen — the 24-year-old Seattle software engineer you've followed since she opened her first brokerage account — carries the heart of the lesson: she's about to sell part of an index fund she's been buying for years, and she's standing at the "choose your tax lots" screen for the very first time. The same 80-share sale, we'll see, can hand her a tax bill of $720, $387, or $213 depending only on which method picks the shares — and she's going to learn to choose. Marcus and Priya Williams — the Build-Along family — give us the document side: their brokerage's cost-basis report, the lot-by-lot statement that shows what you paid, what it's worth, and the one column most people have never noticed ("covered" or not) that decides whether the IRS already has your basis or whether keeping it is your job. And around the edges we'll meet basis that arrived a different way — shares you inherited, shares you were given — because not all basis comes from a purchase, and the rules differ in ways worth knowing before you sell.
This sits in the middle of Phase 6, the taxes phase, and it completes a pair with the rate lesson earlier in this phase. Lesson 38 taught the rate — how a capital gain is taxed once you have one (the 0/15/20% long-term brackets). This lesson teaches the other half of that same equation: the basis the rate is applied to. Rate times gain is your tax, and your gain is proceeds minus basis — so getting the basis right, and choosing it well, is every bit as consequential as the rate. We'll stay in our lane: the rates themselves are Lesson 38 (we'll borrow Maya's 15% only to put a dollar figure on things), the wash-sale rule and harvesting losses on purpose are Lesson 39 (we'll only touch how a wash sale changes your basis), and the actual tax form your broker sends — the 1099-B that reports all of this — is Lesson 43. What this lesson owns, and teaches in full: what your basis is, the three methods for deciding which shares you sold, and how to make that choice work for you instead of against you.
Before any methods, we settle the first fear: that "cost basis" is some opaque number only an accountant could know. It isn't. It's one of the plainest ideas in investing, and once you see what it is and where it lives, the rest of the lesson is just learning to use it. Two things to get straight here: what basis actually is (and what counts toward it), and the one structural fact — that your shares come in separate batches called lots — that turns basis from a single number into a choice.
§1.1 — Your basis is just what you paid (plus a couple of things people miss)
Cost basis is what you paid for an investment — your own money that went in, the number your eventual gain is measured against. When you sell, the tax looks only at the difference: the amount you sell for (your proceeds) minus your cost basis equals your capital gain, and only that gain is ever taxed. The original money you put in was already taxed once, when you earned it; it doesn't get taxed again on the way out. So the whole job of "tracking basis" is just keeping an honest record of what you paid, so that when you sell, only the actual profit is counted. If Maya paid $5,600 for some shares and sells them for $10,400, her basis is $5,600 and her gain is $4,800 — the tax touches the $4,800, never the $5,600 she put in.
Two additions to "what you paid" catch people, and both work in your favor by making your basis bigger (a bigger basis means a smaller gain, which means less tax). First, the costs of buying count: a commission or transaction fee you paid to buy, or a mutual fund's sales charge (a "load"), are added to your basis. Second — and this is the one almost everyone forgets — reinvested dividends add to your basis. If your dividends are set to automatically buy more shares (a dividend reinvestment plan, or DRIP, which simply means each dividend is plowed back into more shares instead of paid out as cash), every one of those reinvestments is money you invested, so it adds to your basis. Here's why that matters so much: that dividend was already taxed in the year you received it (it showed up on a 1099-DIV whether you took the cash or not), so adding it to your basis is exactly what stops you from being taxed on it a second time when you sell. The person who forgets this — who treats their basis as only the original purchase and ignores years of reinvested dividends — quietly overstates their gain and overpays. Reinvested dividends are basis. Don't leave them out.
One adjustment runs the other way, named here just so it doesn't surprise you: a return of capital. Occasionally a fund pays out a distribution that isn't income at all but a return of some of your own principal (it shows up in a specific box on your 1099-DIV). That isn't taxed as it's paid; instead it reduces your basis — because the fund is handing back money you put in, so your remaining investment in it is smaller. You don't need to do anything but know the direction: most things (purchases, reinvested dividends) raise your basis; a return of capital lowers it. The figure that results after every such adjustment has a name — your adjusted basis — and it's the real number your gain is measured against. For the rest of this lesson, when we say "basis," we mean that adjusted number: everything you put in, tracked honestly.
And here is the reassurance the first fear most needs: for almost everything you've bought in recent years, you are not tracking this alone. Since rules that phased in starting in 2011, your broker is required to track the basis of most of what you buy and report it to you (and to the IRS) when you sell. So the dread of "I have no records, I'll never figure out what I paid" is, for modern purchases, mostly unfounded — the number is sitting right there in your account, on a screen usually labeled "cost basis" or "unrealized gains." The cases where it really is your job to keep the record are older or transferred holdings, and we'll name exactly which ones in §4 (that's the "covered vs. non-covered" distinction). For now: basis is what you paid, the broker mostly keeps it for you, and the number is findable.
§1.2 — The hinge of the whole lesson: your shares come in lots
Now the one structural fact that turns basis from a number into a decision. When you buy an investment more than once — a little every payday, say, plus reinvested dividends — you don't end up with one big undifferentiated pile of shares. You end up with a stack of separate batches, each bought on its own date at its own price. Each batch is called a tax lot (or just a "lot"): a specific block of shares with its own purchase date and its own cost basis. Buy 80 shares in 2023 at $70, another 70 in 2024 at $95, and so on, and you're holding several lots, each with a different basis — even though they're all "the same fund" sitting in one position on your screen.
Meet Maya's actual position, because it's the example the whole lesson runs on. Over about three and a half years, Maya has been steadily buying shares of a broad index fund — a total US stock market index fund — in her taxable brokerage account, with dividends reinvesting along the way. Today she holds 240 shares, now priced at $130 each (worth $31,200), and they came in four lots: Lot 1, her oldest, 80 shares bought at $70; Lot 2, 70 shares at $95; Lot 3, 60 shares at $118; and Lot 4, her most recent, 30 shares bought just months ago at $138 — which, at today's $130, is actually sitting at a small loss. One position on her screen; four very different lots underneath it, with basis ranging from $70 to $138 a share.
Sit with why that matters, because it's the entire engine of this lesson. Maya wants to sell some — not all — of her shares. The moment she sells only part of a position made of different-priced lots, a question appears that has no single answer: which shares did she sell? Did she sell the $70 shares (a huge gain) or the $118 shares (a small one) or the $138 shares (a loss)? They're all "her fund," but the tax depends entirely on which ones the sale is matched against. That matching — the rule that decides which lots a partial sale comes out of — is what a cost-basis method is. There are three of them, and choosing among them is choosing your tax. That's §2.
§2 — The three methods: FIFO, specific ID, and average cost
When you sell part of a position built from several lots, exactly one of three methods decides which lots you're treated as selling — and therefore what your basis, and your gain, will be. They are FIFO (the default), specific identification (the one that hands you the controls), and average cost (a fund-only middle path). Each is a different answer to the same question — "which shares did I just sell?" — and the difference between them, on the very same sale, can be hundreds or thousands of dollars. We'll take them one at a time, on Maya's four lots, and then in §3 watch all three play out on a single sale.
§2.1 — FIFO: the default, and what it quietly does
FIFO stands for first-in, first-out, and it's the simplest rule there is: the first shares you bought are treated as the first shares you sell. It's also the IRS's default — the method that applies automatically if you don't tell your broker otherwise, the fallback when shares aren't specifically identified. Do nothing, click sell, and FIFO is almost certainly what happens. For Maya, FIFO means a sale comes out of Lot 1 first — her oldest 80 shares, the ones she bought at $70. Sell 80 shares and FIFO empties Lot 1: basis $5,600, and at today's $130 that's a $4,800 gain.
Here's the double edge of the default, and it's worth being fair about because FIFO is not simply "the bad one." In a market that has risen, your oldest shares are usually your cheapest shares — the lowest basis, and therefore the biggest gain. So FIFO, left alone, tends to realize the largest taxable gain available, which is the case against it. But those same oldest shares are also the ones you've held longest, so they're the most likely to qualify for the gentle long-term rate (the more-than-a-year holding period from Lesson 38) rather than the harsh short-term one. FIFO isn't a villain; it's just a blunt rule that doesn't know or care about your tax situation. It picks by age, full stop. Sometimes that's fine. The point of knowing it's the default is so that when it's not fine, you do something about it.
§2.2 — Specific identification: the method that hands you the controls
Specific identification — "specific ID" for short — is the method where you, not a rule, choose the exact lots to sell. Instead of letting age decide, you tell the broker: sell these particular shares, the ones I bought on this date at this price. This is the tax-smart method, the one this whole lesson is pointing at, because it's the one that gives you control over your gain. Want the smallest possible gain this year? Sell your highest-basis lots — the shares you paid the most for, which have the least profit baked in. Want to harvest a loss? Pick a lot that's underwater. Specific ID lets you do either, because you're choosing the basis you sell against.
Because it's so powerful, the IRS attaches a precise pair of requirements, and getting them right is what makes the election stick. Specific identification is a two-part test. First, you must identify the specific lots to your broker at the time of the sale — at or before the sale settles. (Settlement now happens one business day after the trade, so in practice the safe move is to choose your lots right when you place the order; don't leave it.) Second, the broker must give you written confirmation of which lots you sold — which the trade confirmation or your account statement provides. Both halves are required. And here's the part that bites people who learn it too late: you cannot pick your lots after the fact on your tax return. If you didn't identify them to the broker by the deadline, FIFO applies, and that's final — the courts have backed the IRS on this. So specific ID is a choice you make at the moment of selling, not a cleanup you do in April. We'll watch Maya make exactly this choice, on the actual screen, in §3.
§2.3 — Average cost: the fund-only middle path (and the trap inside it)
The third method, average cost, does what its name says: it blends all your shares of a fund into a single average basis per share. Add up everything you paid across every lot, divide by your total shares, and that average becomes the basis of every share — so it doesn't matter which ones you "sell," they all carry the same number. For Maya's 240 shares, the total cost is $23,470, so the average is about $97.79 a share — a single tidy basis instead of four different ones. Average cost is the comfortable, no-decisions option, and that's both its appeal and its catch.
Two things make average cost different from the other two, and you have to know both. First, it's not available for everything: average cost can only be used for fund-type holdings — mutual funds and most ETFs (the technical category is a "regulated investment company," which the great majority of both are) — and for shares held in a dividend-reinvestment plan (DRIP). It is not available for ordinary individual stocks. In practice, the place you'll actually meet average cost is mutual funds: brokers commonly default an ETF to FIFO and may not even surface average cost for it, and for an ETF specific ID is usually the better choice anyway. Maya's holding is a mutual fund, which is exactly where average cost tends to be the quiet default. Second — and this is the trap — average cost is often the default at fund companies, so a lot of people end up using it without ever choosing it, and it is sticky. Once you've used average cost to figure the gain on a sale of a fund's shares, you're generally locked into it for the shares you held at that point: you can change to another method only going forward, for shares you buy later, and the shares you already averaged stay averaged — you can't get their individual lot bases back. (There's a narrow window to undo the election entirely — only before your first sale and within a year — after which it's permanent for those shares.) The lesson here is not that average cost is bad; for someone who never wants to think about lots, it's perfectly reasonable. The lesson is that it quietly closes the door specific ID keeps open, so you want to choose it on purpose, not back into it.
§3 — The same sale, three methods, three tax bills
Now we put all three methods on one sale and watch them diverge, because this is where the abstract becomes a number you'd actually care about. The setup is deliberately simple: the same investor, the same shares, the same day, the same cash raised — and three different tax bills, chosen only by which method decides which shares she sold. This is the payoff the whole lesson has been building toward, and it's the clearest possible proof that the method is a lever, not a formality.
§3.1 — Maya's sale: which 80 shares?
Maya needs to raise about $10,400 — she's funneling some taxable-account money toward a near-term goal — so she's going to sell 80 of her 240 shares at today's $130 price. That part is decided. What isn't decided, and what she's never had to think about before, is which 80. All 240 are "her fund," but they sit in four lots with bases from $70 to $138 a share, so the 80 she's treated as selling determines her basis, and her basis determines her gain, and her gain determines her tax. She's single, she's in Washington (no state income tax), and from Lesson 38 we know her income puts long-term gains in the 15% bracket with no surtax — so every dollar of gain here costs her 15 cents. Watch what the method choice does to how many of those dollars there are.
The same sale of 80 shares of Maya's index fund for the same $10,400, shown under three cost-basis methods, with three different taxable gains and three different tax bills. Under FIFO, the default, the broker sells her oldest 80 shares — Lot 1, bought at $70 — for a cost basis of $5,600, a taxable gain of $4,800, and $720 of tax at her 15 percent long-term rate. Under average cost, available for mutual funds, all 240 shares are averaged to $97.79 each, giving an $7,823 basis on the 80 shares, a $2,577 gain, and $387 of tax. Under specific identification, Maya picks her highest-basis lots — all of Lot 3 plus 20 shares of Lot 2 — for an $8,980 basis, a $1,420 gain, and just $213 of tax. The sale is identical in every case; only the method, which decides which shares she is treated as selling, changes the gain and the tax. Choosing specific identification saves her $507 over the FIFO default.
§3.2 — Three methods, three gains, three bills
Walk the three columns, because each is just basis arithmetic on the same $10,400 sale. Under FIFO, the default, the sale comes out of Lot 1 — her oldest 80 shares at $70 — for a basis of $5,600 and a gain of $4,800; at 15% that's $720 of tax. Under average cost, all 240 shares are blended to $97.79 each, so the 80 shares carry a basis of $7,823, a gain of $2,577, and $387 of tax. And under specific identification, Maya picks her highest-basis lots — all 60 shares of Lot 3 (bought at $118) plus 20 shares of Lot 2 (bought at $95) — for a basis of $8,980, a gain of just $1,420, and $213 of tax. Same 80 shares sold. Same $10,400 in her pocket. The taxable gain is $4,800, $2,577, or $1,420, and the tax is $720, $387, or $213 — and the only thing that changed was the answer to "which shares did I sell?"
The reason the spread is so wide is exactly the lot structure from §1. FIFO reaches for the $70 shares — the cheapest, with the most gain piled into them — so it produces the biggest bill. Average cost lands in the middle by construction, because an average sits between the extremes. Specific ID reaches for the most expensive shares she owns — the $118 and $95 lots, the ones with the least profit — so it produces the smallest. (Reaching for your highest-cost shares first this way is common enough to have a nickname — HIFO, for highest-in, first-out — though it's really just one way of using specific identification.) The difference between the default and the deliberate choice here is $507 of tax ($720 down to $213), on a routine sale, for the price of a few clicks. That $507 isn't a trick or a loophole; it's the plain consequence of choosing to sell the shares with less gain in them and leave the shares with more gain alone.
§3.3 — Maya at the "choose your tax lots" screen
Here is where the decision stops being theory. When Maya places her sell order, her brokerage shows her the screen below — the "select tax lots" view, where she can either accept the default or hand-pick the shares. This is specific identification as it actually looks: a list of her lots, each with its date, its basis, the gain it would realize, and a box to choose how many shares to sell from it. She's selling 80, and instead of letting FIFO grab her oldest $70 shares, she selects her highest-basis lots — all of Lot 3 and 20 shares of Lot 2 — and watches the estimated gain land at $1,420.
A brokerage trade-ticket screen at Meridian Invest titled "Select tax lots to sell." Maya is selling 80 shares of her index fund at $130.00 a share. Instead of letting the default FIFO method sell her oldest, lowest-basis shares, she chooses which lots to sell. The screen lists four lots: Lot 1 from March 2023, 80 shares with a $70 basis and a $60-per-share gain, long-term, flagged as what FIFO would sell first, not selected; Lot 2 from November 2023, 70 shares with a $95 basis and a $35 gain, long-term, with 20 shares selected; Lot 3 from December 2024, 60 shares with a $118 basis and a $12 gain, long-term, fully selected; and Lot 4 from January 2026, 30 shares with a $138 basis now at an $8-per-share loss, short-term, not selected but flagged as a loss that could be harvested. By selecting all 60 shares of Lot 3 and 20 shares of Lot 2 — her highest-basis lots — Maya sells exactly 80 shares for an estimated taxable gain of $1,420 and about $213 of tax, versus the $4,800 gain and $720 of tax the FIFO default would have produced. A note reminds her that specific lots must be selected before the trade is placed, with written confirmation from the broker.
Notice what Maya is really doing on that screen, because it's smarter than just "pick the smaller number." She's selling the shares with the least gain and deliberately keeping Lot 1 — her oldest, cheapest, $70 shares — untouched. That's not avoidance; it's good sequencing. The big gain locked inside Lot 1 doesn't go away, but by not selling those shares she keeps that gain unrealized, which means she keeps deciding when (or whether) it's ever taxed. She might hold those shares for a low-income year when the gain is taxed at 0% (the gain-harvesting idea from Lesson 38), or hold them for life, in which case her heirs would inherit them at a stepped-up basis and the gain would be wiped out entirely (that's Lesson 61). Specific ID isn't only about this year's bill — it's about choosing which gains to realize now and which to hold for a better moment.
Two honest cautions, so this stays a tool and not a fixation. First, the same warning that runs through all of Phase 6: don't let the tax tail wag the dog. Choosing your lots is close to free, so do it — but the shares you keep still carry their gain; you've deferred tax, not erased it, and that deferred gain comes due whenever you eventually sell those low-basis shares. Specific ID is real money and worth the clicks, but it's a sequencing advantage, not a magic eraser. Second, a subtlety worth holding: sometimes the highest-basis lot isn't the smartest pick. A higher-basis lot you bought recently might still be short-term (taxed at your ordinary rate), while a slightly lower-basis lot you've held over a year is long-term (taxed at the gentle 0/15/20%). Picking purely by basis could hand you a smaller gain at a worse rate. The genuinely tax-smart move weighs both basis and holding period together — which is exactly what the broker "tax optimizer" tools in §5 try to do for you. For Maya here, the lots she picked are all long-term, so basis is the whole story; just know that in general, the two levers — basis and holding period — work together.
§4 — Where your basis comes from: covered, non-covered, and basis you didn't buy
Maya's case was the clean one: shares she bought herself, in a modern account, with the broker tracking every lot. The real world has two complications worth meeting before you sell, because each can change what your basis is or whose job it is to know it. First: not all of your basis is reported to the IRS for you — some of it is your record to keep ("covered" vs. "non-covered"). Second: not all basis comes from a purchase at all — shares can arrive by reinvested dividends, by a wash sale, by inheritance, or as a gift, and each sets your basis by a different rule. We'll use the Build-Along family's actual cost-basis report to ground the first, then take the others in turn.
§4.1 — Covered vs. non-covered: whose job is the basis?
Starting in 2011, Congress required brokers to track cost basis and report it to the IRS when you sell — but the requirement phased in by security type, and that phase-in created a permanent two-tier world. A covered security is one the broker must report the basis for: it sends both you and the IRS your cost basis when you sell. A non-covered security is one bought before its rule took effect: the broker reports what you sold it for (the proceeds), but not your basis — that part is blank, and supplying it is your job. The dividing dates are worth knowing roughly: individual stocks bought on or after January 1, 2011 are covered; mutual fund and dividend-reinvestment (DRIP) shares bought on or after January 1, 2012 are covered; most bonds and options came later (2014 and after). Anything bought before its date is non-covered. The Williams family's report shows both kinds living side by side.
Marcus and Priya Williams's cost-basis and unrealized-gains report from Meridian Invest, for their joint taxable account. It lists every tax lot they own: for the Total US Stock Market ETF, a lot of 12 shares acquired in June 2020 with a $2,100 basis now worth $2,850, a $750 unrealized long-term gain, marked covered; a lot of 28 shares from February 2026 with a $6,440 basis worth $6,650, a $210 short-term gain, covered; and a 2-share reinvested-dividend lot from May 2026, covered. For Priya's Heritage Growth Fund, a mutual fund reported at average cost, there are 60 non-covered shares acquired between 2009 and 2011 with a $1,140 basis worth $1,560, a $420 long-term gain, whose basis is not reported to the IRS and is the taxpayer's own record; and 10 covered shares from later reinvested dividends. The report shows, for each lot, when it was acquired, the cost basis, the market value, the unrealized gain or loss, the holding period (long or short term), and whether it is covered — meaning the broker reports the basis to the IRS — or non-covered, meaning you must supply the basis yourself. The account totals $14,500 in value — $11,795 invested plus $2,705 of uninvested cash — with $1,417 of unrealized gains.
Read the report the way Marcus and Priya have to. Most of it is covered and effortless: their Total US Stock Market ETF — including the original lot from 2020 that's now sitting on a $750 gain, plus the newer lots they bought when they finally put their idle cash to work — was all acquired after 2011, so Meridian Invest tracks every basis and will report it to the IRS for them. Nothing to keep. But look at Priya's Heritage Growth Fund, an actively managed mutual fund she's held since around 2010. The 60 shares she bought back in 2009–2011 are non-covered — bought before the 2012 rule for funds — so their $1,140 basis is flagged "not reported to IRS." That basis is Priya's record to keep, and here's why it's not a footnote: if she someday sells those shares and can't prove what she paid, the IRS can treat her basis as zero and tax the entire sale price as gain. A shoebox of old statements, in that case, is worth real money. (The newer Heritage shares — from reinvested dividends after 2012 — are covered, which is why the same fund shows up partly covered and partly not.) The practical takeaway: for anything covered, relax, the broker has it; for anything older or transferred in, find and keep your purchase records before you ever need them.
One more thing the report quietly teaches, tying back to §2.3: Priya's Heritage fund is reported at average cost — it's a mutual fund, and average cost is the fund's default. And notice that the covered and non-covered Heritage shares are listed separately, with their own averages. That's a real rule: when a fund has both covered and non-covered shares, average cost is computed in two separate pools, not blended across the line. It's a detail, but it's the kind of detail that explains why a fund's reported basis sometimes looks like it's split in two. The full line-by-line of how every one of these figures lands on the actual tax form your broker sends — the 1099-B, with its boxes for covered, non-covered, basis-reported, and the rest — is Lesson 43; here you just need to recognize the covered/non-covered split when you see it, and know which side is your responsibility.
§4.2 — DRIP lots, and the underwater lot Maya could harvest
Back to the everyday mechanics, because there's a reason real positions end up with so many lots. If your dividends reinvest automatically — that DRIP setting from §1.1 — then every single dividend payment buys a few more shares, and each of those purchases is its own new lot, with its own date and its own price. A fund paying quarterly dividends quietly creates four new little lots a year; over a decade that's dozens of them, many just a fraction of a share. This is the upside and the bookkeeping reality in one. The upside: every reinvested dividend is basis you've already paid tax on, so it correctly shrinks your future gain — leave it out and you overpay. The reality: it's a lot of small lots to track, which is precisely the mess average cost was invented to tame for funds, and precisely why specific ID on a fund with years of DRIP can involve picking among many tiny lots (the broker's tools handle this for you).
Maya's most recent lot is the one to look at here. Lot 4 — 30 shares she bought just months ago at $138 — is now worth $130, so it's carrying a small loss, about $240. Watch what specific ID lets her do with it. If she wanted to push her gain even lower than the $1,420 she landed on, she could sell that underwater lot too and realize its loss, which would offset some of her gain — taking her taxable gain on the sale all the way down toward $360. That's not a separate trick; it's the same lever, pointed at a loss instead of a gain. Deliberately selling losers to capture the loss has a name — tax-loss harvesting — and it comes with one important rule: if you buy the same investment back within 30 days, the loss is disallowed (the wash-sale rule). That whole move, and the 30-day clock, is the subject of Lesson 39; here the only point is that specific ID is what makes it possible — you can't choose to sell your loss lot unless you can choose your lots at all. Maya, wanting to keep things simple this time, leaves Lot 4 alone and takes her clean $1,420. But she now knows the floor is lower if she ever wants it.
§4.3 — Basis you didn't buy: inherited and gifted shares
Sometimes shares come to you without a purchase, and then "what did I pay?" has no answer — so the tax code supplies one, by a different rule for each path. These come up at exactly the emotional moments (a death in the family, a gift from a parent) when nobody wants to think about basis, which is precisely why it helps to know the rules in advance. Two paths matter most.
Inherited shares get a stepped-up basis. When you inherit an investment, your basis is reset to its fair market value on the date the previous owner died — not what they originally paid. This is the step-up in basis we first met in Lesson 25, and it's one of the most powerful features in the whole code: a lifetime of someone's gains can be wiped clean at death. If your father bought a stock decades ago for $5,000 and it's worth $80,000 when he dies, your basis becomes $80,000 — sell it the next day and your taxable gain is essentially zero, not $75,000. (Inherited shares are also automatically treated as long-term, no matter how briefly you've held them.) Two cautions worth carrying: the reset can go down as well as up if the asset fell, and — importantly — it does not apply to tax-deferred retirement accounts like a traditional IRA or 401(k), where the heir still owes ordinary income tax on withdrawals. The full mechanics of inheriting accounts are Lesson 61; the basis headline is simply: inherited investments usually start fresh at the date-of-death value.
Gifted shares are the opposite, and the rule surprises people: a gift carries the giver's basis over to you. If your aunt gives you stock she bought for $4,000, your basis is her $4,000 (her carryover basis), not its value the day she handed it over. There's no step-up for a gift — you inherit her cost and her gain right along with the shares. And there's one genuinely tricky wrinkle to know if she gives you something that has dropped in value: when the gift is worth less than she paid, a dual-basis rule applies. You use her (higher) basis to figure a gain, but the (lower) value-at-the-time-of-the-gift to figure a loss — and if you sell somewhere between those two numbers, there's no gain and no loss at all. A quick illustration: she paid $4,000, the shares are worth $3,000 when she gifts them. Sell later for $5,000 and you use her $4,000 basis — a $1,000 gain. Sell for $2,500 and you use the $3,000 gift-date value — a $500 loss. Sell anywhere from $3,000 to $4,000 and you report nothing. You don't need to memorize the wrinkle, only to recognize that gifted shares carry the giver's basis (so ask what they paid), while inherited shares reset to date-of-death value — a difference that can be worth a great deal of tax, and a reason that, when it's a choice, inheriting is often gentler than gifting.
One last source of basis that isn't a purchase, named here because it closes the loop with the lesson before this one: a wash sale. When you sell something at a loss but buy it right back (within that 30-day window), the loss is disallowed for now — but it isn't lost. It gets added to the basis of the shares you bought back, so you recover it later when you sell those. That basis bump is the mechanism that makes a wash sale a deferral rather than a forfeiture, and it's why Lesson 39 said the loss is "deferred, not destroyed." Lesson 39 owns the rule itself — what triggers it, the 30-day clock — and this is just the basis side: a disallowed wash-sale loss lands in your replacement shares' basis. Add it to the list of ways your basis can be something other than the plain price you paid: reinvested dividends raise it, a return of capital lowers it, a wash sale bumps it, inheritance resets it, a gift carries it over. Knowing which rule applies is what keeps your gain — and your tax — honest.
§5 — Choosing (and electing) your method at sale
We've taken apart what basis is, met the three methods, watched the same sale produce three different bills, and seen where basis comes from when you didn't simply buy it. This closing section is the operational one: how to actually make the good choice, in your own account, before you sell — because specific ID only helps if you use it in time, and the single most common way people overpay is by leaving the default alone.
§5.1 — Set it before you sell
The whole game comes down to one habit: decide how your sale will be matched to lots before you place it, not after. Concretely, there are two places to act. The first is your account's default cost-basis method, a setting in your brokerage profile (usually under "cost basis" or "tax" settings). Left untouched, it's typically FIFO for stocks and ETFs, and often average cost for mutual funds — and either default can quietly hand you the biggest gain. You can change that default once to something smarter: most brokers offer a "specific lot" option (you choose every time) or an automated "tax-optimized" setting that picks the lots to minimize your tax for you — Schwab calls it the Tax Lot Optimizer, Fidelity calls it Tax-Sensitive, Vanguard calls it MinTax. These tax optimizers are not separate IRS methods; they're just specific identification run automatically, weighing basis and holding period to find your lowest-tax lots (with some known blind spots, which is why a deliberate hand-pick can still beat them in special cases). The second place to act is the order screen itself — the "select tax lots" view Maya used — where, if your default is "specific lot," you choose the exact shares on each sale.
The two rules that make this stick are the ones from §2, restated as action items. For specific identification, you must choose your lots at or before the sale — by the time it settles, which is now one business day, so genuinely the safe practice is to pick them right when you place the order, and to keep the broker's confirmation. You cannot fix it later on your tax return; if you didn't choose, FIFO is locked in. And for average cost, remember the stickiness: if your mutual fund is on average cost (very possibly by default), once you've sold a single share under it you're largely committed to it for the shares you held — so if you want the flexibility of specific ID on a fund, switch the method before your first sale, not after. None of this is hard, but all of it is time-sensitive: the choice lives at the moment of selling, which is the one moment people tend to rush. Slow down for the thirty seconds it takes to check your method, and you've captured nearly all the value in this lesson.
§5.2 — Which one is you — and into Lesson 43
Three pictures from this lesson, and the move each one points to. If you're Maya — someone with a taxable account you've been buying into for a while, facing a partial sale — your move is the one she made: before you click sell, set your method to specific lots (or a tax optimizer), and pick the higher-basis shares to keep this year's gain small, leaving your oldest, cheapest shares to be dealt with in a better year. That single habit was worth $507 to her on one ordinary sale. If you're the Williams family — holding a mix of newer covered shares and an older non-covered fund — your move is to read your cost-basis report with the covered column in mind, relax about everything covered, and dig up and keep the records for anything non-covered, before a sale forces the question. And if you mostly own mutual funds and never want to think about lots, average cost is a fine, honest choice — just choose it on purpose, knowing it trades away the lot-picking flexibility, rather than drifting into it by default.
The thread under all three is the one this lesson set out to deliver: your basis is just what you paid, the number your gain is measured against — and when you've bought the same thing at different prices, which shares you're treated as selling is a choice that sets that basis, and the tax with it. The fear at the start was that the broker decides this for you. The truth is that the broker only decides it if you let it. Next, in Lesson 43, we follow these numbers onto the page they actually arrive on: the 1099 family — the 1099-B that reports your sales and basis, the 1099-DIV for your dividends, the 1099-INT for interest — the forms where everything you've tracked here shows up in February, and how to read them without flinching. You've learned what the numbers mean and how to choose them. Lesson 43 is learning to check the broker's paperwork against what you know is true.
Scam Radar: the "we'll fix your cost basis" hustle — and the temptation to fix it yourself
Cost basis is unglamorous, which is exactly why the cons around it are quiet and easy to miss. They cluster at one pressure point: the non-covered shares from §4, where the IRS doesn't already have your basis and the number is, in effect, on the honor system. Two versions show up — one sold to you by someone else, one whispered to you by your own wish to pay less — and both end the same way, with you owing the tax plus interest and penalties while anyone who helped you is long gone.
The "cost-basis reconstruction" outfit that just makes numbers up
If you've lost the records for an old, non-covered holding, a real and reasonable need exists: reconstructing what you actually paid from old statements, transfer records, and price histories. That legitimate need is what the scam imitates. A service — often found through a tax-season ad or a too-slick "tax resolution" firm — offers to "reconstruct your cost basis" and promises, before looking at anything, that it'll come back high enough to erase most of your gain. The tell is the guaranteed outcome: honest reconstruction produces whatever the evidence supports, not a number chosen to flatter your tax bill. An outfit that promises a result in advance is selling you a fabricated basis, and a fabricated basis is just understated income with extra steps. When your 1099-B reports the sale proceeds to the IRS (which it does, even for non-covered shares) and your return shows a gain that's implausibly small against it, the mismatch is the kind of thing automated matching is built to catch — and you, the signer of the return, are the one who owes.
The ghost preparer who quietly inflates your basis
The same move arrives in person as the "ghost" preparer — someone paid to do your return who inflates your cost basis (or invents one for a non-covered sale) to shrink your gain, then refuses to sign the return as the paid preparer, which is itself illegal. A legitimate preparer signs every return they're paid to prepare and includes their PTIN (their IRS preparer ID). The danger is doubled: the preparer pockets a fee and disappears, and you are left having signed a return with a false basis on it, owing the back tax, interest, and penalties when the brokerage's 1099-B — a copy of which the IRS already has — doesn't square with what you filed. The rule is blunt: anyone paid to prepare your return must sign it; if they won't, walk away, and never let "I'll just put your basis a little higher" pass without a hard no. The honest mirror image is worth saying plainly too: even doing your own return, the temptation to round your basis up on a non-covered sale "because they can't check" is tax fraud, not a gray area — claim only the basis you can actually document.
Verifying is free and quick. Before you trust a paid preparer, confirm they hold a valid PTIN and credentials in the IRS Directory of Federal Tax Return Preparers at irs.gov; anyone marketing themselves as an investment advisor can be checked in FINRA's BrokerCheck (brokercheck.finra.org) and the SEC's tool at adviserinfo.sec.gov. A "basis" specialist who can't be found in any of these, or who dodges when you ask for credentials, has answered the question. And know where to report: a ghost or fraudulent preparer to the Treasury Inspector General for Tax Administration (TIGTA) and on IRS Form 14157; a promoter selling a bogus basis-reconstruction scheme to the IRS (Form 14242); any fraud at all, even with no loss yet, to the FTC at ReportFraud.ftc.gov. The shame that keeps people quiet here — the worry that you should have known your own basis — is exactly what lets the next person get talked into the same thing. You don't deserve that shame, and reporting is how the next mark gets warned.
If you already sold — and the basis wasn't handled the way you'd want
If you're reading this with the uneasy feeling that you've already gotten this wrong — you sold and just let the broker's default pick your shares; you used average cost for years and now feel boxed in; you sold an old holding and have no idea what you paid; a 1099-B showed up with a basis that looks wrong or blank — this part is for you, and there's no lecture in it. Almost nobody is taught any of this before their first sale. You did the normal thing, which is to sell and trust the screen. Let's set the worry down and look at what's actually true, because in most of these the situation is more fixable, and the damage smaller, than the dread suggests.
If you let the default (usually FIFO) pick your lots and realized a bigger gain than you had to: first, it was a reasonable thing to do, and the gain was real money you made — you only owe tax because you profited. It's done for that sale, and you can't re-pick those lots after the fact (that deadline is firm). But the lesson is entirely forward-looking and cheap: go set your account's default to "specific lot" or a tax-optimized method now, so the next sale matches the smart lots automatically. One default change protects every future sale. And if you also have losers in the account, you may be able to harvest a loss before year-end to offset the gain you already took — that's Lesson 39, and it's worth reading before December.
If you feel trapped on average cost: it's less of a trap than it sounds. The stickiness only locks the shares you already averaged; you can switch to specific identification going forward, for shares you buy from here on, so your future flexibility is fully recoverable even if the past lots are settled. And if you sold an old, non-covered holding and couldn't find your basis — don't just accept a zero. You can reconstruct it from old account statements, the original confirmation, the company's or fund's historical prices, even brokerage records you can request; a supportable reconstructed basis is legitimate and can save you a great deal of tax. Finally, if a 1099-B shows a basis that's wrong or missing, you are allowed to correct it on your return rather than overpay — you report the right basis with an adjustment (the mechanics are Lesson 43). The broker's number, especially on older or transferred shares, isn't gospel; your documented basis is.
None of this is a verdict on you. Cost basis is genuinely invisible until someone shows it to you, which this lesson just did. The part you still control is everything ahead — the default you set today, the lots you pick on your next sale, the records you go dig up for your non-covered holdings before you need them. That's not a consolation prize; it's where essentially all the value lives, and it's entirely in front of you.
The Advisor's Move, Decoded — "We'll manage your tax lots for you"
The move
An advisor reviewing your taxable account says something that sounds genuinely expert: "We handle the tax-lot accounting for you — we use specific identification and a tax-lot optimizer on every sale, harvest losses through the year, and make sure we're never realizing more gain than we have to. It's one of the ways we add value beyond just picking investments." It's true that this is real work and real value — and, as always with this fixture, the question isn't whether the technique is legitimate (it is), but whether it's worth the fee and whether it's something you could do yourself.
The logic — and it's sound
This rests on exactly the mechanics this lesson taught. Choosing high-basis lots to minimize a gain, picking loss lots to harvest, weighing basis against holding period so you don't trade a smaller gain for a worse rate — all of it is genuine, and on a large, complicated account with many positions, many lots, ongoing contributions and withdrawals, and loss-harvesting across the year, coordinating it well is real, time-consuming skill. An advisor who actually does this — who sets every account to specific identification, picks lots thoughtfully, and documents it — is providing something of value. This is not a scam move. The decode is about whether your situation needs it bought.
The DIY substitute
Here's what the pitch tends to leave out: for a straightforward account, your brokerage already does the hard part for free. Setting your default cost-basis method to the broker's tax-optimized option (Schwab's Tax Lot Optimizer, Fidelity's Tax-Sensitive, Vanguard's MinTax) makes it pick your lowest-tax lots automatically, on every sale, at no cost — that's the same specific-identification logic an advisor would apply, run by the same software. For a single taxable account with a handful of funds, flipping that one setting captures most of the benefit, and hand-picking lots on the order screen (as Maya did) captures the rest; the interactive at the end of this lesson even shows you the gain under each method on your own numbers. Where an advisor genuinely earns the fee is real complexity — many accounts to coordinate, large concentrated positions to unwind across years, harvesting that has to dodge wash sales across a household's accounts, the interaction with everything else in a big financial picture. The tell that separates the two: ask "which method are my accounts set to right now, and can you show me the lots you selected on my last few sales and why?" An advisor doing the work answers with specifics; one charging a percentage of your assets for a setting you could flip yourself, and can't show their lot-level reasoning, is selling you software you already own.
Reassurance
If this lesson left you worried that cost basis is one more complicated thing you're probably doing wrong, it's worth setting that weight down — because the core of it is genuinely simple, and the system is built to help you more than to trip you.
Start with what basis actually is: just what you paid, the money you put in, the number your gain is measured against. You're never taxed on that — only on the profit above it. And for nearly everything you've bought in recent years, you're not even responsible for tracking it: your broker does, and shows you the number on a screen. The places where it's truly your job — old or transferred holdings — are few, nameable, and fixable with a folder of statements. The monster of "I'll never figure out what I paid" turns out, for most of your money, to be a number already sitting in your account.
Then the part that should feel like getting the wheel back. Far from the broker deciding your tax for you, you usually get to choose which shares you sell — and that choice is one of the cleanest, lowest-effort tax wins there is. It cost Maya a few clicks and saved her $507 on one ordinary sale. You don't need to master every rule about gifts and inheritances and wash sales today; you need to remember two things before your next sale: check what your cost-basis method is set to, and, if you're selling part of a position, pick the higher-basis shares (or let the tax optimizer do it). That's the whole habit. Do that, and the rest of this lesson is just background you can reach for when you need it.
And if you've already sold imperfectly — let the default pick, used average cost, lost an old basis — none of it is a catastrophe. The tax you may have overpaid bought you a real outcome you wanted, the flexibility you have going forward is almost entirely intact, and a missing basis can be reconstructed rather than surrendered. There's no single irreversible cost-basis mistake waiting to ruin you. There's just a number that's easy to find, a choice that's easy to make, and a habit — check the method, pick the lots — that pays for itself the very first time you use it.
Common questions
What exactly is "cost basis," and do I have to track it myself?
Your cost basis is what you paid for an investment — the money you put in — and it's the number your taxable gain is measured against (gain = what you sell for minus your basis). You're only ever taxed on the gain, never on the basis you put in. As for tracking it: for almost everything you've bought since about 2011, your broker tracks it for you and reports it to the IRS when you sell — these are "covered" shares, and the number sits right in your account, usually on a "cost basis" or "unrealized gains" screen. The cases where it's genuinely your job to keep records are older holdings (bought before the rules took effect) and shares transferred in from somewhere else — those are "non-covered," and you supply the basis. One thing people forget that's in your favor: if your dividends reinvest, every reinvested dividend adds to your basis (it was already taxed when paid), so don't leave those out — forgetting them makes your gain look bigger than it is.
If I bought the same fund many times at different prices, which shares am I selling when I sell part of it?
Whichever ones your cost-basis method picks — and that's the whole point of this lesson. Your shares sit in separate "lots," each bought on its own date at its own price. When you sell only part of the position, one of three methods decides which lots the sale comes from: FIFO (first-in, first-out — your oldest shares, the default), specific identification (you choose the exact lots), or average cost (a blended basis, available only for mutual funds and reinvestment-plan shares). The choice matters because the lots have different bases, so they produce different gains. In the lesson, Maya sells the same 80 shares for the same $10,400, and the taxable gain is $4,800 under FIFO, $2,577 under average cost, or $1,420 under specific identification — a tax of $720, $387, or $213. Same sale; the method picks which shares, and which shares set the tax.
Is FIFO bad? Should I always use specific identification instead?
FIFO isn't bad, it's just blunt — it sells your oldest shares first, no matter your tax situation. In a market that's gone up, those oldest shares are usually your cheapest, so FIFO tends to realize the biggest gain (the case against it). But they're also your longest-held, so they most reliably qualify for the gentle long-term rate (a point in its favor). Specific identification is better when you want control — to sell high-basis shares and keep your gain small, or to pick a loss lot to harvest — which is most of the time you're deliberately managing taxes. The honest catch: picking purely the highest-basis lot can occasionally backfire if that lot is short-term (taxed at your ordinary rate) while a slightly cheaper lot is long-term (taxed at 0/15/20%). The genuinely smart choice weighs both basis and holding period — which is exactly what a broker's "tax optimizer" setting does automatically. So: specific identification (or a tax optimizer) for control; just don't pick by basis alone without a glance at the holding period.
How do I actually pick my lots — and can I do it on my tax return later?
You pick them at the brokerage, in one of two places: your account's default cost-basis method (a setting you can change once to "specific lot" or a "tax-optimized" option), or right on the order screen when you sell, where a "select tax lots" view lets you choose the exact shares. The crucial rule: you must identify your lots at or before the sale — by the time it settles, which is now one business day after the trade — and the broker gives you written confirmation. You cannot pick your lots after the fact on your tax return; if you didn't tell the broker by the deadline, FIFO applies and that's final (the courts have upheld this). So the safe habit is to choose your lots the moment you place the order, not in April. Set the method before you sell, not after.
What is average cost, and is it true I can get "locked in" to it?
Average cost blends all your shares of a fund into one average basis per share — add up everything you paid, divide by total shares, and every share carries that average. It's the simple, no-decisions option, and it's available only for mutual funds and dividend-reinvestment (DRIP) shares, not for individual stocks or most ETFs. And yes, it's sticky: once you've used average cost to figure the gain on a sale of a fund's shares, you're generally locked into it for the shares you held at that point — you can switch to another method only for shares you buy afterward, and the shares you already averaged stay averaged (you can't recover their individual lot bases). It's also the default at many fund companies, so people get locked in without ever consciously choosing it. Average cost isn't wrong — if you never want to think about lots, it's reasonable — but it closes the door that specific identification keeps open, so choose it on purpose. If you want lot-picking flexibility on a fund, switch off average cost before your first sale, because afterward is too late for the shares you've held.
I can't find what I paid for some old shares. What happens to my basis?
Don't accept a basis of zero — that would tax the entire sale price as gain. If the shares are "non-covered" (old, or transferred in, so the broker doesn't report a basis), it's your job to supply the number, but you're allowed to reconstruct it: dig up old account statements, the original purchase confirmation, the fund or stock's historical price on your purchase date, dividend-reinvestment records, even records you can request from a former brokerage. A reasonable, supportable reconstructed basis is completely legitimate and can save you a lot of tax. What you can't do is just guess a flattering number — claim only what you can actually document, because the proceeds are reported to the IRS and an implausibly small gain invites a closer look. If the shares are "covered," by contrast, the broker already has the basis and reports it for you, so there's nothing to reconstruct. The whole reason to find and keep records now, before you sell, is so this is never a scramble.
I inherited some stock. What's my cost basis — what the person paid, or something else?
Neither what they paid nor what you paid (you paid nothing). Inherited investments get a "stepped-up basis": your basis is reset to the investment's fair market value on the date the previous owner died. This is one of the most valuable rules in the tax code — a lifetime of someone's gains can be wiped out. If your father bought a stock for $5,000 decades ago and it's worth $80,000 when he passes, your basis becomes $80,000, so selling it soon after produces almost no taxable gain, not a gain on $75,000. Inherited shares are also automatically treated as long-term, however briefly you've held them. Two cautions: the reset can go down if the asset had fallen in value, and it does not apply to tax-deferred retirement accounts like a traditional IRA or 401(k) — an inherited IRA still owes ordinary income tax on withdrawals. The deeper mechanics of inheriting accounts are Lesson 61; the basis headline is that inherited investments usually start fresh at the date-of-death value.
My parent wants to give me stock while they're alive — does that get the step-up too?
No — and this is the surprise that's worth knowing before the gift, because it can change the decision. A gift carries the giver's cost basis over to you (their "carryover basis"); there's no step-up for gifts. If your parent bought stock for $4,000 and gives it to you when it's worth $40,000, your basis is their $4,000 — so if you sell at $40,000, you owe tax on a $36,000 gain, inheriting their built-in gain along with the shares. (Inheriting the same stock instead would have reset the basis to $40,000 and erased that gain.) There's also a tricky "dual-basis" rule if they give you something that has lost value: you'd use their higher basis to figure a gain but the lower gift-date value to figure a loss, with no gain or loss if you sell in between. The practical takeaways: when you receive a gift of stock, ask what the giver paid (you'll need it), and when a family is weighing gifting appreciated stock now versus leaving it as an inheritance, the step-up at death often makes inheriting far gentler on taxes — worth a conversation with a fee-only advisor before acting.
Does my dividend reinvestment matter for taxes, or only when I sell?
Both, and people miss the connection. When a dividend is reinvested, it's still taxable income in the year it's paid — you owe tax on it whether it landed as cash or bought more shares (it shows up on your 1099-DIV either way; the rates are Lesson 40's subject). But because that money bought shares, it also becomes cost basis on those new shares — each reinvestment is its own little lot, at that day's price. The reason this matters at sale: since you already paid tax on the dividend when it was reinvested, adding it to your basis is exactly what keeps you from being taxed on it a second time when you sell. The common, costly mistake is to track only your original purchase and ignore years of reinvested dividends — that overstates your gain and makes you overpay. For covered shares the broker tracks all those little lots for you; for older non-covered shares, the reinvestments are part of the basis you need to reconstruct.
Does choosing my lots actually change anything, or am I just moving the tax around?
Both are partly true, and the distinction is worth being honest about. Within a single sale, choosing high-basis lots genuinely lowers this year's taxable gain and this year's tax — Maya's choice cut her bill from $720 to $213, real money kept now. But the shares you didn't sell still carry their gain, so part of what specific identification does is defer tax to whenever you eventually sell those low-basis shares, not erase it. That deferral is valuable on its own (you keep and can invest the money longer), and it becomes permanent savings in two cases worth aiming for: if you later sell those low-basis shares in a low-income year when the long-term rate is 0% (Lesson 38's gain-harvesting), or if you hold them until death, when your heirs inherit them at a stepped-up basis and the gain is wiped out entirely (Lesson 61). So it's not just shuffling: choosing your lots lets you pay less now, and lets you steer which gains get realized in good years versus held for the best moment of all. That control is the entire point.
Check yourself
This is the L42 interactive, and it turns the lesson into a calculator for your own sale. Enter your tax lots — the shares and the price you paid for each, oldest first — then the current price and how many shares you want to sell, and it computes the same sale's taxable gain and the tax four ways: FIFO (oldest first, the default), average cost (the blended fund basis), specific identification picking your highest-basis (and any loss) lots for the lowest possible gain, and specific identification picking your lowest-basis lots for the highest. The headline is the swing you control — the gap between the best and worst tax on the identical sale — so you can see, in dollars, exactly what the method choice is worth. It comes pre-filled with Maya's four lots (80 shares at $70, 70 at $95, 60 at $118, 30 at $138), a $130 current price, and her 80-share sale, which reproduces the lesson's figures: a $4,800 gain ($720 tax) under FIFO, $2,577 ($387) under average cost, and as little as $360 ($54) at the lowest specific-ID pick (which also harvests her underwater lot) up to $4,800 ($720) at the highest — a $666 swing on one sale. Maya's own clean choice in the lesson, her highest-basis long-term lots, lands in between at a $1,420 gain. Change the numbers to your own holding and watch your real swing appear. Every figure is computed live in your browser from the verified 2026 rates, is federal and illustrative (your state may add, and short-term lots are taxed at ordinary rates — see Lesson 38), and is for learning, not tax advice. Nothing is saved; your numbers vanish when you reload.
An interactive cost-basis method calculator. You enter your tax lots — the shares and the price you paid for each, oldest first — the current price, and how many shares you want to sell. The tool computes the same sale's taxable gain and the tax under four methods: FIFO, which sells your oldest lots first; average cost, which blends all your shares into one per-share basis; specific identification picking your highest-basis lots for the lowest possible gain; and specific identification picking your lowest-basis lots for the highest gain. It shows the swing you control — the gap between the best and worst tax on the identical sale. It is pre-filled with Maya's four lots — 80 shares at $70, 70 at $95, 60 at $118, and 30 at $138 — a current price of $130, and an 80-share sale at a 15 percent rate, which produces a $4,800 gain and $720 of tax under FIFO, a $2,577 gain and $387 under average cost, a $360 gain and $54 at the lowest specific-ID pick, and a $4,800 gain at the highest — a $666 swing. Every figure is computed live, is federal and illustrative, and nothing you enter is saved.
Glossary
What you paid for an investment — the money you put in, and the number your taxable gain is measured against (gain = sale proceeds − basis). You're taxed only on the gain, never on the basis. Introduced in L25; L42 owns how to track and choose it.
Your cost basis after every adjustment: purchase costs and reinvested dividends raise it; a return of capital lowers it; a wash-sale loss is added to it. The real number your gain is measured against — "basis" in this lesson means the adjusted figure.
A specific block of shares bought on one date at one price, with its own cost basis. Buying the same investment repeatedly (including via reinvested dividends) creates many lots under one position — which is why "which shares did I sell?" has an answer that matters.
The default cost-basis method: your oldest shares are treated as the first ones sold. Applies automatically if you don't choose otherwise. In a risen market the oldest shares are usually the cheapest (biggest gain), but also the most likely to be long-term.
The method where you choose the exact lots to sell, controlling your gain. Requires identifying the lots to your broker at or before the sale settles (now one business day) plus written confirmation — and can't be done after the fact on your return.
A method that blends all your shares of a fund into one average basis per share. Available only for fund-type holdings — mutual funds and most ETFs ("regulated investment companies") — and DRIP shares; not for individual stocks. Often a fund's default, and "sticky": once used on a sale, you're locked into it for the shares you held.
An investment whose cost basis the broker must track and report to the IRS when you sell (stocks bought 2011+, mutual-fund and DRIP shares 2012+, most bonds/options later). The basis is handled for you — nothing to keep.
An investment bought before its covered-date (or transferred in), where the broker reports your sale proceeds but not your basis — supplying it is your job. Lose the records and the IRS can treat the basis as $0, taxing the whole sale; reconstruct it from old statements instead.
A dividend reinvestment plan, where dividends automatically buy more shares instead of paying cash. Each reinvestment is taxable income that year AND a new lot adding to your basis — so it's not taxed again at sale. Forgetting to count it overstates your gain.
A distribution that returns some of your own principal rather than paying income (shown in a specific 1099-DIV box). Not taxed when paid; instead it reduces your cost basis, until basis reaches zero. The one common adjustment that lowers basis.
Inherited investments reset to their fair-market value on the date the prior owner died — wiping out the prior gain — and count as long-term automatically. Doesn't apply to traditional IRAs/401(k)s. Introduced in L25; the full account mechanics are L61.
A gift carries the giver's cost basis over to you — no step-up. If the gift is worth less than the giver paid, a dual-basis rule applies: their (higher) basis figures a gain, the gift-date (lower) value figures a loss, and a sale between the two is neither. Ask the giver what they paid.
When a loss is disallowed by the wash-sale rule (selling at a loss and rebuying within 30 days), the disallowed loss is added to the replacement shares' basis (and their holding period tacks on) — so the loss is deferred, not lost. The rule itself is L39; this is only its basis effect.
A broker setting that automatically applies specific identification to pick your lowest-tax lots on each sale, weighing basis and holding period (Schwab's Tax Lot Optimizer, Fidelity's Tax-Sensitive, Vanguard's MinTax). Not a separate IRS method — just automated specific ID. HIFO (highest-cost first) is a related lot-picking strategy.
The method your account uses automatically if you don't choose — typically FIFO for stocks/ETFs and often average cost for mutual funds. A setting in your brokerage profile you can change once (e.g., to specific lot or a tax optimizer) to protect every future sale.
Key takeaways
- Cost basis is just what you paid — the number your gain is measured against; you're taxed only on the profit above it, never on the basis itself.
- On the identical 80-share, $10,400 sale, Maya's method choice swings the taxable gain from $4,800 (FIFO) to $1,420 (specific ID) — a tax of $720 versus $213.
- Reinvested dividends add to your basis because they were already taxed when paid — forget them and you overstate your gain and overpay.
- Specific ID must be elected to your broker at or before settlement (T+1); miss the deadline and FIFO is locked in — you cannot re-pick lots on your tax return.
- Inherited shares step up to their date-of-death value (erasing the prior gain); gifted shares carry over the giver's basis (the built-in gain comes with them).
Knowledge check
5 questions
When you sell part of a position built from lots you bought at different prices, what is the central idea of choosing a cost-basis method?