How It Works
Capital gains tax applies when you sell an asset for more than you paid.
Capital Gain = Sale Price − Cost Basis | Long-term: 0/15/20% by income | Short-term: ordinary income rate
- Short-term gains (held <12 months) are taxed as ordinary income — at your marginal income tax rate.
- Long-term gains (held 12+ months) receive preferential rates: 0% (lower income), 15% (most taxpayers), 20% (high income).
- 2026 long-term 0% threshold: $49,450 (Single), $98,900 (MFJ). 20% threshold: $545,500 (Single), $613,700 (MFJ).
- This calculator estimates federal tax only — state capital gains tax (0–13.3%) is not included.
Worked Example
Sold stock for $80,000, bought for $50,000, held 18 months, single filer, $75,000 income.
Capital gain
$80,000 − $50,000 = $30,000
Holding period
18 months → long-term
Income + gain
$75,000 → 15% long-term rate (between $49,450 and $545,500)
Tax owed
$30,000 × 15% = $4,500
Net gain after tax
$30,000 − $4,500 = $25,500
The 18-month holding period qualifies for the 15% long-term rate ($4,500 tax). Had the same gain been short-term and taxed at this filer’s 22% ordinary rate, the tax would be $6,600 — so waiting past 12 months saves about $2,100.
How Capital Gains Tax Works — and How to Pay Less of It
The 12-month line that changes your rate
Capital gains tax hinges on one date: the day you bought the asset. Sell within 12 months and the profit is a short-term gain, taxed as ordinary income at rates up to 37%. Hold for 12 months and a day, and the same profit becomes a long-term gain, taxed at the gentler 0%, 15%, or 20% rates. Nothing else about the sale changes — only the calendar.
That single distinction is why the holding period is the most important input here. On a $30,000 gain, the gap between a 22% short-term rate and a 15% long-term rate is about $2,100; on large gains it runs to tens of thousands.
How your income picks the long-term rate
The long-term rate is not flat — it steps from 0% to 15% to 20% based on your total taxable income for the year, and the gain itself counts toward that income. For 2026 a single filer pays 0% on long-term gains while taxable income stays under $49,450, 15% up to $545,500, and 20% above that. The thresholds are higher for married-filing-jointly and head-of-household.
Because the gain stacks on top of your other income, a large sale can straddle two bands — part taxed at 15% and part at 20%. The calculator applies the rate for the income you enter, which is a close estimate for most situations.
Your cost basis is more than the sticker price
The taxable gain is the sale price minus your cost basis, and basis is usually larger than people remember. It includes what you paid plus buying and selling commissions; for reinvested dividends, every reinvestment adds to basis; and for property, capital improvements raise it too.
Getting basis right directly lowers the tax — each dollar of basis you can document is a dollar of gain you are not taxed on. Keep brokerage statements and improvement receipts so you do not overstate the profit and overpay.
What this estimate leaves out — in both directions
Some gains are taxed less than shown. A primary home qualifies for an exclusion of up to $250,000 of gain (single) or $500,000 (married filing jointly) if you lived there two of the last five years; inherited assets get a step-up in basis to their value at death; and assets sold inside retirement accounts are not taxed as capital gains at all.
Other situations cost more. A 3.8% Net Investment Income Tax applies above $200,000 / $250,000 of modified income, real estate carries depreciation recapture taxed up to 25%, and most states tax capital gains on top of the federal bill — from nothing to over 13%.
Levers that lower the bill
The cleanest lever is time: where it fits your plan, crossing the one-year mark drops a gain to the long-term rate. The second is offsetting — selling losing positions to cancel gains dollar for dollar, with up to $3,000 of net loss usable against ordinary income each year and the rest carried forward. Mind the wash-sale rule, which disallows the loss if you rebuy the same security within 30 days.
Two more are easy to miss: if your income lands in the 0% long-term band you can realize gains tax-free up to the threshold, and holding appreciating assets inside tax-advantaged accounts defers or removes the tax entirely.
Treat this as a planning estimate
This tool uses 2026 federal rates and assumes the gain is your last dollars of income. It does not file your return or model state tax, the NIIT, depreciation recapture, the home-sale exclusion, or a basis step-up, and the capital-gains thresholds are adjusted each year.
Use it to gauge the order of magnitude and to compare selling now versus later — then confirm the current figures with the IRS and a tax professional before acting on a large sale.