[FREE GUIDE] TAX SECRETS FOR THE SELF EMPLOYED Download

/    NEWS & INSIGHTS   /   article

How Is Capital Gains Tax Figured? The 2026 Four-Step Calculation

Most people find out how capital gains tax actually works about ninety seconds after they have already triggered it. The wire hits the account, the escrow closes, the brokerage confirmation lands, and then somebody asks the question that should have been asked six months earlier. The damage at that point is mostly locked in.

So let us answer it properly. How is capital gains tax figured is not one calculation. It is four separate determinations stacked on top of each other, and the order matters. Get the order wrong and you will either overpay by thousands or report a number the IRS will not accept.

Quick Answer

Capital gains tax is figured by subtracting your adjusted basis from your net sale proceeds to get the gain, classifying that gain as short-term or long-term based on your holding period, netting it against any capital losses, and then applying the rate that corresponds to your total taxable income. Long-term gains are taxed at 0 percent, 15 percent, or 20 percent federally. Short-term gains are taxed as ordinary income at rates up to 37 percent. California adds its own tax on top at ordinary rates with no preferential treatment whatsoever.

Key Takeaway: The difference between a short-term and a long-term classification on a $100,000 gain can be roughly $22,000 in federal tax. The holding period is usually the single most expensive variable in the entire calculation.

Step One: Figure Your Adjusted Basis Correctly

Basis is the number you subtract from your sale price. Everyone assumes basis equals purchase price. It rarely does, and the gap is where most overpayment happens.

Adjusted basis is your original cost plus capital improvements plus certain acquisition costs, minus any depreciation you claimed or were allowed to claim. That last clause catches people. The IRS reduces your basis by depreciation you were entitled to take even if you never took it. Skipping depreciation on a rental does not preserve your basis. It just forfeits the deduction.

What Increases Your Basis

  • Purchase price including the amount financed, not just your down payment
  • Closing costs on acquisition such as title fees, recording fees, transfer taxes, and survey costs
  • Capital improvements such as a new roof, an addition, a replaced HVAC system, or a kitchen remodel
  • Special assessments levied for local improvements like sidewalks or sewer lines
  • Legal fees tied to defending or perfecting title
  • Reinvested dividends in a taxable brokerage account, which are frequently missed and cause double taxation

What Decreases Your Basis

  • Depreciation claimed or allowable on rental or business property
  • Casualty loss deductions you previously took
  • Insurance reimbursements for damage you did not repair
  • Deferred gain rolled forward from a prior 1031 exchange
  • Section 179 or bonus depreciation taken on business assets

Repairs are not improvements. Painting a bedroom, fixing a leaky faucet, and replacing a broken window are deductible expenses for a rental or nothing at all for a personal residence. They do not touch basis. A full roof replacement does.

Common Mistake: Losing the Improvement File

A homeowner who spent $140,000 improving a property over eighteen years and kept no receipts has effectively handed the IRS a $140,000 larger gain. At a combined federal and California rate of roughly 33 percent, that is about $46,200 in tax that documentation would have eliminated. The IRS addresses basis records in IRS Publication 551, and the guidance is blunt about who bears the burden of proof. You do.

Pro Tip: Create a single folder, digital or physical, the day you buy any appreciating asset. Every invoice for work over $500 goes in it. That folder is worth more per hour of effort than almost anything else in your financial life.

Step Two: Classify the Holding Period

This is the determination that moves the most money. Understanding how is capital gains tax figured starts with knowing that the tax code treats patience as a discount.

Short-term capital gain applies to assets held one year or less. It is taxed at your ordinary income rate, which for 2026 tops out at 37 percent federally.

Long-term capital gain applies to assets held more than one year. It is taxed at 0 percent, 15 percent, or 20 percent federally depending on your total taxable income.

The counting rule is specific. The holding period begins the day after you acquire the asset and ends on the day you dispose of it. Buy on March 14, 2025 and you must sell on or after March 15, 2026 to qualify as long-term. Selling on March 14, 2026 leaves you one day short and costs you the entire rate differential.

Short-Term vs Long-Term: The Dollar Difference

Scenario Short-Term Long-Term
Gain amount $100,000 $100,000
Federal rate (32% bracket filer) 32% 15%
Federal tax $32,000 $15,000
Net Investment Income Tax $3,800 $3,800
Total federal $35,800 $18,800
Difference $17,000 saved by waiting

Seventeen thousand dollars for holding an asset an extra few weeks is the best hourly rate most investors will ever earn. Yet people routinely sell at eleven months because they stopped watching the calendar.

Special Holding Period Rules

  • Inherited property is automatically long-term regardless of how long the heir holds it, and it receives a stepped-up basis to fair market value at the date of death
  • Gifted property generally carries over the donor’s basis and the donor’s holding period
  • Wash sale repurchases tack the original holding period onto the replacement position
  • Collectibles such as art, coins, and precious metals cap out at a 28 percent maximum long-term rate rather than 20 percent

Step Three: Net Your Gains Against Your Losses

You do not pay tax on gross gains. You pay tax on net gains, and the netting process follows a mandatory sequence that most DIY filers reverse.

The IRS requires that short-term losses offset short-term gains first, and long-term losses offset long-term gains first. Only after those internal nettings are complete can an excess loss in one category cross over to offset the other. This matters enormously because short-term losses are more valuable when they are absorbing short-term gains taxed at 37 percent than when they are spilling over to absorb long-term gains taxed at 15 percent.

Step-by-Step: How Netting Actually Runs

  1. Net all short-term transactions against each other to produce a single short-term figure
  2. Net all long-term transactions against each other to produce a single long-term figure
  3. If one is a gain and the other is a loss, offset them against each other
  4. If a net loss remains, deduct up to $3,000 against ordinary income for the year
  5. Carry forward anything beyond $3,000 indefinitely, preserving its short-term or long-term character

That carryforward has no expiration date. A $90,000 capital loss from a bad year is a $90,000 shield against future gains, usable across decades. People forget they have it, switch tax preparers, and lose track of a six-figure asset sitting on a worksheet.

This is exactly the kind of multi-year sequencing where a coordinated approach to tax planning pays for itself several times over, because the decision about which lots to sell in December is really a decision about what your rate will be three years from now.

Red Flag Alert: The Wash Sale Rule

If you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed. It does not vanish entirely. It gets added to the basis of the replacement shares. But you cannot claim it this year, and brokers report wash sales directly to the IRS on Form 1099-B. The 61-day window includes the 30 days before the sale, which catches people who double up on a position and then sell the original lot. The rule is explained in IRS Publication 550.

Step Four: Apply the Right Rate

Long-term capital gains rates are not based on the gain alone. They are based on your total taxable income including the gain. The gain stacks on top of your ordinary income, which means a large gain can push part of itself from the 15 percent bracket into the 20 percent bracket.

2026 Long-Term Capital Gains Brackets

Rate Single Filer Married Filing Jointly
0% Up to approximately $49,000 Up to approximately $98,000
15% Approximately $49,000 to $541,000 Approximately $98,000 to $609,000
20% Above approximately $541,000 Above approximately $609,000

Figures are inflation-adjusted annually. Confirm current-year thresholds against the official IRS release before relying on them for a specific transaction.

The Two Surcharges People Forget

Net Investment Income Tax (NIIT) adds 3.8 percent on investment income when modified adjusted gross income exceeds $200,000 for single filers or $250,000 for joint filers. These thresholds are not indexed to inflation, which means more households cross them every year. A filer in the 20 percent bracket is really paying 23.8 percent federally.

California state tax treats every capital gain as ordinary income. There is no reduced rate, no holding period benefit, nothing. A long-term gain that enjoys a 15 percent federal rate can still face a California rate in the 9.3 to 13.3 percent range. For a high earner in California, the all-in rate on a long-term gain lands near 37 percent once federal, NIIT, and state are combined.

If you want to pressure-test a specific number before you sell, run it through a capital gains tax calculator rather than guessing at the bracket.

Key Takeaway: A California resident selling an appreciated asset should assume roughly one-third of the gain goes to tax unless a specific strategy is deployed in advance. Budget accordingly.

KDA Case Study: The Investor Who Sold Eleven Days Early

A Southern California client came to us in February holding a Form 1099-B that showed a $168,000 gain on a concentrated stock position. He had sold the shares in the prior November. The acquisition date was November 19 of the year before. He sold on November 8. Eleven days short of long-term treatment.

Because he was in the 35 percent federal bracket, the entire $168,000 was taxed as ordinary income. Federal tax ran $58,800 plus $6,384 of Net Investment Income Tax. California added roughly $17,000 at 10.3 percent. Total tax exposure was approximately $82,000 on a gain that, held eleven more days, would have been taxed at 15 percent federally for a federal bill of $25,200 plus the same NIIT and state amounts. The avoidable overpayment was close to $33,600.

We could not undo the sale. What we did instead was go back through his basis. He had reinvested dividends in that position for nine years and never tracked them. Reconstructing the dividend reinvestment history added $31,400 to his basis, which reduced the reported gain by the same amount and cut his tax by roughly $14,900. We also harvested $22,000 of unrealized losses elsewhere in his portfolio before year-end, saving another $9,900.

Total recovered: approximately $24,800. Our fee for the engagement was $3,400. That is a 7.3x first-year return, and he now gets a holding-period calendar every quarter so the eleven-day problem never repeats.

Ready to see how we can help you? Explore more success stories on our case studies page to discover proven strategies that have saved our clients thousands in taxes.

How Is Capital Gains Tax Figured on a Home Sale?

Primary residences get their own rule, and it is the most generous exclusion in the individual tax code.

Under Section 121, you can exclude up to $250,000 of gain if single, or $500,000 if married filing jointly, provided you owned the home and used it as your principal residence for at least two of the five years before the sale. The two years do not need to be consecutive. You can generally claim the exclusion once every two years.

Do I Qualify for the Home Sale Exclusion?

Yes, if all of the following are true:

  • You owned the home for at least 24 months during the 5-year lookback period
  • You lived in it as your main home for at least 24 months during that same period
  • You have not claimed the exclusion on another sale within the prior 2 years
  • You did not acquire the property through a 1031 exchange within the prior 5 years

Partial exclusions are available if you sold early due to a job relocation of at least 50 miles, a health condition, or other unforeseen circumstances recognized in the regulations. The partial amount is prorated by months of qualifying use.

The Depreciation Recapture Trap on Converted Rentals

If the home was ever a rental, any depreciation claimed after May 6, 1997 must be recaptured as unrecaptured Section 1250 gain, taxed at a maximum of 25 percent. The Section 121 exclusion does not cover it. A homeowner who rented the property for six years and claimed $78,000 of depreciation owes up to $19,500 of recapture tax even if the rest of the gain is fully excluded. Details appear in IRS Publication 523.

Investors holding rentals should also understand how the basis mechanics interact with accelerated depreciation strategies. Our breakdown of how to report cost segregation to the IRS walks through the filing side of that equation, and the property tax deduction rules most rental owners miss covers the annual expense side.

Special Situations and Edge Cases Most Guides Skip

Installment Sales

Selling a property and receiving payments over multiple years lets you spread the gain across those years under Section 453. This can keep you inside the 15 percent bracket instead of spiking into 20 percent plus NIIT in a single year. Depreciation recapture, however, is fully taxable in the year of sale regardless of how little cash you received.

Qualified Small Business Stock

Section 1202 stock held more than five years can exclude up to 100 percent of gain, subject to the greater of $10 million or 10 times basis. The company must be a domestic C corporation with gross assets under $50 million at issuance. This is the single largest exclusion available to founders and early employees, and it is routinely missed because nobody checks whether the shares qualified at issuance.

Opportunity Zone Deferral

Rolling a gain into a Qualified Opportunity Fund within 180 days defers the tax. Hold the fund investment for ten years and the appreciation inside the fund becomes permanently tax-free. The deferred original gain still comes due on the statutory recognition date.

1031 Exchanges

Real property held for investment can be exchanged for other investment real property with the gain deferred entirely. The timelines are unforgiving: 45 days to identify replacement property and 180 days to close. Miss either deadline by one day and the entire transaction becomes fully taxable.

Married Filing Separately

MFS filers get half the home sale exclusion, a lower NIIT threshold of $125,000, and compressed brackets. Couples who separate mid-year and file separately for convenience frequently create a five-figure tax increase they never modeled.

What Happens If You Report the Wrong Basis?

Brokers report basis to the IRS for covered securities, meaning most equities acquired after 2011. If your Form 8949 shows a different number than the 1099-B, expect an automated CP2000 notice proposing additional tax plus interest and a potential 20 percent accuracy-related penalty. For noncovered securities and real estate, no basis is reported to the IRS, which means the burden of substantiation sits entirely with you if the return is examined.

Five Strategies That Lower the Bill Before You Sell

  1. Cross the one-year line deliberately. Calendar every position’s long-term date. On a $100,000 gain in the 32 percent bracket, waiting is worth about $17,000.
  2. Harvest losses in the same calendar year. Losses realized by December 31 offset gains realized any time that year. A $40,000 harvested loss against a $40,000 short-term gain at 35 percent saves $14,000.
  3. Use specific lot identification. Instruct your broker to sell the highest-basis shares rather than defaulting to FIFO. On a long-held position this routinely cuts the reported gain by 30 to 50 percent.
  4. Donate appreciated assets instead of cash. Gifting stock held over a year to a qualified charity gives a deduction at fair market value and eliminates the embedded gain entirely. A $50,000 position with $10,000 basis produces a $50,000 deduction and avoids roughly $9,500 of federal tax on the $40,000 gain.
  5. Time the sale to a low-income year. A sabbatical, a business loss year, or the window between retirement and Social Security can drop you into the 0 percent long-term bracket. Realizing $90,000 of gain at 0 percent federal instead of 15 percent saves $13,500.

Owners running these decisions through an entity should also confirm the structure itself is not working against them. Our analysis of the entity math that decides your tax bill covers how classification changes the answer.

Ready to Reduce Your Tax Bill?

KDA Inc. specializes in strategic tax planning for business owners, S Corps, LLCs, and high-net-worth individuals. Book a personalized consultation and walk away with a clear plan.

Book Your Free Consultation

Frequently Asked Questions

Do I owe capital gains tax if I reinvest the proceeds?

Yes, with narrow exceptions. Buying another stock, another house, or another business does not defer the tax. Only specific statutory provisions such as a 1031 exchange for investment real property or a Qualified Opportunity Fund rollover create deferral. Reinvesting into a regular brokerage account triggers the full tax in the year of sale.

How are capital gains reported on my return?

Individual transactions go on Form 8949, which feeds totals to Schedule D. Schedule D then flows to Form 1040. If you have Net Investment Income Tax exposure, Form 8960 is also required. Real estate sales typically generate a Form 1099-S from the closing agent, and the IRS matches it against your return.

Can I avoid capital gains tax by holding until death?

Assets held until death generally receive a stepped-up basis to fair market value on the date of death, which eliminates the built-in gain for heirs entirely. This is why selling a highly appreciated asset at age 82 to fund living expenses is often worse than borrowing against it. The strategy carries estate tax and liquidity considerations that need to be modeled before relying on it.

What if I sold at a loss on everything?

Net capital losses offset up to $3,000 of ordinary income per year, with the remainder carried forward indefinitely. Keep the carryforward schedule with your permanent records, because it is a real asset and it is the single most commonly lost tax attribute when people change preparers.

This information is current as of 11/19/2026. Tax laws change frequently. Verify updates with the IRS or FTB if reading this later.

The One Line Worth Remembering

Capital gains tax is not calculated on the day you sell. It is calculated on every decision you made in the eighteen months before you sold.

Book Your Capital Gains Strategy Session

If you are holding an appreciated position, a rental, a business interest, or a concentrated stock grant and you have not modeled the tax before the sale, you are leaving the outcome to chance. We will run the basis, the holding period, the netting sequence, and the state exposure, then show you what each sale date actually costs. Book your consultation now and know the number before you pull the trigger.

SHARE ARTICLE

How Is Capital Gains Tax Figured? The 2026 Four-Step Calculation

SHARE ARTICLE

What's Inside

Picture of  <b>Kenneth Dennis</b> Contributing Writer

Kenneth Dennis Contributing Writer

Kenneth Dennis serves as Vice President and Co-Owner of KDA Inc., a premier tax and advisory firm known for transforming how entrepreneurs approach wealth and taxation. A visionary strategist, Kenneth is redefining the conversation around tax planning—bridging the gap between financial literacy and advanced wealth strategy for today’s business leaders

Read more about Kenneth →

Much more than tax prep.

Industry Specializations

Our mission is to help businesses of all shapes and sizes thrive year-round. We leverage our award-winning services to analyze your unique circumstances to receive the most savings legally.

About KDA

We’re a nationally-recognized, award-winning tax, accounting and small business services agency. Despite our size, our family-owned culture still adds the personal touch you’d come to expect.

A KDA Family of Companies
Uncle Kam
Tax Strategy Marketplace Connect with certified tax strategists nationwide