The short answer
Selling and buying stocks means paying the tax on your whole gain before the first share is bought, because stock is not like-kind to real property and cannot be a 1031 exchange replacement. On the hypothetical $1,000,000 sale below, that bill is $133,811 federal, so the stock portfolio starts 13.4% smaller than the real estate an exchange would buy. After that the comparison turns on four things: how each income stream is taxed, how much leverage you want, whether you hold until death, and how much concentration you can stand.
At a glance
| Can stock be replacement property? | No. Since 2018 section 1031 covers real property only, and the regulations list stock as not real property |
|---|---|
| 2026 long-term gain breakpoints | 0% to $98,900 and 15% to $613,700 of taxable income, joint; 20% above |
| Depreciation layer on a rental sale | Unrecaptured section 1250 gain, taxed at ordinary rates up to 25% |
| Net investment income tax | 3.8% above $250,000 joint or $200,000 single MAGI, on rents, dividends and gains alike |
| Qualified dividends | Taxed at the same 0%, 15% and 20% rates as long-term capital gain |
| Margin on stock purchases | Regulation T initial margin of 50% of market value |
| Step-up at death | Section 1014 resets basis to fair market value for stocks and real estate alike |
The decision is whether the gain tax is paid now or kept working, because stock cannot receive exchange money
Section 1031(a)(1) defers gain only when real property is exchanged for real property of like kind. Since the 2017 amendments the section has covered nothing else, and Reg. section 1.1031(a)-3(a)(5) lists stock, bonds, notes and partnership interests as intangibles that are never real property, whatever state law says.
So the stock route is always a taxable sale followed by a purchase with what is left. That also covers real estate investment trust shares and real estate mutual funds: the underlying assets are buildings, but what you buy is stock.
The exchange route keeps every dollar of equity in real estate and carries your old basis into the new property under section 1031(d). Neither route is wrong. They price the same gain differently, and the rest of this page lays out the trade.
Worked model: a $1,000,000 rental sale leaves $866,189 for stocks and $1,000,000 for real estate
Hypothetical round numbers for a married couple filing jointly with $150,000 of other taxable income. They bought a rental for $600,000, claimed $200,000 of depreciation and sell with $1,000,000 of net proceeds and no mortgage. Brackets come from Rev. Proc. 2025-32; state tax is left out and would widen the gap.
The $133,811 is 22.3% of the gain. In the exchange it stays invested, and at any equal rate of return the real estate starts with 15.4% more capital than the brokerage account. Run your own numbers with your CPA; the four-layer method behind these figures is on how much tax you pay selling a rental without a 1031.
- Gain: $1,000,000 less $400,000 adjusted basis = $600,000, of which $200,000 is unrecaptured section 1250 gain and $400,000 is other long-term gain.
- Depreciation layer stacked from $150,000 to $350,000: $61,400 at 22% and $138,600 at 24% = $46,772.
- Capital gain layer from $350,000 to $750,000: $263,700 at 15% and $136,300 at 20% = $66,815.
- Net investment income tax: modified AGI of $782,200 exceeds $250,000 by $532,200; 3.8% of that is $20,224.
- Federal tax $133,811. Stock path starts with $866,189; exchange path starts with $1,000,000 of replacement property.
Income from each side is taxed differently: dividends get capital gain rates, rents get depreciation
Qualified dividend income is added to net capital gain by section 1(h)(11), so most dividends from domestic companies are taxed at 0%, 15% or 20% rather than ordinary rates. Interest and non-qualified dividends are ordinary income.
Rent is ordinary income, but it is reduced by depreciation: section 168(c) writes off residential rental buildings over 27.5 years and nonresidential buildings over 39. That deduction can shelter part or all of the cash a property throws off. In an exchange, though, the replacement starts from your carried-over basis, so the shelter is smaller than it would be on a fresh purchase.
Both streams count toward the 3.8% net investment income tax in section 1411, which reaches interest, dividends, rents and gains once modified AGI passes $250,000 joint or $200,000 single.
Leverage and diversification point in opposite directions, so decide which one you are paying for
Real estate is commonly bought with a mortgage, and an exchange that pays off a loan must replace that debt or add cash, or the shortfall becomes taxable boot; see whether to replace the mortgage or add cash. Stocks can be bought on margin, but Regulation T sets initial margin at 50% of market value for margin equity securities, and a falling market can force sales at the worst time.
Diversification runs the other way. A brokerage account can hold thousands of companies, trade any business day and be sold in pieces. A single rental is one tenant base, one roof and one local economy, and it sells whole. Owners who want the deferral without the concentration often split exchange proceeds across several Delaware Statutory Trust interests, each holding different buildings, accepting that DST interests are illiquid; see DST illiquidity and exits.
Exit tax drag is heavier on the real estate side unless you hold until death, where section 1014 favours the exchange
If both portfolios are eventually sold for cash, the real estate owner pays everything that was deferred: the original $600,000, any new gain, and depreciation taken on the replacement. The stock owner already paid the first round and owes tax only on growth above the $866,189 basis, with no depreciation layer at all.
Death changes the arithmetic. Section 1014(a)(1) gives heirs a basis equal to fair market value at the date of death for both stocks and real estate. The stock path already paid $133,811 that nobody gets back; the exchange path's deferred gain simply disappears. That is why owners who expect to hold for life usually exchange, which 1031 vs holding for step-up explores further.
Owners who need to spend the money within a few years face the opposite pull: deferral buys little when the tax comes due soon, and the stock account is easier to draw from.
How to choose, including the partial path where some cash goes to stocks and the rest stays deferred
Lean toward the exchange if you expect to hold until death, want income sheltered by depreciation and can accept illiquidity. Lean toward stocks if you need liquidity, want to be done with property risk, or are in a low-income year where much of the gain falls in the 0% and 15% bands.
You do not have to pick one. You can exchange part of the value and take the rest as cash, which is taxable boot up to your gain, as explained in what boot is in a 1031 exchange. Price both columns on sell and pay the tax vs a 1031 before the sale closes, because the choice disappears once proceeds reach your account.
Related questions
Can a qualified intermediary buy REIT shares or an index fund with my exchange money?
No. REIT shares and fund shares are stock, and Reg. section 1.1031(a)-3(a)(5) treats stock as not real property, so the purchase would end the exchange and the proceeds would be taxed. A DST interest that meets Rev. Rul. 2004-86 is treated as real property instead.
Is the 25% rate on depreciation always what I pay?
No. Section 1(h)(1)(E) makes 25% a ceiling for unrecaptured section 1250 gain; below the 32% bracket the layer is taxed at your ordinary rate, which is why the model shows 22% and 24%.
Do dividends from my stock portfolio owe the 3.8% surtax?
Yes, once modified AGI passes $250,000 joint or $200,000 single. Section 1411 includes dividends, interest and rents in net investment income, so neither path avoids it.
If I sell stocks later, can I 1031 back into real estate?
No. Section 1031 applies only when real property is given up, so a stock sale is always taxable. Once the rental equity leaves real estate, the deferral chain ends.
Does a stock portfolio get the same step-up as a rental?
Yes. Section 1014 applies to property acquired from a decedent whatever its type. The difference is what was already taxed: the stock path paid tax at the sale, the exchange path did not.
Sources
Checked against these publications on September 30, 2026. Rules and figures change; confirm the current version with your CPA or attorney before you act. This page is general information, not tax or legal advice.
- 26 U.S.C. section 1031, exchange of real property held for productive use or investment
- Reg. section 1.1031(a)-3, definition of real property
- 26 U.S.C. section 1, tax imposed (capital gain and qualified dividend rates)
- Rev. Proc. 2025-32, 2026 inflation-adjusted amounts
- 26 U.S.C. section 1411, net investment income tax
- 26 U.S.C. section 1014, basis of property acquired from a decedent
- 26 U.S.C. section 168, accelerated cost recovery system
- Rev. Rul. 2004-86, Delaware statutory trust interests as real property
- 12 CFR 220.12, Regulation T supplement: margin requirements
