Capital Gains Tax Calculator - Federal Tax Estimate
Use this capital gains tax calculator to estimate 2025 federal tax on an investment sale by basis, taxable income, holding period, and filing status.
Capital Gains Tax Calculator
Results
What Is Capital Gains Tax Calculator?
A capital gains tax calculator estimates the federal tax tied to profit when you sell an investment or other capital asset. Enter your adjusted cost basis, sale proceeds, taxable income before the sale, holding period, and filing status to see a gain or loss, regular federal tax, optional NIIT, total estimated tax, and net proceeds. Use it before selling stocks, mutual funds, cryptocurrency, or investment property so the tax impact is part of the decision rather than a surprise after the transaction.
- • Planning a stock sale: Estimate how much of a taxable gain may remain after federal tax before you place an order. The result can help you compare selling now with waiting until the position qualifies for long-term treatment.
- • Comparing holding periods: Run the same basis and sale proceeds as short-term and long-term scenarios. This makes the difference between ordinary-income brackets and preferential long-term bands visible.
- • Checking a property or crypto estimate: Use the calculator for a first-pass federal estimate on an investment property, digital asset, or other capital asset when you know its adjusted basis and amount realized.
- • Setting aside cash: Use estimated tax and net proceeds to decide how much cash to reserve. A high-income user can also switch on NIIT to see a separate 3.8% estimate.
This is a planning estimate for one sale, not a completed tax return. It uses 2025 federal thresholds and treats the taxable-income input as the amount already present before this gain. Enter taxable income after deductions rather than gross wages; using salary as a substitute can place the gain in the wrong bracket. State and local taxes are not included.
The calculator is most useful when you want an answer: if I sell this asset for this amount, what federal tax should I tentatively reserve, and what proceeds might remain? Keep brokerage statements and basis records because the actual return may include multiple lots, losses, carryovers, or special rules. A capital gains tax calculator is a starting point, not a substitute for the complete return.
If you want to project the portfolio growth that may create a future taxable sale, use the Investment Calculator before estimating its tax impact.
How Capital Gains Tax Calculator Works
The calculation starts with the difference between sale proceeds and adjusted basis. Positive gains receive different treatment depending on whether the asset was held one year or less or more than one year.
- Adjusted basis: Your tax basis after qualifying adjustments, such as certain improvements or reinvested amounts.
- Sale proceeds: The amount realized from the transaction before estimated tax.
- Taxable income before gain: Estimated federal taxable income already in the return before adding this sale.
- Holding period and status: The choices that determine ordinary brackets, long-term thresholds, and NIIT thresholds.
Short-term treatment is progressive. The calculator taxes the gain by comparing ordinary federal tax before and after the gain, so a gain that crosses a bracket can have a blended effective rate. Long-term treatment also uses stacking: ordinary income fills the capital-gain bands first, then the gain is split across any remaining 0%, 15%, and 20% space.
According to the IRS Tax Topic No. 409, a capital gain generally comes from selling an asset for more than its adjusted basis, and an asset held more than one year is generally long-term. The official topic also explains important holding-period exceptions.
Example: $5,000 long-term gain
Suppose your basis is $10,000, sale proceeds are $15,000, and taxable income before the sale is $75,000 for a single filer.
The gain is $15,000 − $10,000 = $5,000. Because $75,000 already exceeds the 2025 single-filer 0% long-term ceiling of $48,350 but is below the 15% ceiling of $533,400, the gain is estimated at 15%.
Regular federal tax attributable to the gain is $5,000 × 15% = $750. With NIIT off, total estimated tax is $750 and net proceeds are $14,250.
This is an estimate for the gain itself, not the taxpayer's total federal income tax bill.
After you calculate the gain, the Percentage Return Calculator can show the pre-tax percentage return alongside the federal tax estimate.
Key Concepts Explained
Four ideas explain most differences between a quick gain estimate and the number that ultimately appears on a tax return.
Adjusted basis
Basis is more than a guess at the purchase price. It can reflect commissions, qualifying improvements, reinvestments, depreciation, gifts, inheritance, or other adjustments. Use the basis supported by your records.
Short-term gain
A gain from property held one year or less is generally short-term and is treated as ordinary income. Its incremental tax can cross several ordinary brackets, so the calculator compares tax before and after the sale.
Long-term gain
A gain from property held more than one year is generally long-term. For 2025, most net long-term gains use 0%, 15%, or 20% bands based on taxable income and filing status.
NIIT
The Net Investment Income Tax is a separate 3.8% tax for some higher-income individuals. It is based on the lesser of net investment income or MAGI above the status threshold, not simply on every investment sale.
A capital loss is shown as a negative gain and receives zero tax in this isolated-sale estimate. That does not mean a loss has no tax value. Capital losses may offset gains and, subject to IRS limits, some ordinary income or future gains; the full ordering and carryover process requires the rest of the return.
Taxable income is the key input for rate-band stacking. If you only know gross income, first account for deductions and other adjustments or label the result as a rough scenario.
When you need the price-appreciation component of an investment return rather than its tax bill, use the Capital Gains Yield Calculator.
How to Use This Calculator
Use a current statement or tax projection when entering each field. The result becomes more useful when the basis and taxable-income assumptions match the same tax year.
- 1 Enter adjusted basis: Enter the tax basis for the shares, asset, or property lot being sold. Include qualifying adjustments and selling costs only when they belong in your basis calculation.
- 2 Enter sale proceeds: Enter the amount realized from the sale. The difference between this number and basis is the calculator's gain or loss.
- 3 Add pre-gain taxable income: Enter estimated federal taxable income before this transaction. Do not automatically enter gross salary, because deductions can materially change the rate bands.
- 4 Choose holding period: Select short-term for one year or less or long-term for more than one year, while checking the actual acquisition and disposition dates for exceptions.
- 5 Choose filing status: Select single, joint, separate, or head of household so the 2025 thresholds match your return.
- 6 Review optional NIIT: Choose Yes only if you want an approximate NIIT calculation. Compare total tax, effective gain rate, and net proceeds, then repeat with another sale date or price if useful.
For a stock lot bought for $10,000 and expected to sell for $15,000, enter $75,000 of projected taxable income before the gain, select long-term and Single, and leave NIIT off unless the MAGI threshold may apply. The estimate is a $5,000 gain, $750 regular tax, and $14,250 net proceeds.
Benefits of Using This Calculator
An estimate does not replace tax preparation, but it can improve decisions around an investment sale.
- • Reserve cash for tax: Use total estimated tax as a planning amount when deciding how much of the sale proceeds should remain available for a payment or estimated-tax adjustment.
- • See the value of timing: Run short-term and long-term versions to see whether crossing the one-year holding period changes the federal estimate enough to affect your sale date.
- • Understand bracket stacking: The calculator shows why a gain is not always taxed at one headline rate. It allocates only the gain across the remaining brackets.
- • Compare sale prices: Change the proceeds field to model a range of market prices and see the corresponding tax drag and after-tax return.
- • Spot missing questions: A loss, a high-income NIIT result, or an unexpectedly large tax estimate signals that you should review basis, other gains and losses, deductions, and special asset rules.
Use the output as a decision aid rather than as permission to sell. A brokerage account may contain several tax lots with different bases and holding periods, and a real-estate sale can involve improvements, depreciation recapture, selling expenses, or a home-sale exclusion.
For a return metric that does not estimate tax, compare the result with the Return on Investment Calculator.
Factors That Affect Your Results
The estimate changes when the transaction facts or tax-return assumptions change. Review these factors before treating the displayed amount as a reserve target.
Basis and selling expenses
A higher valid basis generally reduces the gain, while a lower basis increases it. Missing or incorrect records can therefore change both tax and return.
Taxable income
Pre-gain taxable income fills ordinary or long-term rate bands before the gain. A gain that crosses a threshold may have more than one marginal rate.
Holding period
One year or less generally produces short-term treatment; more than one year generally produces long-term treatment. Exact dates and statutory exceptions matter.
Filing status
Each status has different 2025 ordinary brackets, long-term thresholds, and NIIT thresholds, so the same gain can produce different estimates.
Other investment activity
Other gains, losses, carryovers, collectibles, qualified small-business stock, depreciation recapture, and a principal-residence exclusion can change the return.
- • Federal-only estimate: state and local taxes are not included, and the page does not choose a state rate from your location.
- • Single-sale approximation: the calculator does not prepare Form 8949 or Schedule D, apply capital-loss ordering and carryovers, or model every adjusted-basis rule.
- • NIIT approximation: the optional calculation uses pre-gain taxable income as a proxy for MAGI and assumes the gain is net investment income. Use your actual MAGI and net investment income for a return-level estimate.
- • The tax year is 2025. Thresholds change, and the IRS publishes annual updates. Recheck the applicable year before filing or making a major sale.
According to IRS Topic No. 559, net investment income can include net gains from stocks, bonds, mutual funds, and real estate, while the 3.8% tax follows a lesser-of rule. The IRS 2025 federal bracket tables support the ordinary-income schedule.
IRS Publication 550 provides further guidance for records and special transactions and explains why basis records and holding-period details matter. If the sale is large, involves property, inherited assets, restricted stock, multiple lots, or a loss carryover, ask a qualified tax professional to review the complete facts.
If the asset is part of a larger transfer or inheritance plan, the Estate Tax Calculator addresses a different tax question than this sale estimate.
Frequently Asked Questions
Q: How much is capital gains tax?
A: It depends on the gain, holding period, taxable income, and filing status. For 2025, most long-term gains use 0%, 15%, or 20% bands, while short-term gains use ordinary federal brackets. This calculator estimates the tax attributable to one gain and can add an approximate NIIT.
Q: What is the difference between short-term and long-term capital gains?
A: An asset held one year or less is generally short-term and its gain is taxed as ordinary income. An asset held more than one year is generally long-term and may qualify for the 0%, 15%, or 20% federal capital-gain rates. Exceptions exist, so check the IRS rules for your asset.
Q: How do I calculate capital gains tax on stocks?
A: Subtract the stock's adjusted basis from its sale proceeds to find the gain. Then classify the holding period, add the gain to your pre-gain taxable income, and apply the filing-status-specific rate bands. Include commissions or other basis adjustments only when they are supported by your records.
Q: Can capital losses offset capital gains?
A: Capital losses can generally offset capital gains, but the ordering and carryover rules depend on the full set of transactions on your return. This calculator shows a loss and assigns zero tax to that isolated sale; it does not calculate the deductible amount or future carryover.
Q: When do you pay capital gains tax on real estate?
A: A taxable real-estate gain is generally reported for the year of sale, but the result can depend on adjusted basis, depreciation, selling expenses, use of the property, and possible home-sale exclusions. This page is only a federal one-sale estimate and does not model those special rules.
Q: What is the Net Investment Income Tax?
A: NIIT is a separate 3.8% tax that may apply to net investment income when modified adjusted gross income exceeds an IRS threshold. The thresholds are $200,000 for single or head-of-household filers, $250,000 for joint filers, and $125,000 for separate filers.