Bitcoin US$ 81,249Ethereum US$ 2,640EUR/USD 1.146GBP/USD 1.334USD/BRL 5.14Bitcoin US$ 81,249Ethereum US$ 2,640EUR/USD 1.146GBP/USD 1.334USD/BRL 5.14
Investing BasicsUpdated 2026-09-189 min read

How to Rebalance Index Funds Without a Surprise Tax Bill

Michael Chen
Michael Chen writes about personal finance fundamentals. Bay Area-based · finance enthusiast for 15 years.
Visual representation of the voice · not a photographic portrait
Share𝕏f
Fix a drifted stock/bond mix using your 401(k), new deposits and dividends first. Worked example, wash sale traps…
Quick answer: Rebalance inside tax-advantaged accounts like a 401(k) or IRA first, then steer new contributions and dividends to the underweight fund. Sell in a taxable account only as a last step, choosing long-term, high-cost shares.↗ Share on X

You can rebalance an index fund portfolio with little or no tax cost if you do most of the work in three places: inside tax-advantaged accounts like a 401(k) or IRA, with new money you add, and with the dividends your funds already pay you. Selling winners in a regular taxable brokerage account is the move that creates a tax bill, so treat it as the last tool, not the first. The rest of this article shows the order to try things in, with a worked example.

*This article is general education, not personal tax or investment advice. Tax rules change and depend on your income, your state, and your accounts. Before you sell anything large, talk to a tax professional or a fee-only financial planner.*

What does "rebalancing" actually mean?

READ ALSORetirement Savings Mistakes: 13 Warning Signs to Fix Now →Retirement Savings Mistakes: 13 Signs Your Plan Is Off Track →How to Start Investing: 9 Things Nobody Tells Beginners →

Say you decided on a mix of 70% stock index funds and 30% bond index funds. Over a year or two, stocks grow faster than bonds. Now your mix is 80% stocks and 20% bonds. You are taking more risk than you planned.

Rebalancing means pushing the mix back to 70/30. The simple way is to sell some of the stock fund and buy more of the bond fund. The problem: in a taxable account, selling a fund that went up means you owe tax on the gain.

The good news is that selling is only one of several ways to get back to your target.

Clear money tips in your inbox. No hype.

Where do taxes come from when you rebalance?

RECOMMENDEDUltimate Dynamic Personal Budget in Google Sheets (FinSavvyDesigns) → — A fully dynamic budget planner in Google Sheets to track income, expenses, and savings with an interactive dashboard.

Affiliate link. We may earn a commission on purchases, at no extra cost to you.

This content is informational and is not investment advice or financial consulting.

Taxes only show up in one situation: you sell shares in a taxable account for more than you paid.

SituationTax when you sell?
Sell inside a 401(k), 403(b), traditional IRA, or Roth IRANo
Sell in a taxable account at a lossNo tax, and the loss can lower your tax
Sell in a taxable account, held more than one year, at a gainLong-term capital gains rate (0%, 15%, or 20% federal, based on income)
Sell in a taxable account, held one year or less, at a gainTaxed like regular income, usually higher
Buy more of the underweight fund with new cashNo

Two words matter here. "Short-term" means you held the shares one year or less. "Long-term" means more than one year. Long-term gains are taxed at lower rates, and some people with lower incomes pay 0% federal tax on them.

Step 1: Rebalance inside your 401(k) or IRA

READ ALSOHow to Start Investing When You Only Have One Afternoon →Before You Invest Your First $100: 7 Things to Check First →Before You Invest Your First $100: 7 Things to Check First →

This is the first place to look, because trades inside a 401(k) or IRA do not create a tax bill.

Here is how it works in practice. Your total mix counts all your accounts together. So if your taxable account is heavy in stocks, you can fix the overall mix by moving money from the stock fund to the bond fund inside your 401(k). Your taxable account stays untouched. Your overall portfolio is back to 70/30.

Steps:

1. Add up the value of every account: 401(k), IRA, Roth IRA, taxable brokerage.

2. Find your total in stocks and your total in bonds.

3. Compare with your target percentages.

4. Make the exchange inside the retirement account, where there is no tax.

Check whether your plan has trading limits or short-term trading fees on certain funds.

Step 2: Can new money do the rebalancing for you?

If you add money every month, point it at the fund that is too small. This is called "rebalancing with cash flow."

Example: you invest $500 a month. Your bonds are below target. For the next few months, put the full $500 into the bond index fund and nothing into stocks. You never sell, so you never owe tax on a sale.

This works best when the gap is small. If your portfolio is $200,000 and you are 10 percentage points off, that is a $20,000 gap. At $500 a month it would take over three years. In that case, combine this step with Step 1.

Step 3: Are dividends feeding the wrong fund?

Most brokerages reinvest dividends automatically into the same fund that paid them. That keeps feeding the fund that is already too big.

You can change this setting. Turn off automatic reinvestment in the taxable account and let dividends land as cash. Then use that cash to buy the underweight fund.

Keep in mind: dividends in a taxable account are taxed in the year you receive them, whether you reinvest them or not. Redirecting them does not add tax. It just uses money that is already taxed to fix your mix.

Step 4: How to sell in a taxable account for less tax

Sometimes Steps 1 to 3 are not enough. If you must sell in a taxable account, these habits keep the bill smaller:

1. Sell shares held more than one year. Long-term rates are lower than short-term rates.

2. Pick the lots with the highest cost. Each purchase you made is a "lot." If your broker lets you choose "specific identification," sell the shares you paid the most for. Less gain means less tax.

3. Sell only what you need. You do not have to hit your target exactly. Getting within a few points is usually enough.

4. Look at your income this year. In a year when your income is lower, such as a job break or early retirement, your long-term gains rate may be lower too, and in some cases 0% federal.

5. Pair gains with losses. If another fund in your taxable account is down, selling it can offset the gain (see the next section).

How can losses help you rebalance?

This is called tax-loss harvesting. If a fund in your taxable account is worth less than you paid, you can sell it and "harvest" the loss. That loss can cancel out gains from other sales. If losses are bigger than gains, up to $3,000 a year can lower your regular income, and the rest carries forward to future years.

There is one trap: the wash sale rule. If you buy the same or a "substantially identical" investment within 30 days before or after selling at a loss, the IRS does not let you claim that loss right now. That window counts purchases in your IRA too.

To stay out of trouble:

How often should you rebalance?

Rebalancing too often creates more trades and more chances for tax. Two simple rules work for most people:

MethodHow it worksGood for
CalendarCheck once a year on the same datePeople who want a routine
BandsAct only when a fund drifts 5 or more percentage points from targetPeople who want fewer trades
BothCheck once a year, act only if the band is crossedMost beginners

With the "both" method, you might look every year and do nothing for two or three years in a row. That is fine. Doing nothing costs nothing in taxes.

A worked example: fixing an 80/20 portfolio

Maria wants 70% stocks, 30% bonds. Her accounts today:

AccountStock fundBond fundTotal
Taxable brokerage$60,000$5,000$65,000
401(k)$44,000$21,000$65,000
Total$104,000 (80%)$26,000 (20%)$130,000

Her target on $130,000 is $91,000 in stocks and $39,000 in bonds. She needs to move $13,000 from stocks to bonds.

What she does, in order:

1. Inside the 401(k): exchanges $13,000 from the stock fund to the bond fund. No tax.

2. Her new totals: $91,000 stocks, $39,000 bonds. Exactly 70/30.

3. She never touched the taxable account.

If her 401(k) had been smaller, she would have done what she could inside it, then pointed her monthly contributions at bonds, and sold in the taxable account only for whatever gap was left.

Mistakes that cost people money

When should you get professional help?

Talk to a CPA, an enrolled agent, or a fee-only planner if:

A one-hour session usually costs less than a mistake on a large sale.

Your next step this week

Log in to every account you own and write down four numbers: stocks in taxable, bonds in taxable, stocks in retirement, bonds in retirement. Add them up and compare with your target mix. If you are within 5 points, do nothing and set a reminder for next year. If you are further off, start with an exchange inside your 401(k) or IRA, then redirect new contributions, and only then consider selling in a taxable account.

FAQ

Does rebalancing inside a 401(k) or IRA create taxes?

No. Buying and selling funds inside a 401(k), 403(b), traditional IRA or Roth IRA does not create a tax bill. Taxes only apply when you withdraw, under that account's rules.

How often should I rebalance my index funds?

Many beginners check once a year and only act when a fund has drifted 5 or more percentage points from the target. Rebalancing more often means more trades and more chances of a tax bill.

What is the wash sale rule?

If you sell at a loss and buy the same or a substantially identical investment within 30 days before or after, the IRS delays that loss. Purchases in your IRA count too. Ask a tax professional before swapping funds.

Clear money tips in your inbox. No hype.

Share𝕏f

Educational content, not personalized financial advice. Sources cited where applicable.

Clear money tips in your inbox. No hype.