← Back to calculator
Getting Started

How to Use the Capital Gains Tax Calculator

You sold something — stock, crypto, a rental property — and now you want to know what you owe before your accountant tells you. Our capital gains tax calculator gets you an IRS-accurate federal number in about ninety seconds, but only if you feed it the right inputs. The two mistakes that break almost every estimate are entering the capital gain inside the income field and mis-entering the purchase date by a day or two. Both are easy to avoid once you know what each box is actually asking for.

This guide walks through the calculator field by field, explains how to read every number in the results panel, and covers the accuracy edge cases the tool does not model. It's written for the 2026 tax year using the bracket thresholds from IRS Rev. Proc. 2025-32.

Before you start, gather three things: your Form 1099-B or trade confirmations (for prices, share counts, and dates), your estimated annual income for the year, and your filing status. With those in hand the whole process takes under two minutes.

The 60-second quick start

If you just want the number and will read the details later, here's the compressed version. Open the calculator, leave the tax year on 2026, pick your filing status, type your salary into Annual Income, enter what you paid per share and what you sold for per share, enter the share count, set both dates, and press the green button. Everything else on the page is explanation and optional refinement.

The calculator loads with a fully worked example already filled in — 100 shares bought at $100 on January 15, 2024 and sold at $150 on March 20, 2026, on a $75,000 income. If you want to see what a finished result looks like before entering your own figures, just press Calculate on those defaults. It's often easier to understand the output when you already know what the inputs mean.

Step-by-step: filling in the calculator

The form is split into two visual blocks. The top block, labelled Your situation, establishes your tax bracket. The second block, Your stock sale, describes the transaction itself. Work top to bottom.

  1. Choose your tax year and filing status

    Tax Year is the year the sale happened, not the year you bought. Capital gains are taxed when they're realized, so a December 31 sale belongs to that year even if the cash settles in January. The selector currently offers 2026 because that's the year the bracket data is certified against.

    Filing Status has four options: Single, Married Filing Jointly, Married Filing Separately, and Head of Household. This choice matters more than most people expect — the 0% capital gains ceiling is $49,450 for a single filer but $98,900 for a couple filing jointly. Pick the status you will actually use on the return, not the one you used last year if your situation changed.

    What you'll seeTwo side-by-side dropdowns at the top of the white calculator card, each with a small grey hint beneath it ("The year you sold the stock" and "How you file your return").
  2. Enter your annual income before the sale

    Annual Income is the single most misunderstood field on the page. It wants your ordinary income for the year, excluding the profit from this sale — wages, salary, self-employment income, interest, pension, and rental income. The calculator stacks your capital gain on top of this figure to work out which bracket the gain lands in, so if you include the gain here it gets counted twice and your estimate comes out too high.

    Use your gross figure rather than your take-home pay. If you're mid-year and don't know your final number, annualise: multiply your year-to-date income by twelve and divide by the number of months elapsed. Being roughly right matters far more than being precise, unless you're sitting near a bracket boundary — in which case run the calculation twice with a low and a high estimate to see how much the answer moves.

    Technically: the IRS brackets are keyed to taxable income (after your standard or itemized deduction), while this field asks for gross income. The calculator applies the 2026 standard deduction for your filing status internally. If you itemize heavily, your real bracket may be lower than the tool shows.
  3. Enter purchase price, sale price, and number of shares

    Purchase Price is your cost per share, not the total you invested. Sale Price is likewise per share. Number of Shares is how many you sold — which may be fewer than you own. The calculator multiplies these out for you: sale price times shares gives total proceeds, purchase price times shares gives your cost basis, and the difference is your capital gain.

    Read these off your 1099-B rather than from memory. Brokers report proceeds and cost basis per lot; if your form shows totals instead of per-share figures, divide by the share count first — or enter the totals as the two prices and put 1 in the share field, which produces the same answer.

    Selling at a loss is fine. Enter a sale price lower than your purchase price and the calculator recognises a capital loss, reports it as a negative gain, and shows zero tax owed rather than erroring out.

    What you'll seeA four-field grid under the "Your stock sale" heading. Purchase Price and Sale Price each carry a $ prefix inside the input box; Broker Fees sits beside them with a small ✦ PRO badge and reads "Unlock with Pro" until you have a licence.
  4. Set your purchase and sale dates

    There is no "holding period" box to fill in — the calculator derives it from Purchase Date and Sale Date. That gap decides whether your profit is taxed at preferential long-term rates of 0%, 15%, or 20%, or at your ordinary income rate, which can reach 37%. On a $50,000 gain, that single distinction is worth roughly $11,000.

    The threshold is more than one year. The IRS counts from the day after acquisition through the day of sale, so shares bought on March 15, 2025 become long-term on March 16, 2026. Selling on the anniversary itself is still short-term. Enter the trade dates, not the settlement dates.

    As soon as both dates are valid, a coloured strip appears above the Calculate button telling you whether you're looking at a short-term or long-term gain, along with the exact holding period. Watch that strip — it's the fastest way to catch a mistyped year.

  5. Calculate and review the results

    Press Calculate My Capital Gains →. A brief skeleton loader appears, then the results panel expands below the form with five summary cards, a plain-English sentence explaining your situation, a Smart Tax Insights list, and a line-by-line Full Calculation Breakdown. Nothing is submitted anywhere — the maths runs entirely in your browser and your figures never leave your device.

    If your gain came out short-term, one extra panel appears: What if you wait to sell?, comparing the tax you'd owe now against the tax on the same gain held past the one-year mark. That comparison is often the single most valuable output on the page.

What each input field actually means

A consolidated reference, including the two Pro-gated fields:

FieldWhat to enterCommon mistake
Tax YearThe year of the saleUsing the purchase year
Filing StatusThe status on the return you'll fileGuessing between MFJ and MFS — they have very different thresholds
Annual IncomeGross ordinary income excluding this gainIncluding the capital gain, which double-counts it
State Tax (Pro)Your state of tax residenceChoosing where the asset is rather than where you file
Purchase PriceCost per shareEntering the total invested instead of the per-share price
Sale PriceProceeds per shareUsing the day's closing price instead of your fill price
Number of SharesShares sold in this transactionEntering total holdings rather than the quantity sold
Broker Fees (Pro)Total commissions on both sidesForgetting them — fees legitimately reduce taxable gain
Purchase DateTrade date you acquiredUsing settlement date, which is 1–2 days later
Sale DateTrade date you soldSame settlement-date confusion

How to read your results

The results panel is deliberately layered: headline numbers first, then reasoning, then the audit trail. Here's what each element is telling you.

The five summary cards

Above the cards, a badge states the classification — "Long-term gain (>1 year)" or short-term — next to the precise holding period, for example "Held 2yr 2mo". Confirm that badge before you trust anything below it.

Smart Tax Insights and In Plain English

The insights list flags situation-specific items the raw numbers don't surface: how close you are to a bracket edge, whether waiting would move you into long-term treatment, whether you're approaching the NIIT threshold, and how much 0% headroom you have left. The plain-English box restates your result as one sentence, which is useful for sanity-checking that you entered what you meant to enter.

The Full Calculation Breakdown

This is the audit trail, and it's the section to screenshot for your CPA. It walks the arithmetic in order: total sale proceeds, original cost basis, broker fees deducted, capital gain, gain type, federal rate applied, federal tax owed, state tax, NIIT, and net profit after tax. If a headline number looks wrong, the culprit is almost always visible in the first two lines here — proceeds or basis — which means a price or share-count typo.

Reading the NIIT line: the 3.8% Net Investment Income Tax kicks in when modified AGI passes $200,000 (single) or $250,000 (married filing jointly). Those thresholds have never been indexed to inflation, so more filers get caught every year. When it applies, an amber warning appears above the breakdown. See our long-term gains guide for the full mechanics.

Six tips for an accurate estimate

  1. Work from your 1099-B, not memory. Brokers report adjusted basis that already accounts for splits, reinvested dividends, and return-of-capital distributions. Recreating it by hand usually understates your basis, which overstates your tax.
  2. Include reinvested dividends in your basis. Each automatic reinvestment is a separate purchase at that day's price. On a fund held ten years this can add thousands to basis and cut your taxable gain meaningfully.
  3. Add capital improvements for property. A new roof or an addition raises your basis; routine repairs do not. Keep receipts.
  4. Run each lot separately. If you bought the same stock at several prices and sold part of the position, the specific shares you sold determine your gain. Sum the results, or use the Pro multi-stock tab.
  5. Model both sides of a bracket boundary. If your income estimate is uncertain, calculate at the low and high ends. The spread tells you how much precision is actually worth chasing.
  6. Recalculate before you sell, not after. The tool is most valuable as a pre-trade check — that's when holding a few more weeks for long-term treatment is still an option.
What the calculator does not model: AMT, wash sales, prior-year capital loss carryforwards, unrecaptured Section 1250 depreciation recapture on real estate, the 28% collectibles rate, Qualified Small Business Stock exclusions under Section 1202, and the Section 121 home-sale exclusion. If any of those apply to you, treat the output as a starting point and read the relevant guide below.

Free version vs Pro: which do you need?

The federal calculation is free and always will be — no account, no sign-up, no cap on how many times you run it. Pro is a $10 one-time purchase with lifetime access on your device, not a subscription, and it unlocks the same licence across our mortgage, paycheck, and car loan calculators too.

CapabilityFreePro
Federal capital gains tax (0/15/20% + short-term rates)
Holding-period classification & "what if you wait" comparison
NIIT warning & full calculation breakdown
State tax — all 50 states plus DC
Broker fee deduction
Multi-stock netting across trades
Tax-loss harvesting planner
Ad-free experience

Free is enough if you live in a state with no income tax — Texas, Florida, Nevada, Washington, Wyoming, South Dakota, Alaska, or Tennessee — and you sold a single position with no offsetting losses. In that case the federal number is your whole tax bill.

Pro pays for itself immediately in three situations. First, if you live in a state that taxes gains: California adds up to 13.3%, New York up to 10.9%, New Jersey 10.75%. On a $50,000 gain in California the state slice alone is several thousand dollars, and the free version simply doesn't show it. Second, if you sold multiple positions — netting winners against losers is where real money hides, and doing it by hand across a dozen trades is error-prone. Third, if you're still holding losers you could harvest before year-end; the harvesting tab quantifies exactly how much each loss saves you.

If you've already bought Pro and are on a new device or browser, open the Pro modal and paste your licence key into the activation box at the bottom. Activation is stored locally, so clearing site data or using private browsing will require re-entering the key.

Using the calculator for crypto, property, and funds

The interface uses stock language, but the underlying maths applies to any capital asset. The trick is the share field. For a single crypto lot, a rental property, or a fund position, enter your total cost as the purchase price, your total proceeds as the sale price, and 1 as the number of shares.

Two caveats. Crypto has no wash-sale rule under current IRS guidance, which makes loss harvesting more flexible than it is for securities — our crypto tax guide covers the specifics. Real estate frequently involves depreciation recapture taxed at up to 25% and, for a primary residence, the Section 121 exclusion that shelters $250,000 of gain ($500,000 for a couple). Neither is modelled here, so read the real estate guide and home sale guide before relying on a property number.

Troubleshooting common questions

My results show zero tax owed. Is that a bug?

Usually not. Three legitimate paths lead to zero: your taxable income sits under the 0% long-term threshold ($49,450 single, $98,900 married filing jointly for 2026), you sold at a loss, or your gain is small enough that it fits entirely inside your remaining 0% headroom. Check the Full Calculation Breakdown — if the federal rate line reads 0%, the result is real. Retirees and people between jobs hit this often, and it's a genuine planning opportunity.

Why is my tax higher than 15% when I held for years?

Two possibilities. Your gain may straddle a bracket boundary, so part of it is taxed at 15% and part at 20% — the breakdown shows the split. Or the 3.8% NIIT has been added, pushing your effective rate toward 23.8%. Both appear as separate lines in the Total Tax Owed card.

The Calculate button won't do anything.

A field has failed validation, and the offending input will be showing a red message beneath it. The frequent causes are a sale date earlier than the purchase date, a share count below one, and a blank income field. Fix the flagged field and the button responds immediately. If the whole page looks unstyled, JavaScript or a content blocker is interfering — the calculator runs entirely client-side and needs JS enabled.

Can I save or print my result?

Yes. The results panel includes a print header with the CapitalCalc mark and the calculation date, so your browser's Print or Save-as-PDF produces a clean one-page report suitable for handing to a CPA. Nothing is stored on our servers — reload the page and your inputs are gone, which is by design.

Are the brackets current?

The 2026 figures come from IRS Rev. Proc. 2025-32, the official inflation-adjustment release. We update within days of each annual publication. Every guide on this site carries a modified date so you can confirm you're reading current rules.

Where to go next

Once you have a number, the useful question shifts from "what do I owe" to "what can I do about it". If your gain came out short-term, the holding-period comparison in your results is the first lever. If it's long-term and large, look at loss harvesting and bracket management. And if you live in a state that taxes gains, find your state's exact rate before you finalise any plan.

CC
CapitalCalc Editorial Team

Our editorial team combines expertise in tax law, financial planning, and software engineering. All content is fact-checked against primary IRS sources (Revenue Procedures, Publications, and Instructions) and reviewed by professionals with backgrounds in public accounting and fintech. We update our guides annually to reflect the latest tax code changes.

About Us → Editorial Policy →