Long Term Capital Gains Calculator

Measure gains, taxes, and retained profit before filing decisions. Review every cost and adjustment clearly. See rates, proceeds, basis, and taxes in one dashboard.

Calculator Inputs

The form uses a 3-column layout on large screens, 2 columns on smaller screens, and 1 column on mobile devices.

Editable thresholds and rates let you match your own tax year or jurisdiction.
Useful when investment income and total income exceed your chosen threshold.

Starter thresholds are editable convenience values. Adjust every rate and threshold to match your own filing year, rules, and jurisdiction.

Example Data Table

This sample shows how values can be entered before calculating an estimated long-term capital gain result.

Asset Units Buy Price Sell Price Purchase Fees Sale Fees Other Income Loss Carryover
Growth Fund A 100 $45.00 $78.00 $150.00 $175.00 $90,000.00 $500.00
Tech Shares B 40 $120.00 $165.00 $30.00 $35.00 $110,000.00 $0.00
Rental Lot C 1 $180,000.00 $245,000.00 $2,100.00 $3,500.00 $72,000.00 $2,500.00

Formula Used

  • Gross Basis = Quantity × Purchase Price Per Unit
  • Adjusted Basis = Gross Basis + Purchase Fees + Improvements + Basis Adjustments
  • Gross Sale Value = Quantity × Sale Price Per Unit
  • Net Sale Proceeds = Gross Sale Value − Sale Fees
  • Realized Gain = Net Sale Proceeds − Adjusted Basis
  • Recognized Gain = Realized Gain − Loss Carryover − Exclusion Amount
  • Taxable Long-Term Gain = max(Recognized Gain, 0)
  • 0% Portion = min(Taxable Gain, max(Lower Threshold − Other Taxable Income, 0))
  • Middle Portion = min(Remaining Gain, max(Upper Threshold − max(Other Income, Lower Threshold), 0))
  • Upper Portion = Remaining Gain after lower and middle layers
  • Federal Tax = (Middle Portion × Middle Rate) + (Upper Portion × Upper Rate)
  • State Tax = Taxable Gain × State Rate
  • NIIT Estimate = min(Taxable Gain, max(Other Income + Taxable Gain − NIIT Threshold, 0)) × NIIT Rate
  • Total Tax = Federal Tax + State Tax + NIIT Tax
  • After-Tax Gain = Taxable Long-Term Gain − Total Tax
  • Net After-Tax Proceeds = Net Sale Proceeds − Total Tax

How to Use This Calculator

  1. Enter the asset name, units, purchase price, and sale price.
  2. Add purchase and sale fees so the basis and proceeds reflect actual transaction costs.
  3. Include improvement costs or other basis adjustments when they legally increase basis.
  4. Enter your other taxable income so the gain can stack against your chosen thresholds.
  5. Adjust the lower and upper thresholds, gain rates, state rate, and optional NIIT settings.
  6. Add any capital loss carryover or exclusion amount that should reduce recognized gain.
  7. Press Calculate Capital Gains to show the result above the form.
  8. Use the CSV and PDF buttons to export the computed breakdown.

Frequently Asked Questions

1. What makes a capital gain long-term?

A gain is generally treated as long-term when the asset is held for more than one year before sale. This page also checks the holding period when both dates are entered.

2. Why should I include purchase and sale fees?

Transaction costs change both basis and net proceeds. Ignoring them can overstate your gain and produce a tax estimate that is too high.

3. What is a basis adjustment?

A basis adjustment is any amount that changes your original cost basis, such as capitalized expenses, improvements, or certain corrections required by records.

4. Why does the calculator ask for other taxable income?

Long-term gain rates often stack on top of other taxable income. That means ordinary income can reduce the amount of gain that fits inside lower-rate bands.

5. Can this calculator handle capital losses?

Yes. Enter your loss carryover to reduce recognized gain. If the final recognized amount drops below zero, taxable long-term gain is shown as zero.

6. What is NIIT in this calculator?

NIIT is an optional surtax estimate applied when combined income exceeds your chosen threshold. The calculator applies it to the smaller of taxable gain or threshold excess.

7. Are the thresholds fixed?

No. They are editable. You can enter values that fit a different filing year, jurisdiction, planning scenario, or a custom advisory assumption.

8. Can I rely on this page as tax advice?

No. It is an educational estimator. Complex issues like recapture, wash-sale effects, residency rules, or special exemptions require professional review.

Related Calculators

depreciation recapture tax calculatorcrypto capital gains calculatorbusiness asset sale tax calculatorproperty capital gains calculatorstock gain tax calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.