Portfolio & Risk
Tax-Efficient Investing: Account Location and Tax-Loss Harvesting
The same $10,000 gain can cost you very different amounts depending on the calendar. Here is how holding periods, account choice and fund structure change what you keep.
Two people sell the same fund for the same $10,000 gain. One bought eleven months ago. The other bought thirteen months ago. They pay different amounts of federal tax. Neither did anything clever. What follows is general information about how these rules work, because tax depends on your own situation and the numbers change, and the IRS publishes the current rates, brackets and limits that you should check before you act.
The one year line, in dollars
Your holding period decides which treatment applies. A gain on something held for more than one year is a long-term capital gain and gets preferential federal rates, while a gain on something held for one year or less is short-term, taxed as ordinary income at your marginal rate.
Put illustrative rates on our two sellers.
| Holding period | Treatment | Illustrative rate | Federal tax | You keep |
|---|---|---|---|---|
| 11 months | Short-term, ordinary income | 24% | $2,400 | $7,600 |
| 13 months | Long-term capital gain | 15% | $1,500 | $8,500 |
Nine hundred dollars apart. Same investment, decided by a date. The clock starts the day after your purchase. Shares bought on 10 March become long-term on 11 March the following year.
The bill that turns up without a trade
A taxable brokerage account generates tax every year whether or not you touch it, because dividends, bond interest and fund capital gain distributions are all reported in the year they are paid.
Dividends come in two flavours. Qualified dividends, which come from most US corporations and require you to have held the shares through a minimum period around the payment date, are taxed at the same preferential rates as long-term gains. Ordinary dividends are taxed at your ordinary income rate. So is interest from bond funds and money market funds.
That distinction does more work than anything else on this page. It is the reason a bond fund throwing off interest is expensive to hold in a taxable account while a broad stock index fund is comparatively cheap, and it drives every location decision below. The mechanics of dividends themselves are in dividend investing.
Three containers, three tax treatments
| Account | Money going in | While invested | Money coming out |
|---|---|---|---|
| 401(k) and traditional IRA | Pre-tax, lowering this year’s taxable income | No tax as it compounds | Taxed as ordinary income |
| Roth IRA and Roth 401(k) | After-tax, no deduction now | No tax as it compounds | Qualified withdrawals are federally tax free |
| Taxable brokerage | After-tax | Dividends and realized gains taxed yearly | Only the gain is taxed |
Pre-tax accounts hand you a deduction today and tax the whole balance when it comes out, while Roth accounts take the tax now and give you the growth free of further federal tax. Choosing between them turns on your rate today against your rate decades from now. Nobody knows that. Holding some of each means the guess does not have to be right. The account rules themselves are in retirement portfolio basics.
The taxable account has one genuine advantage. You can spend it whenever you like, and losses inside it are usable, while a loss inside a retirement account is simply gone.
Asset location: deciding what lives where
Set your target mix first in asset allocation. Location is the second decision. The principle is short: whatever generates the most ordinary income belongs in the sheltered accounts.
| Holding | Preferred home | Why |
|---|---|---|
| Taxable bond funds | 401(k) or traditional IRA | Interest is taxed as ordinary income each year |
| Real estate funds | 401(k) or traditional IRA | Distributions are largely ordinary income |
| Actively traded funds | 401(k) or traditional IRA | High turnover creates frequent capital gain distributions |
| Broad stock index funds | Taxable account | Low turnover, and most dividends are qualified |
| Highest expected growth | Roth | Decades of growth that will never be taxed again |
| Municipal bonds | Taxable account only | Their federal exemption is wasted inside a shelter |
That last row is a mistake I have seen several times. It costs real money every year. Municipal bonds pay lower yields precisely because the interest is federally tax exempt, so holding them in an IRA means accepting the lower yield and receiving nothing in return. The tax-equivalent yield arithmetic is in municipal bonds explained.
One thing to watch while you shuffle holdings between accounts. Your target percentages apply across the combined total, so if the bonds live in the 401(k) and the stocks in the brokerage account, add everything up before deciding you are still at 60/40.
Harvesting a loss, and the 30 day trap
Tax-loss harvesting means selling a holding that has fallen below what you paid, realizing the
loss, and setting it against realized gains elsewhere in the same tax year. A $4,000 realized
loss against a $4,000 short-term gain that would have been taxed at an illustrative 24 percent
saves 4,000 x 0.24 = $960. Net losses beyond your gains can be used against ordinary income up
to an annual limit, with the rest carried forward, and the IRS sets that limit, so look it up
before you plan around a number you half remember.
The catch is the wash-sale rule. Buy a substantially identical security within 30 days before or after the sale, and the loss is disallowed for that year: it gets added to the cost basis of the replacement shares instead, so you claim the benefit later.
The workable version is to replace what you sold with something similar that tracks a different index, so your market exposure carries on while the loss stands, and two funds tracking the identical index are the case people worry about. Avoiding that is easier than arguing about it later.
Harvesting is worth doing on two conditions. You would happily hold the replacement anyway, and the saving clears the trading costs. Remember that it lowers your cost basis too. You are moving the tax into the future, and it will find you there.
Why the fund’s plumbing matters in a taxable account
A mutual fund meeting redemptions has to sell holdings for cash, and any gains realized in the process are distributed to everyone still holding the fund at year end. You can receive a taxable capital gain distribution on a fund you bought three weeks ago that is down since you bought it, which is as annoying as it sounds.
Exchange-traded funds usually sidestep that, because shares are created and redeemed in kind with large institutions, which lets the fund pass out its lowest basis shares without selling anything for cash. The mechanism is in what an ETF is. The practical comparison is in ETF versus mutual fund.
Index funds of either kind trade less than active funds and realize fewer gains as a result, so turnover is the number to look at, and fees compound alongside the taxes, which the expense ratio calculator will put in dollars for you.
Where tax thinking goes wrong
The biggest error by far is letting the tax tail wag the portfolio. Refusing to trim a position that has grown to 40 percent of your money because you hate the idea of the bill is a concentration decision wearing a tax costume, and a bad year can take far more from you than the Treasury would have. I would rather pay $3,000 in tax than watch $40,000 evaporate for the sake of avoiding it.
The second is harvesting for the sake of harvesting. Selling to capture a small loss, paying spreads, tripping the wash-sale rule and lowering your basis can easily leave you worse off than sitting still.
The third is forgetting inflation. Capital gains tax applies to nominal gains, so part of what you are taxed on is the currency losing value while your money stands still. The real return calculator shows what a portfolio earns once inflation and costs are both taken out.
One job for this week. Open your taxable account, sort the holdings by purchase date, and flag anything approaching its one year anniversary so you do not sell it by accident in month eleven. Then check whether your bond funds are sitting in the sheltered account where they belong, and doing the rest of your rebalancing without a tax bill is covered in portfolio rebalancing.
Frequently asked questions
What is the difference between short-term and long-term capital gains?
A gain counts as long-term only if you held the investment for more than one year before selling. Long-term gains get preferential federal rates, while short-term gains are taxed as ordinary income at your regular marginal rate. The one year line runs from the day after your purchase, so selling a day early can push the whole gain into the higher treatment.
What is the wash-sale rule?
The wash-sale rule disallows a capital loss if you buy a substantially identical security within 30 days before or after the sale that created it. The disallowed loss is added to the cost basis of the replacement shares, so the benefit is deferred rather than destroyed. The window covers all of your accounts, including an IRA, and automatic dividend reinvestment can trigger it without you noticing.
What is asset location?
Asset location is deciding which account holds which investment, so that the most heavily taxed holdings sit inside tax-sheltered accounts. Bond funds and anything else throwing off ordinary income are usually the first candidates for a 401(k) or IRA. Broad stock index funds, which distribute relatively little, are usually the most comfortable thing to own in a taxable brokerage account.
Are ETFs more tax-efficient than mutual funds?
In a taxable account they usually are, because the in-kind creation and redemption process lets an ETF hand off low-basis shares without selling them for cash. Mutual funds that meet redemptions by selling holdings can distribute capital gains to everyone who still owns the fund, including people who bought it three weeks ago. Inside a 401(k) or an IRA the difference does not matter.
What is tax-loss harvesting?
It means selling an investment that has fallen below what you paid in order to realize the loss, which can then offset realized gains elsewhere in the same tax year. You keep your market exposure by buying something similar that is not substantially identical, such as a fund tracking a different index. The saving is only worth having if you would happily hold the replacement anyway.
Do I pay tax when I rebalance?
Inside a 401(k), traditional IRA or Roth IRA, no, because trades in those accounts create no immediate tax. In a taxable brokerage account, selling an appreciated holding realizes a capital gain that is taxable for that year. Pointing new contributions and dividends at the underweight sleeve is the way to rebalance without a sale.