You can rebalance your portfolio without paying taxes by doing the trades inside accounts the IRS doesn’t tax, by using incoming cash and dividends to buy up underweight positions instead of selling overweight ones, and, when a sale in a taxable account is unavoidable, by pairing it with a harvested loss, the 0% long-term capital gains bracket, or a charitable transfer of the appreciated shares. Most portfolios need a combination. Which combination depends on where your assets sit, how much new money you’re adding, and whether anything you own is trading below what you paid.
Trade Inside Your 401(k) and IRA
The cleanest way to rebalance tax-free is to do it inside a retirement account. Trusts qualified under Section 401 are exempt from federal income tax, and IRAs get the same treatment under Section 408.1Office of the Law Revision Counsel. 26 U.S.C. 501 – Exemption From Tax on Corporations, Certain Trusts, Etc. Sell an overweight stock fund inside the account and buy an underweight bond fund, and nothing lands on Schedule D.2Internal Revenue Service. About Schedule D (Form 1040), Capital Gains and Losses Trade as often as your allocation drifts.
Not every retirement account is equal here. A traditional 401(k) or traditional IRA defers the tax rather than eliminating it: every dollar you eventually withdraw is taxed as ordinary income, whether the growth came from stocks or bonds. A Roth is different. Contributions go in after tax, qualified withdrawals come out tax-free, and the rebalancing trades in between never generate a tax event at all. That makes Roth accounts the strongest place to hold whatever you expect to trade most often.
Asset Location Sets Up Tax-Free Rebalancing
Where each asset type sits across your accounts decides how much rebalancing you can do without touching a taxable account. The usual approach is to hold tax-inefficient investments (taxable bonds, actively managed funds) inside retirement accounts, and keep tax-efficient holdings (broad index funds) in your taxable brokerage. When the high-turnover pieces live in the sheltered wrapper, rebalancing trades happen where they can’t generate a tax bill. Getting this right at the outset saves years of friction later.
Watch Required Minimum Distributions
Starting at age 73, the IRS requires annual withdrawals from traditional IRAs and most employer plans.3Internal Revenue Service. Retirement Plan and IRA Required Minimum Distributions FAQs Those distributions can knock your allocation off target by forcing liquidations at inconvenient times. If you’re near that age, do your rebalancing inside the account before RMDs start driving the sales for you. Roth IRAs have no RMDs during the owner’s lifetime, which is another reason to prioritize them.
Direct New Contributions to Underweight Assets
Instead of selling what has grown too large, use incoming money to buy what has fallen behind. If your target is 60% stocks and 40% bonds and a rally has pushed stocks to 68%, route your next several deposits entirely into bonds until the ratio returns to target. No sale means no realized gain.
This works best while you’re still adding money regularly. Paycheck contributions, bonuses, and savings you’re moving off the sidelines all count. Calculate the dollar gap between each asset’s current weight and its target, then send new cash to the biggest shortfall first. Over a few months, the drift corrects itself without your having to touch appreciated shares.
There’s a size limit to what this can do. If the drift is large and your contributions are small relative to the portfolio, new money alone won’t close the gap fast enough. A monthly contribution barely moves a portfolio many times its size. When that’s the case, combine it with the strategies below.
Redirect Dividends and Interest
Brokerage accounts usually default to reinvesting dividends into the fund that paid them. That’s convenient, but it works against you when that fund is already overweight. Turn off automatic reinvestment and collect the cash, then manually buy whatever needs shoring up.
Dividends and interest are taxable in the year you receive them regardless of what you do with the money. The 1099-DIV or 1099-INT arrives either way.4Internal Revenue Service. About Form 1099-DIV, Dividends and Distributions Since the tax is already baked in, using the cash to buy underweight positions costs nothing extra. You’re steering money that was going to be taxed anyway, instead of creating a second taxable event by selling appreciated shares.
Harvest Losses to Offset Gains
When a sale in the taxable account is unavoidable, pair it with a losing position. Capital losses offset capital gains dollar for dollar.5Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Sell a winner for a $7,000 gain and a loser for a $7,000 loss, and the net taxable gain is zero. You’ve rebalanced two positions and owe nothing on the profitable trade.
If losses exceed gains for the year, you can deduct up to $3,000 of the excess against ordinary income, or $1,500 if married filing separately.5Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Anything beyond that carries forward indefinitely and offsets gains in future years until it’s used up.6Office of the Law Revision Counsel. 26 U.S.C. 1212 – Capital Loss Carrybacks and Carryovers A bank of carried-over losses gives you room to rebalance aggressively in strong years without a tax spike.
Avoid the Wash Sale
If you sell a security at a loss and buy a substantially identical one within 30 days before or after the sale, the loss is disallowed for that year.7Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The disallowed loss gets added to the cost basis of the replacement shares, so it isn’t lost forever, but it can’t offset gains this year. Wait at least 31 days before buying the same security back.
The rule reaches across your accounts, including your IRA and your spouse’s accounts. Selling a fund at a loss in your taxable brokerage and buying the same fund in your IRA within 30 days still triggers a wash sale. The IRS has never drawn a bright line around “substantially identical,” so judgment applies. Selling an S&P 500 fund and immediately buying another provider’s S&P 500 fund would almost certainly qualify. Selling an S&P 500 fund and replacing it with a total market fund or a Russell 1000 fund is generally treated as different enough, since the underlying holdings aren’t the same.
Choose Which Shares to Sell
Most brokers let you pick specific tax lots rather than defaulting to first-in-first-out. When you have to trim an overweight position, identify the lots with the highest cost basis first. Those shares carry the smallest embedded gain, so selling them generates the least taxable income. If any lots are underwater, sell those first and harvest the loss while you’re trimming.
Sell Inside the 0% Long-Term Capital Gains Bracket
Investors with modest taxable income can sell appreciated holdings and owe zero federal tax on the gains. The tax code applies a 0% rate to long-term capital gains that fall within the lowest income bracket.8Office of the Law Revision Counsel. 26 U.S.C. 1 – Tax Imposed For 2026, that bracket covers taxable income up to $49,450 for single filers and $98,900 for married couples filing jointly.9Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates Taxable income here is income after your standard deduction, so the gross income ceiling runs higher.
For a married couple in 2026, the standard deduction is $32,200.10Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 Add the $98,900 bracket ceiling and the couple can have up to $131,100 of total income before any long-term gains get taxed at 15%. If wages and other ordinary income come to $50,000, roughly $81,100 of room remains in the 0% bracket to realize long-term gains tax-free. That’s meaningful rebalancing headroom in a single year.
This is especially useful for retirees living on Social Security and modest retirement income, early retirees in the gap years before RMDs start, and anyone with an unusually low-earning year. Check your projected taxable income before year-end, calculate how much 0% space remains, and sell just enough of your overweight positions to fill it. Overshoot the bracket by a dollar and the excess is taxed at 15%, so leave a margin.
One condition: the 0% rate applies only to long-term gains on assets held more than one year. Short-term gains are taxed as ordinary income at your marginal rate regardless of how low your income is. If you’re planning to use this bracket, confirm each lot you’re selling has been held at least a year and a day.
Donate Appreciated Shares to Charity
If you already plan to give, donating overweight appreciated stock directly to a qualifying charity does two jobs at once. Transfer long-term appreciated securities in kind to a 501(c)(3), and you skip the capital gains tax entirely while getting a charitable deduction for the full fair market value.11Office of the Law Revision Counsel. 26 U.S.C. 170 – Charitable, Etc., Contributions and Gifts Selling first and donating the cash is a common mistake that erases the tax benefit, because the sale triggers gains tax before the donation.
The deduction for donated capital gain property to a public charity is capped at 30% of your adjusted gross income for the year.11Office of the Law Revision Counsel. 26 U.S.C. 170 – Charitable, Etc., Contributions and Gifts Anything above the cap carries forward for up to five additional tax years. You can elect a 50% AGI limit instead of 30%, but that election drops your deduction to cost basis rather than fair market value. For highly appreciated stock, the 30% cap with full fair market value is usually the better deal.
Shares must have been held more than one year to qualify for the fair market value deduction. Anything held a year or less is deductible only at cost basis, which defeats the purpose. The deduction also only helps if you itemize. For 2026, the standard deduction is $16,100 for single filers and $32,200 for married couples filing jointly,10Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 so the donation plus your other itemized deductions has to clear that floor before it saves anything.
Combining the Methods
No single technique covers every situation. The most tax-efficient approach usually layers them. Do the heavy rebalancing inside your 401(k) and IRA, where trades don’t reach the IRS at all. Steer new contributions and redirected dividends toward underweight positions in your taxable account to absorb moderate drift passively. When a taxable sale becomes necessary, pair it with a harvested loss or time it for a year when your income fits inside the 0% bracket. Save charitable donations of appreciated stock for years when the deduction, on top of your other itemized deductions, actually clears the standard deduction floor.
State taxes add another layer. Most states tax capital gains as ordinary income, at rates ranging from zero in states with no income tax to above 13% in the highest-tax states. The federal techniques above still work at the state level to varying degrees, but the thresholds and rules differ. In a high-tax state, careful rebalancing saves more, because both bites are avoided on every gain you don’t realize.