
Here's the truth: you can't eliminate capital gains tax outright in most cases. But you can reduce it, sometimes substantially, through cost basis adjustments, loss harvesting, exemptions like the home sale exclusion, and lesser-known strategies such as intangible drilling cost (IDC) deductions available to accredited investors.
This article breaks down exactly what qualifies, how the math works, and where advanced strategies come into play.
Key Takeaways
- Capital losses offset gains dollar-for-dollar, plus up to $3,000 of ordinary income annually
- Cost basis adjustments, the home sale exclusion, and selling costs all reduce your taxable gain
- Accredited investors can use oil and gas IDC deductions to offset active income, including capital gains and W-2 wages
What Expenses Can You Offset Against Capital Gains Tax?
Your taxable gain isn't just "sale price minus purchase price." Several costs reduce that number before the IRS ever sees it.
Cost Basis: Your First Line of Defense
Cost basis includes your original purchase price plus acquisition costs like commissions, transaction fees, and sales tax. The higher your basis, the lower your taxable gain.
Capital improvements to real estate increase basis further. According to IRS Publication 523, qualifying improvements include:
- Additions (bedroom, bathroom, deck, garage)
- Systems upgrades (HVAC, wiring, security systems)
- Exterior work (new roof, siding, storm windows)
- Interior renovations (kitchen modernization, flooring)
A $40,000 kitchen remodel isn't just a lifestyle upgrade. It directly reduces your gain when you sell.

Investment Interest and Selling Costs
If you borrowed money to buy taxable investments, the investment interest expense deduction lets you deduct that interest on Form 4952, up to your net investment income. This does not change your gain calculation—it reduces the investment income you're taxed on.
Selling costs do lower the gain itself by reducing your "amount realized":
- Broker commissions and fees
- Real estate closing costs
- Redemption fees
One thing that no longer helps: miscellaneous investment fees like advisory fees or IRA custodial fees. The Tax Cuts and Jobs Act suspended these deductions, and that suspension remains in effect. Don't count on deducting them.
Can You Eliminate Capital Gains Tax Completely?
Full elimination is rare. It typically requires a specific exclusion or enough losses to zero out your gain entirely.
The Home Sale Exclusion (Section 121)
If you sell your primary residence, you may exclude up to $250,000 of gain ($500,000 for married couples filing jointly). To qualify, per IRS Topic 701, you need to meet both:
- Ownership test: Owned the home at least 24 months of the last 5 years
- Use test: Lived in it as your main residence for at least 24 months of the last 5 years
The 0% Bracket and Alternative Deduction Strategies
Holding assets long-term and staying within lower income brackets can qualify you for the 0% long-term capital gains rate. This works well for retirees or years with lower income, but it has limited applicability for high earners.
For investors who can't rely on bracket management, some turn to deductions large enough to offset gains against active income. Oil and gas development partnerships can pair Intangible Drilling Cost (IDC) deductions with depletion allowances that apply to active income—not only passive losses.
PetroVybe structures those deductions for accredited investors, including against W-2 earnings and capital gains. Partners in 2024-2025 received 91-94% deductions against active income, with a model designed for up to a 100% total deduction. This is a niche strategy for accredited investors, not a mainstream tax move.

How Much Capital Gains Tax Can You Write Off? Loss Harvesting Explained
Capital losses first offset gains of the same type: short-term losses offset short-term gains, long-term losses offset long-term gains. Any excess crosses over to the other category.
How the netting works on your return:
- Report each sale on Form 8949 — short-term in Part I, long-term in Part II
- Net short-term gains and losses on Schedule D, line 7
- Net long-term gains and losses on Schedule D, line 15
- Combine both results for your overall net capital gain or loss
If losses exceed gains, you can deduct up to $3,000 ($1,500 if married filing separately) against ordinary income each year, per IRS Publication 550. Unused losses carry forward indefinitely until fully applied.

Loss harvesting only works when you hold actual losing positions. You cannot create a deductible loss without a real sale.
Watch the Wash-Sale Rule
You can't claim a loss if you buy a "substantially identical" security within 61 days (30 days before or after the sale). The wash-sale rule catches many investors in volatile markets, so time any replacement purchases carefully.
Beyond Loss Harvesting: Advanced Tax Deduction Strategies for High-Income Investors
Loss harvesting has a ceiling. If you're a high-income W-2 earner or an investor sitting on a large capital gain with no offsetting losses, you need deductions that work against active income directly, not just other capital gains.
Intangible Drilling Cost (IDC) Deductions
Under IRC Section 263(c) and 26 CFR 1.612-4, working-interest partners in oil and gas development can elect to expense intangible drilling costs in the year they're incurred rather than capitalizing them. Those costs cover non-salvageable items such as labor, fuel, and hauling. What makes this unusual: oil and gas working interests are exempt from the passive activity loss rules under IRC 469(c)(3). That means these deductions can offset active income, including W-2 wages and capital gains, not just passive income like most real estate losses. PetroVybe, a Texas-based natural gas development company, illustrates how this plays out in practice. According to internal company data, PetroVybe partners received:
- A 94% deduction against active income in 2024
- A 91% deduction against active income in 2025
- IDC deductions typically representing 60%-80% of invested capital, taken either in year one or spread over five years A $100,000 investment under this structure might generate $60,000–$80,000 in first-year IDC deductions alone, with total deductions (including depletion) reportedly reaching up to 100% over time. These figures come from PetroVybe's own reporting and are not guaranteed. Results vary with drilling activity, production timing, and IRS rules. This is not tax advice—consult a CPA to confirm suitability for your income, accreditation status, and risk tolerance.
Other Deferral Options Worth Researching
- Qualified Opportunity Zone (QOZ) investments — defer gain by reinvesting within 180 days into a qualified opportunity fund
- Installment sales — spread gain recognition over multiple years as payments are received
- Charitable remainder trusts — transfer appreciated assets, claim a partial deduction, and defer remaining gain Loss harvesting offsets gains with losses. IDC deductions and the deferral tools above attack the tax bill from another angle—especially useful when you have active income and few losses to harvest. Match any strategy to your facts with a qualified tax advisor before you commit capital.
Capital Gains Tax Rates You Should Know
Your holding period drives the rate:
- Short-term (one year or less): taxed as ordinary income, up to 37%
- Long-term (more than one year): 0%, 15%, or 20%, based on taxable income and filing status
Special rates apply to specific asset types:
| Asset Type | Maximum Rate |
|---|---|
| Collectibles (art, coins, held 1+ year) | 28% |
| Unrecaptured Section 1250 gain (real estate depreciation recapture) | 25% |
| Standard long-term gains | 0%, 15%, or 20% |

These special categories catch people off guard. Real estate investors often forget that depreciation recapture doesn't get the standard long-term rate.
How Much Capital Gains Tax Do You Pay on $300,000?
Take a $300,000 long-term capital gain as the working example. Your federal bill still moves with filing status and the rest of your taxable income.
- Single filer: Most of the gain lands in the 15% bracket; higher total income can push a slice into 20%. Federal tax often falls roughly in the $45,000–$60,000 range.
- Married filing jointly: Higher joint thresholds keep more of the gain at 15%, so the federal bill is usually lower—often closer to about $40,000–$55,000 on the same gain.
These are rough estimates only. Exact liability depends on total taxable income, deductions, and filing status.
Don't forget state taxes. California taxes capital gains as ordinary income with no preferential rate, according to the California Franchise Tax Board. Other states levy no income tax at all. Check your state's rules before finalizing tax planning.
Frequently Asked Questions
What expenses can I offset against capital gains tax?
Cost basis (purchase price plus acquisition costs), capital improvements to real estate, and selling costs like broker fees all reduce your taxable gain. Investment interest expense may also be deductible up to your net investment income.
Can you eliminate capital gains tax?
Full elimination is uncommon but possible in specific cases, such as the home sale exclusion or having enough capital losses to fully offset your gain. Most taxpayers can only reduce, not eliminate, their liability.
How much capital gains tax can you write off?
You can offset gains dollar-for-dollar with capital losses, plus deduct up to $3,000 ($1,500 if married filing separately) against ordinary income each year. Excess losses carry forward indefinitely.
How much capital gains do I pay on $300,000?
On a $300,000 long-term gain, a single filer in the 15–20% federal brackets typically owes about $45,000–$60,000. Joint filers often pay less because their bracket thresholds are wider; state tax may apply on top.
Can oil and gas investments really offset capital gains tax?
Yes, through Intangible Drilling Cost deductions, which apply to active income including capital gains and W-2 wages, unlike most passive real estate losses. This is a specialized strategy for accredited investors, so consult a CPA before pursuing it.
Do capital losses carry over if I don't use them all in one year?
Yes. Any unused capital loss beyond the annual $3,000 limit carries forward indefinitely to future tax years until it's fully used.


