Finance Calculator

Capital Gains Calculator

Calculate a generic realized capital gain or loss from purchase cost, adjusted basis, sale proceeds and transaction expenses, with an optional user-rate tax estimate.

Last reviewed: June 28, 2026Finance Phase 5 engine v1.0.0: capital-gains basis, generic tax estimates, property operating returns, amortized financing, sale proceeds and IRRJurisdiction-neutral estimate

Finance calculator

Capital Gains Calculator

Changing the currency changes the display unit only. It does not convert the amount between currencies.

Capital gains mode

Currency and acquisition

Used by total-value and property modes.

Basis adjustments
Sale and expenses

Used by total-value and property modes.

%
Generic user-rate tax estimate

NexaCalc does not determine official short-term or long-term status.

%
%
Scenario comparison
No result yet. Enter assumptions and calculate to see the result, visual breakdown and detailed rows.
XFacebookLinkedIn

What is a capital gain or loss?

A capital gain or loss is a pre-tax result from selling a capital asset. NexaCalc models it as amount realized minus adjusted basis. The page is intentionally broader than the Stock Profit Calculator because it can include basis adjustments, property-like costs and a generic user-rate tax estimate.

What is adjusted basis?

Adjusted basis is the purchase-side value used in the gain calculation after user-entered additions and reductions. The calculator does not decide whether an item legally belongs in basis; it simply applies the labels entered.

Purchase cost and acquisition expenses

For per-unit assets, gross acquisition cost equals quantity times purchase price per unit. For total-value mode, it uses the entered purchase cost. Acquisition fees and other purchase expenses are added to basis.

Basis additions

Capital improvements and additional basis items increase adjusted basis in the model. This can fit property improvements, transaction-specific costs or other documented adjustments when the user decides they apply.

Basis reductions

Basis reductions, depreciation entered by the user and return-of-capital adjustments reduce adjusted basis. Reductions can increase a modeled gain or reduce a modeled loss.

Amount realized

Amount realized equals gross sale proceeds minus selling expenses. Selling expenses can include fixed costs, other expenses and a percentage of gross sale proceeds.

Selling expenses

Percentage selling expenses are calculated from gross sale proceeds before fixed costs are subtracted. A 100% or higher selling-expense rate is rejected because break-even math would not be meaningful.

Gain versus sale proceeds

Sale proceeds are not the same as gain. A large sale value can still produce a small gain if adjusted basis and selling costs are also high.

Holding-period return

Holding-period return divides gain or loss by adjusted basis. It is a transaction return, not a tax classification.

Annualized return

Annualized return is calculated from amount realized divided by adjusted basis over elapsed years. It is not labeled CAGR when intermediate cash flows or tax effects are involved.

Generic tax-estimate mode

The optional tax estimate applies only user-entered rates, offsets, allowances and fixed adjustments. It does not embed tax brackets, exemptions, filing status or country-specific rules.

Capital loss limitations

For a loss, the calculator does not estimate a refund or tax saving. Whether a loss is deductible, limited or carried forward depends on rules outside this page.

Securities versus property

Securities often need lot records and broker statements. Property can involve improvements, depreciation and sale costs. This calculator keeps those inputs manual and transparent.

What the calculator does not determine

NexaCalc does not determine recapture, home-sale exclusions, wash sales, indexation, crypto lots, inherited basis, gifted basis or foreign-exchange tax consequences.

Recordkeeping importance

The calculator is only as good as the records entered. Purchase confirmations, settlement statements, improvement records, broker statements and tax records can all matter.

Worked example

Security example: 100 units bought at 50 with 10 acquisition fee and sold at 65 with 10 selling fee gives 5,010 adjusted basis, 6,490 amount realized, 1,480 gain and 296 estimated tax at a user-entered 20% rate. Property example: 300,000 purchase cost, 10,000 acquisition costs, 20,000 improvements, 5,000 basis reductions, 400,000 sale and 24,000 selling expenses gives 325,000 adjusted basis and 51,000 gain.

Frequently asked questions

What is a capital gain or loss?

A capital gain or loss is the difference between the amount realized from selling an asset and the adjusted basis entered for that asset.

Does this calculate official capital gains tax?

No. The tax result is a generic user-rate estimate based only on the rates, offsets, allowances and fixed adjustment entered by the user.

What is adjusted basis?

Adjusted basis starts with purchase cost and acquisition expenses, then adds user-entered basis additions and subtracts user-entered basis reductions.

Can I use this for stocks?

Yes. Per-unit mode can model a basic security sale, but it does not replace broker lot accounting, FIFO, LIFO or specific-identification records.

Can I use this for property?

Yes. Property or adjusted-basis mode supports purchase cost, acquisition costs, improvements, basis reductions and selling expenses.

Does NexaCalc classify short-term or long-term gains?

No. Holding days and years are shown when dates are entered, but official classification depends on jurisdiction and asset-specific rules.

How are selling expenses handled?

The calculator subtracts fixed selling costs, other selling expenses and any percentage selling cost from gross sale proceeds to estimate amount realized.

What happens if the result is a loss?

The calculator shows a capital loss and sets percentage tax to zero by default. It does not estimate tax refunds or loss deductibility.

What is the break-even sale value?

It is the gross sale proceeds needed for amount realized to equal adjusted basis after entered selling expenses.

Why can annualized return be unavailable?

Annualized return is only calculated when adjusted basis, amount realized and elapsed holding years are all positive.

Does this handle depreciation recapture or home-sale exclusions?

No. Recapture, exclusions, wash-sale rules, inheritance, gifts, crypto accounting and jurisdiction rules are outside this generic calculator.

References

  • IRS Topic No. 409, Capital Gains and Losses. Source.
  • IRS Publication 551, Basis of Assets. Source.
  • IRS Publication 550, Investment Income and Expenses. Source.
  • IRS Publication 544, Sales and Other Dispositions of Assets. Source.
  • SEC Investor.gov, investment return and risk education source family. Source.

References reviewed on June 28, 2026. The calculator does not copy tax-rate tables or jurisdiction-specific rules.

Tax disclaimer

Adjusted basis, taxable gain, holding-period classification, exemptions, losses, recapture and tax rates depend on the asset, transaction, taxpayer and jurisdiction. Review official records and consult a qualified tax professional before filing or making a financial decision.