Skip to main content
Back to Insights
Tax & Financial Planning

How to Delay Capital Gains Tax and Keep Your Money Growing: An Opportunity Zone Example, Step by Step

Sold stock, a house or a rental property? Here is how an Opportunity Zone investment can delay the tax, reduce it, and, if you hold for 10 years or more and the rules are met, potentially keep the growth on the investment out of federal tax.

By Mahmoud Abotteen, CPA  •  
Financial advisor reviewing investment documents with a couple

You sold for a big gain. Now the tax bill is the problem.

Bob and Sherry sold stock they had held for years. Elizabeth sold the house she raised her kids in. John and May sold a rental property. Each of them is looking at a large capital gain, and each is asking the same question: is there a smart, legal way to delay this tax and keep my money working?

For some people, the answer is an Opportunity Zone investment. It is not a loophole, and it is not right for everyone. It is a specific program Congress created, with specific rules, real benefits and real risks. This article walks through it with a step-by-step example so you can compare it to your own situation.

The short version
  • You may be able to defer eligible gain by investing the corresponding amount in a Qualified Opportunity Fund within 180 days of the sale. Only the gain matters, not your whole sale price.
  • Federal tax on that gain is generally delayed until the earliest of three things: you sell the investment, another triggering event occurs, or five years pass after you invest. After five years, your tax basis increases by 10% of the deferred gain, which reduces the amount taxed.
  • If you hold a qualifying investment for at least 10 years, you may be able to elect to leave the gain on the investment itself out of federal tax.
  • Nothing is guaranteed. The investment can lose value, and the tax rules have to be followed exactly.

What is an Opportunity Zone, in plain English?

Congress created Opportunity Zones to encourage investment in certain lower-income communities. The government designates the areas. If you invest eligible gain into a fund that invests in those areas, you can receive tax benefits in return.

That fund is called a Qualified Opportunity Fund, or QOF. It is a partnership or corporation that must keep at least 90% of its assets in qualifying property, tested twice a year (averaged over the first six months and the full year). You do not buy the property yourself. You buy an ownership interest in the fund, and the fund invests in qualifying businesses or property that must meet their own tests.

The version of the program described in this article applies to investments made on or after January 1, 2027, which follow newer and simpler timing rules. There are three tax benefits:

BenefitWhat it meansWhen
DeferralTax on the eligible gain you invested is delayed until the earliest of selling the investment, another triggering event, or five years after you invest.Up to year 5
Basis increaseIf you hold the investment for five years, your basis increases by 10% of the deferred gain, which reduces the gain you report. A fund that meets the special rural-fund requirements can qualify for 30%.Year 5
Growth electionAfter 10 years, you may elect to treat your basis as fair market value when you sell, so the gain on the investment itself can be left out of federal tax. For investments made after 2026, value is measured on the sale date if you sell before the 30th anniversary, or on the 30th anniversary if you sell later.Year 10 and later

Which gain counts? Not every dollar of gain qualifies. The gain must come from a sale or exchange with an unrelated person, and it must be a type of gain the rules allow. Tax professionals call it "eligible gain." Related-party rules use a 20% ownership test.

Meet Bob and Sherry: a stock sale, step by step

Bob and Sherry are a married couple who own a portfolio of stock. They bought it years ago for $500,000 and it is now worth $1,500,000. They decide to sell in December 2026.

To keep the math simple, we assume a federal rate of 23.8% on the gain (the 20% long-term capital gain rate plus the 3.8% net investment income tax) and we leave state tax out for now. We also assume the investment grows 7% a year. That 7% is an illustration only. It is not a forecast and not a promise.

Step 1: The sale (December 2026)

Bob and Sherry sell for $1,500,000. Their cost was $500,000, so their capital gain is $1,000,000. We assume all of it is eligible gain. If they do nothing else, they owe about $238,000 in federal tax on that gain with their 2026 return.

Step 2: The 180-day window (January to June 2027)

The clock starts on the day of the sale. Bob and Sherry have 180 days to invest their eligible gain in a Qualified Opportunity Fund. Because they invest on or after January 1, 2027, the newer rules apply.

Only the gain has to go in, not the whole sale price. The other $500,000, which is their original cost, stays theirs to use however they like.

Step 3: The investment (January 2027)

After researching funds, Bob and Sherry invest the $1,000,000 gain into a QOF. Their federal tax on that $1,000,000 gain is now deferred. Their CPA reports the election on their tax return using the IRS forms in effect for that year.

Step 4: The waiting years (2027 to 2031)

The five-year clock starts on the actual date of their investment, not on January 1, 2027. For now, Bob and Sherry owe no federal tax on the deferred gain, so all $1,000,000 stays invested instead of $762,000. If the fund grows 7% a year, the investment is worth about $1,402,552 after five years.

There is one thing they must avoid: selling early, or taking certain distributions or redemptions. Those events can end the deferral sooner.

Step 5: Year 5 (2032)

The deferred gain is recognized in the tax year that contains the fifth anniversary of their investment. Because their basis increases by 10% of the deferred gain, or $100,000, they report $900,000 of gain instead of $1,000,000. At 23.8%, that is about $214,200 of federal tax, reported on their 2032 return.

This assumes the whole $1,000,000 was eligible gain, was invested, stayed qualifying for five years, and that there were no other basis adjustments or triggering events. Notice what is taxed here: the original gain, not the fund's growth. Also, the fund usually will not send cash to cover this bill, so Bob and Sherry set money aside for it years in advance.

Step 6: Years 5 to 10 (2032 to 2037)

After the year-5 tax, Bob and Sherry keep their fund interest. Their tax basis in it is now $1,000,000: the $100,000 increase plus the $900,000 of gain they reported. Everything above that is growth.

Step 7: Year 10 (2037)

If the fund grew 7% a year, their investment is worth about $1,967,151, which is $967,151 above their basis. Normally that gain would be taxed, roughly $230,000 at 23.8%.

Because they held a qualifying investment for at least 10 years, Bob and Sherry may elect to treat their basis as the fair market value on the day they sell. If the fund and the investors have followed every rule, the federal tax on that gain could be zero. That is the potential "tax-free growth" people talk about. It applies to the gain on the investment itself, not to the original gain, and a triggering event or loss of the fund's qualified status can affect the election.

Residential home exterior in a suburban neighborhood
Opportunity Zone investments can include residential and commercial real estate in designated communities.

Side by side: with and without an Opportunity Zone investment

Here is Bob and Sherry's situation two ways. In the first, they sell, pay the tax and invest what is left. In the second, they invest the full eligible gain in a QOF.

Pay the tax and reinvestInvest the gain in a QOF
Federal tax on the $1,000,000 gain$238,000, on the 2026 return$214,200, on the 2032 return
Amount invested at the start$762,000$1,000,000
Illustrative value after 5 years$1,068,744$1,402,552
Illustrative value after 10 years$1,498,969$1,967,151
Federal tax on growth at year 10About $175,399$0, if the 10-year election applies
Illustrative result after tax$1,323,571$1,752,951

In this illustration, the second path ends roughly $430,000 ahead. That number comes entirely from the assumptions, not from any promise. Please read them before you read anything into it.

  • Both investments earn the same 7% a year. In real life, Opportunity Zone funds are often less diversified and less liquid than a regular portfolio, and they charge fees. The tax benefit only matters if the investment itself does well.
  • The year-5 tax of $214,200 is subtracted at its full amount, and nothing is added for what the money set aside could have earned.
  • Federal tax only, at a flat 23.8%, with no dividends, fees or changes in the law.

What if the investment does badly?

Suppose the fund is worth only $800,000 at year 5, with the same holding period and no other adjustments. The taxable amount is the lesser of the deferred gain ($1,000,000) or the fund's value ($800,000), minus the $100,000 basis increase. That is $700,000 of gain, or about $166,600 in tax.

In that case, Bob and Sherry owe tax equal to more than a fifth of what their investment is worth. This is why the investment has to make sense on its own, with or without the tax benefit.

Professional at a desk with a laptop and calculator reviewing financial documents
Careful planning before a sale is far more valuable than planning after the 180-day clock has started.

Same idea, different sale

The steps are the same whether you sold stock, a home or a rental. What changes is how much of your sale counts as eligible gain.

Elizabeth sold her house

Elizabeth, who is single, bought her home for $400,000 and sold it for $1,400,000, a $1,000,000 gain. If the home-sale exclusion applies and reduces her gain by $250,000, the remaining $750,000 may be eligible for Opportunity Zone treatment, subject to the other rules.

That result is not automatic. It depends on whether she meets every requirement for the home-sale exclusion and on selling costs, improvements, prior exclusions and other basis adjustments. A married couple filing jointly may qualify for a larger exclusion.

John and May sold a rental property

John and May bought a rental for $700,000 and took $150,000 of depreciation over the years, so their adjusted cost is $550,000. They sold it for $1,250,000, which gives a gain of $700,000.

Rental property gain has to be separated into its types. Part may be depreciation recapture, part may be Section 1231 gain, and part may be taxed as ordinary income. The amount eligible for Opportunity Zone treatment is figured after that split, so only some of the $700,000 may qualify. Their CPA works out the split when reporting the sale.

Also, for some rental sales the 180-day clock is measured from a different date than the closing. Ask your CPA which date applies to you.

The honest part: what can go wrong

An Opportunity Zone investment is a tax strategy attached to a real investment. The investment is where most of the risk lives.

  • You can lose money. A tax benefit does not make a weak investment a good one. The fund can drop in value, and you can lose some or all of what you put in.
  • It is hard to get out. To earn the full benefit you generally hold for 10 years, and there may be no easy way to sell sooner.
  • The year-5 tax bill is real. The fund usually will not send you cash to pay it. Set the money aside separately.
  • Fees and the sponsor matter. Look at who runs the fund, their track record and what they charge.
  • The fund has to follow the rules. It must meet the 90% asset test, and its underlying businesses have their own tests. A fund that falls short can owe penalties, and a loss of qualified status or other triggering event can affect your benefits.
  • Distributions and early sales can have tax effects. Fund dividends are taxable, and certain distributions, redemptions or an early sale can end the deferral sooner.
  • The rules can change. Tax law is amended often, and Treasury has proposed additional fund reporting rules that are not final. Check what applies on the day you invest.

A note for California residents

As we understand California's current rules, California does not follow the federal Opportunity Zone rules. A California resident generally pays California tax on the gain in the year of the sale, with no deferral, and California also taxes the growth when it is later sold.

For a $1,000,000 gain, with California's top rate at 13.3%, that can mean a six-figure state bill in the year of the sale. This depends on your residency and the year of the transaction, so confirm your own situation before you decide. Other states follow the federal rules, follow them in part, or do their own thing.

A timing note for anyone selling in 2026

Your 180 days start on the day of the sale. Investments made on or after January 1, 2027 fall under the newer rules, where the deferral runs up to five years from the date you invest. So the question for a 2026 sale is whether your 180-day window reaches January 1, 2027.

Sale closes180-day window ends (about)Can you invest on or after Jan 1, 2027?
June 15, 2026December 12, 2026No
July 15, 2026January 11, 2027Yes, but only a short window
August 15, 2026February 11, 2027Yes
October 1, 2026March 30, 2027Yes
December 10, 2026June 8, 2027Yes

If you invest before January 1, 2027, the older transition rules apply. Under those rules the deferred gain is generally taxed in the year that includes December 31, 2026, so most of the deferral benefit is gone. Speak with an advisor before investing in 2026.

Also keep your tax return in mind. A 2026 return is due in April 2027, so ask your CPA how and when the election is reported if your investment happens close to or after that date.

A short checklist before you invest

  • Confirm that your gain is eligible. It must come from a sale or exchange with an unrelated person, and ordinary-income items do not count.
  • Mark your 180-day deadline on the calendar the day you sell.
  • Invest only an amount you can leave alone for 10 years.
  • Review the fund: strategy, track record, fees, where its properties are, and how it tests the 90% rule.
  • Set aside cash for the year-5 tax bill.
  • Check how your state treats Opportunity Zone gains.
  • Ask your CPA about the reporting. The IRS forms and the fund reporting rules are being updated, so use the current forms and instructions.

Common questions about Opportunity Zone investing

Do I have to invest my whole sale price?

No. Only the eligible gain needs to be invested, and you can invest less than the full gain. The part you invest is deferred, and the part you keep is taxed as usual.

Does it work for short-term gains, or only long-term?

Both can be eligible. Gain that is treated as capital gain, whether short-term or long-term, can qualify as long as it comes from a sale or exchange with an unrelated person and meets the other rules.

Is an Opportunity Zone investment "tax-free"?

Not in general. The tax on your original gain is delayed and reduced, not eliminated. Only the gain on the investment itself can potentially be excluded from federal tax, and only if you hold for at least 10 years and all the rules are met.

What if I sell the fund before five years?

The deferred gain generally becomes taxable at that point, and you do not get the 10% basis increase. The 10-year growth election also requires holding for the full 10 years.

What if I miss the 180-day deadline?

Then that gain does not qualify, and it is taxed in the year of the sale. This is why the date to circle is the day you sell, not the day you start shopping for funds.

Is this a safe investment?

No investment is safe, and Opportunity Zone funds can be illiquid and risky. The tax rules are a reason to look at a fund, not a reason to buy it.

Your next step

If you have sold, or are about to sell, something with a large gain, a conversation before the sale is much more useful than one after it. The 180-day clock does not wait. Mahmoud Abotteen, CPA, and our team can walk through your numbers and tell you whether an Opportunity Zone investment is worth considering.

Schedule a Time With Us

Important information

This article is general information for educational purposes, based on the law as we understand it in October 2026. It is not tax, legal or investment advice, and reading it does not create a client relationship. The examples are hypothetical, the people named are fictional, and the numbers are simplified.

The 7% annual return is an assumption used for illustration only. Actual results are not guaranteed and can be negative. Investments in Qualified Opportunity Funds involve risk, including loss of principal, limited liquidity and fees. Tax laws change, and state treatment varies. Please consult a qualified tax advisor, attorney and investment professional about your own situation before acting.

Schedule a Consultation