Taxes
How Cost Basis Works and Why It Matters
Cost basis decides how much of a sale is taxable. Here is how it is adjusted, which accounting method to pick, and the step-up that erases gains entirely.
Cost basis is what you paid for something, adjusted for events since. It matters for exactly one reason: when you sell, the taxable gain is the sale price minus the basis. Get the basis wrong on the low side and you pay tax you do not owe.
That happens more often than it should, because basis is rarely just the purchase price and the adjustments accumulate quietly over years.
What adjusts your cost basis
The starting point is what you paid, including commissions and acquisition costs. From there several things adjust it upward.
Reinvested distributions. The largest and most commonly missed. Every reinvested dividend was taxed as income in the year it was paid, and it bought additional shares. Those shares have their own basis. Someone who holds a fund for twenty years and forgets this will report a gain far larger than the real one and pay tax twice on the same money. The dividend reinvestment guide covers how the lots accumulate.
Return of capital distributions. These reduce basis rather than being taxed currently. Common with some funds and partnerships. Ignoring them understates the gain in the other direction.
Stock splits and spin-offs. A split divides basis across more shares without changing the total. A spin-off allocates part of the basis to the new entity.
Improvements to property. For real estate, capital improvements add to basis while routine repairs do not. Over a long ownership this is a large number, and the records are usually the missing piece. The capital gains guide covers the home sale case specifically.
Depreciation, in reverse. Rental property basis is reduced by depreciation claimed — and by depreciation you were entitled to claim whether or not you did, which is why skipping it does not help. The depreciation recapture calculator handles what that produces on sale.
The cost basis calculator tracks the adjustments so the figure at sale is defensible.
Which shares you sell changes the bill
If you bought the same holding at different times and prices, you own several tax lots, and which one you sell determines the gain. This is a choice, and it is worth money.
FIFO sells the oldest first. It is the default at most brokers and is usually the worst option in a rising market, because the oldest shares have the largest gain.
Specific identification lets you choose the lot. This is the one to use. Selling the highest-basis shares minimises the gain now; selling shares held over a year gets the lower long-term rate. It requires identifying the lot at the time of sale — you cannot reconstruct the choice later at filing.
Average cost is available for mutual funds and is simple, but it forfeits the ability to pick. Once elected for a holding, changing it is restricted.
The practical advice is short: set specific identification as the default on your account before you ever sell, not afterwards.
Short-term and long-term are different rates
A holding period over one year gets long-term capital gains rates, which are substantially lower than ordinary income rates. A year or less is short-term and taxed as ordinary income.
The boundary is worth watching. A sale a few weeks before the anniversary can cost a large rate difference for no reason. Check the acquisition date before selling anything approaching a year old.
Note that reinvested distributions create recent lots inside a long-held position, so a holding you have owned for a decade can contain short-term shares.
Losses, and the rule that disallows them
Realised losses offset realised gains, and a limited amount of ordinary income beyond that, with the remainder carried forward indefinitely. Harvesting losses deliberately is one of the few reliable ways to reduce a tax bill without changing your position much.
The constraint is the wash sale rule: if you buy the same or a substantially identical security within thirty days before or after the sale, the loss is disallowed. It is added to the basis of the replacement shares instead, so it is deferred rather than lost.
Three details catch people.
The window is sixty days wide in total — thirty on each side of the sale.
It applies across your accounts, including an IRA. A loss triggered by a purchase inside an IRA is disallowed permanently, not deferred, because there is no basis to adjust.
Automatic dividend reinvestment can trigger it accidentally. A reinvestment inside the window is a purchase. This is the most common unintentional wash sale there is, and it is another reason to switch reinvestment off in accounts where you harvest losses.
The rule applies to losses only. Selling at a gain and repurchasing immediately is allowed, which is what makes gain harvesting possible in low-income years — realise the gain in a low or zero rate band, buy straight back, and your basis resets upward at no cost. The withdrawal sequencing guide covers when those years appear.
The step-up that erases everything
Inherited assets generally receive a stepped-up basis equal to the value at the date of death. The entire unrealised gain accumulated during the previous owner's lifetime disappears for tax purposes.
This is the single largest number in this article and it drives real decisions.
An elderly person holding an appreciated asset they no longer need often should not sell it. Holding until death passes it to heirs with the gain erased. Selling first pays tax on a gain that was about to become untaxable.
It also affects which assets to give and which to leave. Appreciated assets are better inherited than gifted, because a lifetime gift generally carries the original basis to the recipient rather than stepping it up. Meanwhile a traditional retirement account receives no step-up at all — the deferred income tax follows it to the heirs — which is why it is the better asset to leave to charity, and why Roth conversions have an estate dimension beyond the owner's own rates.
Keep the records
Brokers are required to report cost basis for most holdings acquired in recent years, which has removed most of the difficulty. Gaps remain, and they are yours to fill: older holdings, assets transferred between institutions, inherited property, real estate improvements, and anything held outside a brokerage.
The burden of proving basis falls on the taxpayer. Absent records, the tax authorities are entitled to treat the basis as zero — which makes the entire sale price a gain. A folder of purchase confirmations and improvement receipts is worth a great deal per page.