What exactly is a capital gains tax, and why does it matter? How can I legally avoid or defer capital gains tax when selling property, stocks, or a business? What is a 1031 exchange, and how do I use it? What is tax-loss harvesting? How can charitable trusts and installment sales help minimize my tax bill? What are Qualified Opportunity Zones, and are they right for me? How can timing asset sales strategically save me money on taxes?
By James L. Cunningham Jr., Esq.
If you’ve worked hard for decades to build a business or your stock and real estate portfolio, the thought of someday giving a huge chunk of that wealth to the government in the form of capital gains tax can be infuriating.
Here’s the good news: There are entirely legal, proven strategies you can use to help avoid or substantially defer these taxes. Knowing these strategies before you finalize a sale can potentially save you tens of thousands, hundreds of thousands, or even millions of dollars. After the sale? It might be too late.
In this article, we’ll cover some crucial methods—from 1031 exchanges and tax-loss harvesting to charitable trusts, opportunity zones, and beyond—that you can potentially leverage to legally minimize your capital gains tax burden. You may also want to view the accompanying webinar for a deeper dive on the details.
The most important takeaway from this article: You need to check with your financial and legal A-Team (tax advisor, financial advisor, CPA, Estate Planning attorney) before you even consider selling an appreciated asset. Ideally, years before selling.
At CunninghamLegal, we specialize in Estate Planning, Tax Planning, Business Law, and Asset Protection. With offices across California, we offer in-person, phone, and Zoom consultations to make expert legal guidance accessible wherever you are. Call us at (866) 988-3956 or schedule an appointment online.
Now, let’s jump in.
What Are Capital Gains Taxes and Why Should I Care?
Simply put, a capital gains tax is the tax levied on the profit from selling appreciated assets. It’s calculated by taking your original purchase price (known as your cost basis) plus any improvements, minus any depreciation, and subtracting this from your net sales price (the proceeds after deducting selling expenses).
Capital gains taxes cover a wide variety of assets—from real estate and stocks to cryptocurrencies, businesses, and collectibles such as art and jewelry.
You should care a lot about capital gains taxes, because in some cases, such as a high-income earner with short-term capital gains in California, the combined state and federal capital gains tax rate can exceed 50%!
Are Short-Term and Long-Term Capital Gains Taxed Differently?
Here’s the first vital key to understanding capital gains taxes: Not all gains are created equal. Short-term capital gains (assets held less than one year) are generally taxed at your ordinary income rates—potentially as high as 37% federally under current rates. But long-term capital gains (assets held longer than one year) are typically taxed at more favorable rates, as of this writing maxing out at 20% federally.
- Consider this example: Ike buys 100 shares of Nvidia on March 1, 2023, at $230 per share or $23,000. On February 29, 2024, Ike sold his 100 shares of Nvidia at $790 per share or $79,000, realizing a gain of $56,000. Because he didn’t hold the shares for a full year, the $56,000 gain is subject to federal capital gains tax at the ordinary income tax rate of up to 37% or $20,720 in tax in 2024.
Had Ike sold the shares just one day later on March 1, 2024, (for $800 per share) his gain would have been $57,000 and he would have been subject to only a 20% long-term capital gains tax rate or $11,400 in 2024. By understanding the difference between short-term and long-term capital gains, Ike could have saved 46% on his tax bill.
Now add in state taxes—particularly in high-tax states like California—and under current law, you could find yourself facing a short-term capital gains tax rate of more than 50%! This tax rate would be comprised of 37% federal tax, plus 13.3% California state tax, plus California imposes a 1% Mental Health Services Tax on income over $1 million, and Federal Net Investment Income Tax (NIIT) of 3.8%. All together this equals a tax rate on short-term capital gains of 54.1%. (California has no specific capital gains tax, all capital gains are taxed at the regular CA state income tax rates.)
For long-term capital gains in California, the tax rate might “only” be as high as 37.1%. That 37.1% is made up of 20% long-term federal capital gains tax, California’s highest state income tax bracket of 13.3%, plus 3.8% Federal NIIT.
What’s that last item? The Affordable Care Act introduced the Net Investment Income Tax (NIIT) on capital gains and certain investment income for higher-income taxpayers, effectively increasing capital gains taxes for many individuals by 3.8%.
Understanding how these taxes work and planning around them is not just advisable, it’s essential. Consult your professional advisors!
2025 Capital Gains Taxes Are Based on Taxable Income, so Cash-In During Low-Income Years!
You may not be aware that capital gains taxes are partly based on taxable income—and very low income folks may not have to pay capital gains at all! Here’s a chart of the current rates as of this writing, including that often-forgotten NIIT.
This chart may be very important to retirees, who may want to defer proceeds from capital gains until they are in their lowest-earning years. There’s a big potential freemium you might realize. (Please note that the trust rate does not apply to Living Trusts, but to Non-Grantor trusts. Consult your CPA on this and all numbers as they apply to your situation.)
- Real-Life Example: Rex retired at 60 and strategically sold portions of his appreciated stocks each year until age 73. This approach allowed him to stay in lower tax brackets, significantly minimizing his overall tax burden compared to selling all at once. At age 73, Rex needed to start taking Required Minimum Distributions (RMDs) from his IRA, so it was great that he took those gains before the RMDs kicked in.
The overall strategy is known as “tax bracket arbitrage,” and can be the key to a solid financial footing during your retirement. CunninghamLegal offers advanced tax planning to high net worth families seeking to leverage tax bracket arbitrage strategies.
Capital Gains Are Not Adjusted for Inflation
One question people often ask is whether the capital gains realized between the purchase and sale of an asset are adjusted for inflation when taxed. The answer is no. All gains are subject to tax at absolute dollar values, with no inflation adjustment—even though, given the change in purchasing power, the net “gain” may be meaningless. Sorry!
Why Do People Say to Wait Until Someone Dies to Sell Property? What Is an Adjusted Cost Basis?
Another vital key to understand capital gains is the adjusted cost basis at death.
It’s become a cliché to hear people say, “The best time to sell is after the owner dies.” And often that statement proves true.
That’s because, generally speaking, when the owner of an asset dies, the asset receives an adjusted cost basis, also known as a “step-up basis,” resetting the initial value of the asset to the time of death, effectively eliminating capital gains tax liability for the appreciation during the lifetime of the person who passed away.
The adjusted cost basis can have enormous consequences for Estate Planning, including the question of gifting property to heirs during your lifetime or waiting to pass on assets until you die. State taxes vary on this, check with your state.
It’s also vital to know whether your state allows a full adjusted cost basis on the death of one spouse. These laws may very greatly depending on whether your state is a community property state or not. California is a community property state, and as of this writing, when one spouse dies, the other does get a full adjusted cost basis and could potentially sell the property without paying capital gains taxes.
If you live in a state without community property (a “separate property” state), there may be structures you can create legally to still get an adjusted cost basis on the death of a spouse—but it’s complicated, and you need a qualified lawyer to help. Have questions about the adjusted cost basis and your own estate planning? Contact CunninghamLegal today.
What Is Tax-Loss Harvesting and How Can It Reduce My Taxes?
Tax-loss harvesting is the strategic selling of losing investments to offset gains from profitable ones in the same year, thereby potentially reducing or even eliminating your capital gains taxes.
Despite its simplicity and effectiveness, people often overlook this strategy due to the psychological pain associated with realizing losses. It hurts to buy a stock at $430 and watch it plunge to $230. But if you sell and realize the loss, you may be able to offset other capital gains and lower your overall tax bill.
- Example: Alan had substantial gains from stocks like Nvidia and Walmart. But he also had significant losses on his shares of Intel and AMD. By proactively selling some of his underperforming investments, he was able to offset the substantial gains on NVDA and WMT, significantly reducing—maybe even eliminating—his tax bill.
I suggest you work with a qualified financial advisor or CPA when contemplating tax-loss harvesting. Proper timing may be vital, and you should be clear on your cost basis for each asset before making such a maneuver.
Why Gifts of Appreciated Stock Are Often Smarter Than Just Writing a Check
When making a gift to charity or to a family member, most people simply write a check. Cash may be “king” or “trash” depending on your viewpoint, but in this example it may be forgoing an opportunity to reduce your capital gains tax bill.
Instead of a check, consider a gift of appreciated stock. That’s right: handing over shares of stock that have gone up in value can not only benefit the recipient, it can potentially give you a nice tax break.
Here’s how it works with a charity: When you donate appreciated stock directly to a qualified charity, you generally avoid paying capital gains tax on the appreciation. The charity can sell the stock tax-free, and you still get to deduct the full fair market value of the stock (if you itemize your deductions). Compare that to selling the stock yourself, paying taxes on the gain, and then giving the leftovers—it’s a no-brainer.
Gifting to individuals, like your kids or grandkids? Different rules apply, but the concept is still useful. You won’t pay capital gains taxes on the transfer, but your recipient takes on your original cost basis—meaning they’ll pay tax if and when they sell. This can still work in your favor if the person receiving the gift is in a lower tax bracket.
Just be mindful of the annual gift tax exclusion ($19,000 per person in 2025), and remember not all charities accept stock gifts—so always check first. Also, don’t gift stocks that have lost value. Those are better used for tax-loss harvesting (see elsewhere in this article), where you sell the loser to offset gains elsewhere. That’s a different but related strategy, and it pairs nicely with giving appreciated stock.
A More Advanced Gifting Strategy
Here’s a neat little trick the IRS doesn’t mind (yet): You can potentially give away appreciated stock and immediately buy the same stock, without triggering the dreaded “wash sale” rules. That’s right—unlike selling a loser to harvest a loss and then rebuying too soon (which is a wash sale no-no), gifting appreciated stock isn’t a sale. You’re not dumping it for a tax break—you’re giving it away. And that makes all the difference.
Although wash sale rules exist to stop you from gaming the system by selling a stock at a loss and then scooping it back up within 30 days, giving away stock—to a charity, a loved one, even your alma mater—means you are not selling anything. So the wash sale rules don’t apply. Do it properly, and the IRS can go take a nap.
- For example, Erin has 100 shares of Apple stock with a very low cost basis. Erin donates the low basis 100 shares of Apple stock to Erin’s synagogue and turns around and buys 100 shares of Apple stock. Here, Erin has just reset their basis. The new shares come with a new, higher cost basis, which can save Erin capital gains tax later when they finally do sell. That’s a stealthy way to clean up a portfolio while still being generous.
Same goes for gifts to family—though keep in mind, they inherit your basis, so this trick is more about keeping your portfolio tidy than giving them tax relief. Still, it’s a great strategy to consider if you’re thinking ahead. Just make sure your heart’s in the right place, not just your calculator.
As always, make sure to talk to your CPA, financial advisor, or attorney before trying this maneuvre. There are details, exceptions, and landmines lurking in the tax code—and you want to be strategic, not sorry.
Can Installment Sales Help Reduce My Capital Gains Tax Bill?
Installment sales are a viable strategy for many asset owners to reduce or defer capital gains taxes. An installment sale lets you spread the capital gains from selling appreciated assets across multiple years. Rather than receiving one large lump sum (and paying hefty taxes all at once), you structure the deal to receive payments over several years.
Here are a couple of real-life examples from my practice.
- Sarah, a client who owned a successful family business, was nearing retirement. By structuring the sale of her business as an installment sale, she spread her tax liability across several years. This strategy not only eased her immediate tax burden but also provided consistent income during retirement.
- Another client, Roger, applied this strategy when selling his auto repair business. Instead of an overwhelming one-time tax hit, Roger received manageable payments annually, resulting in substantial overall tax savings.
You should work with a reliable CPA, financial advisor, and Estate Planning Lawyer when contemplating the sale of a business. Set up a call with CunninghamLegal today. You may also wish to watch my webinar about business succession planning.
“Qualified” Retirement Plans Allow for Deferral of Taxable Gains
Some of your most important capital gains may come through the sale of assets held by your IRA, 401(k), Roth IRA, 403(b), or TSA. These are all “tax-deferred” accounts where buying and selling assets (typically stocks and bonds) is not a taxable event.
Only when the proceeds are distributed is income tax paid. Both Roth IRAs and 401(k)s allow for tax-free distributions, if handled correctly.
Planning where assets will be held and when asset sales and proper distributions will occur is a key part of retirement planning, and you should work with a qualified professional as you make those decisions.
Bottom line: timing is crucial.
How Can a Charitable Trust Help Reduce Capital Gains Taxes?
A charitable trust is an irrevocable trust that sort of functions as a tax-free zone and it is very different than the revocable “Living Trust” with which most people are familiar.
A charitable trust is a “split interest” trust, meaning you get some of the money and the charity gets some. Done properly, a charitable trust can allow you to sell highly appreciated assets tax-free, receive a current deduction from income taxes, receive lifetime income, and eventually support your favorite charity upon your death.
There are multiple types of charitable trusts, with different rules—some of which may be age-related. In general, however, charitable trusts work like this:
- Donate appreciated assets to a charitable trust.
- The trust can sell or trade the assets, free from immediate taxation.
- You receive income for life and an immediate charitable tax deduction.
- Remaining funds ultimately benefit your chosen charity.
- The charity must receive at least 10% of what was contributed to the trust at some point in the future.
If done correctly, using the right structure created by a specialized lawyer, charitable trusts can be a phenomenal vehicle for deferring capital gains taxes.
- Example: Able, age 60, owns a property called Greenacre which has appreciated to $1.375M. He conveys Greenacre to a Charitable Remainder Unitrust (one of several possible structures). Instead of netting his profit of $888K and paying a hefty $487K tax bill, he will receive a stream of payments of a 10-year period totaling $1.633M, get a $137K charitable deduction, and at the end of the 10-year period, Able’s favorite charities will receive $319K. Since Able is retiring and his taxable income is lower, the total tax paid is significantly reduced.
Great deal and an awesome use of “tax bracket arbitrage”? You bet.
Charitable trusts are complex and require expert legal help to establish. You may want read my full blog and view my webinar on charitable trusts by clicking here. Of course, you can also reach out to CunninghamLegal at (866) 988-3956 or schedule your consultation online today.
Can Investing in Qualified Opportunity Zones Defer or Potentially Eliminate Capital Tains Taxes?
The Tax Cuts and Jobs Act of 2017 created “Opportunity Zones.” According to IRS.gov, “Opportunity Zones are an economic development tool that allows people to invest in distressed areas in the United States. Their purpose is to spur economic growth and job creation in low-income communities while providing tax benefits to investors.”
Investing capital gains into Qualified Opportunity Zones (QOZ) can defer your tax payments until December 31, 2026. If held for at least ten years, the appreciation on your QOZ investment becomes entirely tax-free.
Recently, some investors have combined QOZ investments with income-generating ventures such as oil and gas projects. This combination can provide enough cash flow to cover future deferred taxes, making it a highly appealing strategy—but the rules are complex, and you definitely need to work with a specialist financial advisor in this realm. We suggest contacting our partner firm, Ascent Wealth Management to learn more.
What is a 1031 Exchange? Can I Use a 1031 to Defer Real Estate Capital Gains Taxes Indefinitely?
Capital gains taxes play a huge role in real estate investing, and savvy investors will learn and leverage the strategy known as the “1031 exchange.”
This strategy allows you to defer paying capital gains taxes indefinitely when you sell investment real estate and rapidly reinvest the proceeds into another “like-kind” property.
How Does a 1031 Exchange Work?
- Sell an investment property (not your primary residence).
- Reinvest the proceeds into another investment property within specific timelines.
- Taxes are deferred until you eventually sell without reinvesting.
What Are the Requirements for a 1031 Exchange?
There are some very important and rather complex requirements for a 1031 exchange. For example: first, you must identify your replacement property within 45 days. Second, you must close on that replacement within 180 days. And you cannot directly handle the funds—proceeds must go to a Qualified Intermediary.
Some real-life examples:
- Mike, a longtime client of mine, owned an apartment complex in Los Angeles that had greatly appreciated over the years. Rather than pay a substantial immediate capital gains tax, Mike used a 1031 exchange to roll his investment into an even larger property. This not only deferred a $500,000 tax bill, but significantly boosted his monthly cash flow.
- Another client, Barbara, owned a vacation rental that was a constant headache. Using a 1031 exchange, she transitioned it into professionally managed real estate without paying a dime in immediate taxes, greatly simplifying her life.
Again: this is a complicated area of tax law and requires special expertise to navigate the rules. You may also wish to watch my full webinar on 1031 exchanges.
For help with 1031 exchanges or anything else in the article, please reach out to us at (866) 988-3956 or schedule your consultation online today.
Primary Residence Strategies: Maximizing Your Home’s Exemption
If you sell your primary home, you may exclude up to $250,000 of gain ($500,000 for married couples) from capital gains taxes (see my webinar on cutting tax bills when selling property). However, there are other strategies to consider. For example, you might think of converting your home into a rental property for at least two years, allowing you to also leverage the powerful 1031 exchange strategy I discussed above—further reducing taxes.
Whenever considering the sale of any real estate, including your primary home, discuss the possibilities with qualified financial professionals, including your CPA, financial advisor, or Estate Planning Lawyer. Consider setting up a call with CunninghamLegal for a consultation.
What is Qualified Small Business Stock (QSBS), and How Can It Reduce Taxes?
Qualified Small Business Stock (QSBS) is a special tax designation given to certain shares of small, domestic C corporations under Internal Revenue Code Section 1202. If you invest in, found, or work for a qualified startup company and hold onto your stock for at least five years, you could potentially exclude a significant portion—or even all—of your capital gains from federal (not California, sadly) taxes upon selling.
Specifically, the IRS allows QSBS investors to exclude the greater of $10 million or 10 times the investor’s cost basis from federal capital gains taxes upon sale. For example, if you invest $25,000 into a qualified small business and the stock value grows to $10 million over five years, the entire gain can be potentially be excluded from federal capital gains tax—meaning you keep every dollar of that $10 million growth federal tax-free.
However, there’s a ceiling: as mentioned above, the exclusion limit is either $10 million or ten times your initial investment, whichever is greater. For example, if another investor puts $50,000 into the same company and later sells their shares for $20 million, only the first $10 million is tax-free, while the remaining $10 million gain would be subject to capital gains taxes.
QSBS rules are complex and can be highly advantageous—but they must be carefully navigated. Structuring your investment and timing your sale with expert legal and financial guidance is crucial to maximizing your benefits. You may want to view the accompanying webinar starting at time mark 41:56 for more details, including the interesting strategy of “QSBS Stacking.”
If you’re fortunate enough to own Qualified Small Business Stock, call us at (866) 988-3956. We can help you formulate the best overall tax strategy.
Final Thoughts: Expert Advice is Crucial to Reduce or Defer Capital Gains
Avoiding or deferring capital gains tax effectively and legally can be accomplished in many cases through various vehicles, but it requires significant expertise. I suggest a coordinated effort from your Estate Planning attorney, CPA, financial advisor, and tax specialists (what I call your A-Team).
A savvy lawyer will help you navigate these strategies, minimize your tax burden, and design a plan customized to your personal financial situation and goals.
What We Do
The lawyers and staff at CunninghamLegal help people plan for some of the most difficult times in their lives; then we guide them when those times come.
Our experienced legal team specializes in Estate Planning, Tax Planning, Business Law, and Asset Protection to help protect your wealth and legacy for generations to come. With offices across California, we offer in-person, phone, and Zoom consultations to make expert legal guidance accessible wherever you are.
Many of our clients also find our legal webinars invaluable. We cover a wide range of essential topics, including California-specific issues.
Ready to take the next step? Call us at (866) 988-3956 or schedule an appointment online.
We look forward to working with you.
Warm regards,
Jim
James Cunningham Jr., Esq.
Founder, CunninghamLegal
At CunninghamLegal, we guide savvy, caring families in the protection and transfer of multi-generational wealth.