Capital Gains Tax Calculator and Guide: Short-Term vs Long-Term Capital Gains Explained

Selling an investment, a property, or a business interest creates a taxable event, but the tax almost never equals the sale price minus what you originally paid. Adjusted cost basis, selling expenses, holding period, your other income for the year, and the type of asset all move the result, sometimes by a wide margin.
This guide gives you a capital gains tax calculator framework you can run by hand, the verified 2026 rate thresholds, a short-term versus long-term comparison, and the rules that apply specifically to stocks, real estate, and business sales. It also covers the California position, which is the part most online calculators get wrong for California taxpayers.
One thing worth saying at the top: nearly every meaningful planning decision on a capital gain has to be made before the sale closes. After the transaction, the work is reporting.
This is general educational information about business tax returns, not individualized tax advice.
IRS DISCLAIMER This article is general educational information about business tax returns. It is not tax, legal, or accounting advice for any specific business or transaction. Tax rules change, and outcomes depend on individual facts and circumstances. Consult a qualified tax professional before acting on anything described here. |
What is Capital Gains Tax?
Capital gains tax is tax on the profit from selling a capital asset: stocks, real estate, a business interest, or other appreciated property. The profit is not the sale price. It is the sale price reduced by what you have invested in the asset.
The basic formula:
Capital Gain = Sale Proceeds minus Adjusted Cost Basis
A capital loss is the same calculation producing a negative number, and losses matter because they offset gains.
Two inputs do most of the work, and both get mishandled.
Adjusted cost basis starts with what you paid, then moves. It increases for capital improvements, certain acquisition costs, commissions, and reinvested dividends. It decreases for depreciation previously claimed, certain returns of capital, and prior deductions tied to the asset. An owner who uses the original purchase price without adjustments usually overstates the gain on property and understates it on anything depreciated.
Holding period determines which rate structure applies, and it is measured precisely. The count starts the day after acquisition and runs through the day of disposal (source: IRS, Topic no. 409). One day on either side of the one-year mark can change the tax treatment of the entire gain.
Capital Gains Tax Calculator: the Inputs That Actually Matter
Any capital gains tax calculator is collecting the same eight inputs. Gathering them accurately is most of the work, and it is where a hand calculation beats a quick online tool, because you control the basis figure rather than guessing at it.
Calculator Input | Your Amount |
Purchase price or original basis | ___ |
Eligible basis adjustments (improvements, commissions, acquisition costs) | ___ |
Less depreciation previously claimed | ___ |
Adjusted cost basis | ___ |
Sale price | ___ |
Selling expenses (commissions, closing costs, legal fees) | ___ |
Estimated taxable gain | ___ |
Holding period (one year or less, or more than one year) | ___ |
Notice what is not on this list: your tax rate. The rate is not an input you choose, it is an output determined by the gain, your total taxable income, your filing status, and the asset type. This is why two people selling identical assets for identical gains can owe materially different amounts.

How do You Calculate Capital Gains Tax?
Determine the sale proceeds, subtract selling expenses, subtract adjusted cost basis to find the gain, establish the holding period, apply short-term or long-term treatment, net the result against your other capital gains and losses for the year, then layer on any additional federal taxes and state tax. The rate depends on your total taxable income, not on the gain alone.
The full sequence for how to calculate capital gains tax:
Step 1. Identify exactly what was sold, because asset type changes the rules.
Step 2. Determine gross sale proceeds.
Step 3. Subtract selling expenses such as commissions, closing costs, and legal fees.
Step 4. Calculate adjusted cost basis, including improvements and less any depreciation claimed.
Step 5. Subtract basis from net proceeds to find the gain or loss.
Step 6. Determine the holding period, counting from the day after acquisition.
Step 7. Apply short-term or long-term treatment accordingly.
Step 8. Net the result against all other capital gains and losses realized during the year.
Step 9. Consider additional federal taxes that may apply, such as the net investment income tax on investment income above statutory thresholds.
Step 10. Calculate the state tax consequence separately.
A worked example. An investor bought stock for $40,000, paid $200 in acquisition commissions, and sold it fourteen months later for $95,000 with $500 in selling costs.
Adjusted cost basis: $40,200
Net sale proceeds after selling expenses: $94,500
Taxable capital gain: $54,300
Holding period: more than one year, so long-term treatment applies
If that investor's total taxable income places them in the 15 percent long-term bracket, the federal tax on the gain is roughly $8,145, before state tax and before any net investment income tax. Change nothing except the holding period to eleven months, and the same $54,300 is taxed as ordinary income at the investor's marginal rate instead.
Gains and losses are reported on Form 8949 and summarized on Schedule D.

Planning a Sale? Model the Tax Before You Sign.
Pathfinding Consultants — Business Tax Preparation, Orange County, CA
(949) 620-1036 | pathfindingconsultants.com
Short Term vs Long Term Capital Gains Tax
A gain is long-term if you held the asset more than one year before disposing of it, and short-term if you held it one year or less. Long term capital gains tax uses preferential federal rates of 0, 15, or 20 percent. Short term capital gains tax has no preferential rate at all: the gain is taxed as ordinary income at your regular marginal rate, which for many business owners is considerably higher.
Factor | Short-Term Capital Gain | Long-Term Capital Gain |
Holding period | One year or less | More than one year |
Federal treatment | Taxed as ordinary income at your marginal rate | Preferential rates of 0, 15, or 20 percent |
Why it matters | No rate preference, so the gain stacks on top of your other income | The rate preference can be a substantial difference on the same gain |
Planning consideration | Where feasible, confirm the acquisition date before selling near the one-year mark | Holding past one year is a timing decision, not a loophole |
The practical point is narrow and valuable: when a sale is being contemplated close to the one-year anniversary, the acquisition date is worth confirming against records rather than memory. The count begins the day after acquisition.

What is the Capital Gains Tax Rate?
There is no single capital gains tax rate. For long-term gains, the rate depends on taxable income and filing status, and the thresholds are indexed annually.
Filing Status | 0 Percent Applies Up To | 15 Percent Applies Up To | 20 Percent Applies Above |
Married filing jointly or surviving spouse | $98,900 | $613,700 | $613,700 |
Head of household | $66,200 | $579,600 | $579,600 |
Single | $49,450 | $545,500 | $545,500 |
Married filing separately | $49,450 | $306,850 | $306,850 |
Those are the 2026 figures (source: IRS, Revenue Procedure 2025-32, Section 4.03). The thresholds are measured against total taxable income, which includes the gain itself, so a large gain can push a portion of itself into a higher band.
Two asset-specific ceilings also apply. Net gain from collectibles such as art or coins is taxed at a maximum 28 percent rate, and the portion of real property gain attributable to prior depreciation, known as unrecaptured Section 1250 gain, is taxed at a maximum 25 percent rate (source: IRS, Topic no. 409).
Short-term gains have no separate rate schedule at all. They are taxed at ordinary income rates.

Capital Gains Tax on Stocks
Nothing is taxed until a position is sold. An unrealized gain on an appreciated holding creates no tax. A realized gain, on an actual sale, does.
Basis for stock is the purchase price plus acquisition commissions. It also includes reinvested dividends, the single most commonly missed adjustment: each reinvestment bought additional shares at a cost, and that cost is part of basis. An investor who ignores years of reinvested dividends overstates the gain and overpays.
Where capital gains tax on stocks gets complicated is volume. Multiple purchases of the same security at different prices mean the shares sold have to be identified, and the method used affects the result. Brokerage statements report much of this but not always completely, particularly for older positions or transferred accounts.

Capital Gains Tax on Real Estate
Real estate carries more moving parts than any other common capital asset.
Basis in property is rarely the purchase price alone. Capital improvements and certain acquisition closing costs add to it. Depreciation claimed during ownership reduces it, and this is where rental and commercial property owners get surprised: the depreciation that reduced taxable income each year also reduced basis, which increases the gain on sale. The portion of gain attributable to that depreciation is taxed at a maximum 25 percent rate rather than the long-term rate.
Capital gains tax on real estate also depends on how the property was used, since investment and business property follow different rules than a personal residence.
Several provisions commonly come up, and each carries strict eligibility requirements that must be evaluated against the specific facts rather than assumed: the exclusion on sale of a principal residence, like-kind exchange treatment for investment property, and installment sale reporting. None apply automatically, and a like-kind exchange in particular has deadlines that begin running at closing. That evaluation belongs before the closing date.

Capital Gains Tax on Business Sale
Selling a business is not one transaction taxed at one rate. It is many simultaneous transactions, each taxed on its own terms.
Structure matters first. An equity sale transfers ownership interests, and the seller's gain is generally capital. An asset sale transfers the individual assets, and the purchase price has to be allocated across them.
That allocation is where the tax result is decided. Proceeds allocated to goodwill generally receive capital gain treatment. Proceeds allocated to equipment and other depreciated property can generate ordinary income through depreciation recapture. Proceeds allocated to inventory or to a consulting or non-compete agreement are generally ordinary income.
So a seller can negotiate a headline price and still be surprised, because the tax depends on how that price was split, and the buyer's preferred allocation is frequently the opposite of the seller's. This is a negotiation item, not a tax return item. We cover the allocation mechanics in our guide to asset sale vs stock sale treatment.
Capital gains tax on business sale outcomes are set when the purchase agreement is signed.

Capital Losses and How They Offset Gains?
Capital losses are the most underused tool in this area, largely because people forget they have them.
Losses first offset gains of the same character, short-term against short-term and long-term against long-term, then across categories. If total capital losses exceed total capital gains for the year, you may deduct the lesser of $3,000, or $1,500 if married filing separately, or your total net loss against other income. Any remaining loss carries forward to later years (source: IRS, Topic no. 409).
Two things follow. Carryforwards persist: a loss from a prior year that was never fully used is still available, and it is frequently sitting unclaimed on an old return nobody checked. Before a large gain, the prior-year returns are worth pulling.
And timing is a real lever. Gains and losses realized in the same tax year net against each other. A gain realized in December and a loss realized the following January do not.

California Capital Gains Tax
This is the section that changes the math for California taxpayers, and most online calculators omit it entirely.
California gives capital gains no preferential treatment. All capital gains are taxed as ordinary income, and California does not have a lower rate for capital gains (source: California FTB, Capital gains and losses).
Read that against the federal position. Federally, a long-term gain may be taxed at 0, 15, or 20 percent. In California, the same gain is taxed at the taxpayer's ordinary California rate, whether it was held fourteen months or fourteen years. The holding period that matters so much federally does nothing at the state level.
For a California owner selling a business, a property, or a large stock position, the combined federal and state result is meaningfully higher than a federal-only calculator shows. An Orange County or Irvine owner modeling a sale on a national calculator is working from an incomplete number.
California Schedule D (540) is used where the California treatment of gains and losses differs from the federal treatment.

How Can You Legally Reduce or Plan for Capital Gains Tax?
Capital gains tax planning works on timing, basis, structure, and offsetting, and nearly all of it has to happen before the transaction closes. There is no general method of avoiding tax on a realized gain. What exists are legitimate choices about when a gain is realized, how a transaction is structured, what basis can be substantiated, and what losses offset it.
The levers that genuinely exist:
Timing the sale, including which tax year the gain lands in and how it stacks with your other income that year
Holding period, where a sale is near the one-year mark and the date can be confirmed
Substantiating basis thoroughly, since every documented improvement and cost reduces the gain
Harvesting or applying capital losses, including carryforwards from prior years
Transaction structure, particularly on a business sale, where allocation drives the character of the income
Installment reporting where eligible, spreading recognition across years
Charitable planning, where appreciated assets are being donated rather than sold
Coordinating the sale with the rest of your income picture for that year
Each of these depends on facts and eligibility requirements, and none is universally appropriate. What they share is a deadline: they are decisions, and decisions close when the transaction does.

Common Capital Gains Tax Mistakes
Confusing the sale price with the taxable gain.
Using the original purchase price and ignoring years of basis adjustments.
Losing the records for improvements, commissions, and acquisition costs.
Forgetting that depreciation claimed on a rental or business property reduced basis and increases the gain.
Overlooking reinvested dividends when calculating stock basis.
Misjudging the holding period by counting from the acquisition date rather than the day after.
Assuming every dollar from a business sale receives capital gain treatment.
Ignoring capital loss carryforwards from prior years.
Running a federal calculator and treating the result as the total tax owed in California.
Beginning the conversation after the transaction has already closed.

Capital Gains Tax Preparation Versus Tax Planning
Tax preparation reports a transaction that already occurred. By then basis is what the records support, the holding period is fixed, the allocation is whatever the signed agreement says, and the year the gain lands in is settled.
Tax planning evaluates those same variables while they are still variables. An owner who models the consequences before finalizing a deal has choices about structure, timing, and offsetting. An owner who asks after signing has a reporting exercise.

Pathfinding Consultants works with business owners and investors on modeling tax consequences before a sale, including cost basis review, transaction structure, available capital losses, estimated payment impact, and the combined federal and California result. Clients throughout Orange County, including Irvine, and across California are welcome to start with a conversation before a transaction, not after.
Related reading on pathfindingconsultants.com: our guide to asset sale vs stock sale treatment, our guide to small-business tax deductions in California, our LLC vs S Corp tax differences comparison, our self-employment tax calculator and guide, our guide to quarterly estimated tax payments, our explanation of the net investment income tax, and our tax planning services page.
The Best Time to Model a Sale Is Before You Sign
Pathfinding Consultants — Business Tax Preparation, Orange County, CA
(949) 620-1036 | pathfindingconsultants.com





Comments